mdreg.defo_jacobian_2d#
- mdreg.defo_jacobian_2d(defo)[source]#
Calculate the Jacobian matrix and determinant from a 2D deformation field. Can process multi-slice images, but the actual deformation field/registration must be 2D.
- Parameters:
defo (np.ndarray) – The deformation field to calculate the Jacobian from. Dimensions are expected in the order [x, y, z, d, t], where x, y, z are the spatial dimensions, d is the dimension of the deformation field (two for 2D registration), and t is the time/dynamic.
- Returns:
jac_mat (np.ndarray) – The Jacobian matrix of the deformation field with dimensions [x, y, z, t]
jac_det (np.ndarray) – The determinant of the Jacobian matrix.