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, t, d], where x, y, z are the spatial dimensions, t is the time/dynamic, and d is the dimension of the deformation field vector (two for 2D registration).
- 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.