MIR.accuracy_measures.digital_diffeomorphismΒΆ

Digital diffeomorphism metrics and Jacobian determinant utilities.

Finite-difference Jacobian determinants of a 3-D transformation under several stencils, and the non-diffeomorphic voxel / tetrahedra / volume measures built from them (digital diffeomorphism criteria). Can also be run as a script on a .npz transformation.

Functions

calc_J_i(trans, grad_args)

Compute the Jacobian determinant using a specific finite-difference stencil.

calc_Jstar_1(trans)

Compute the Jacobian determinant J*_1 with the first diagonal (tetrahedral) difference stencil.

calc_Jstar_2(trans)

Compute the Jacobian determinant J*_2 with the second diagonal (tetrahedral) difference stencil.

calc_jac_dets(trans)

Compute multiple Jacobian determinant variants and a consistency mask.

calc_measurements(jac_dets, mask)

Compute non-diffeomorphic voxel, tetrahedra and volume measures.

get_identity_grid(array)

Return the identity transformation of the same size as the input.