Final warp computed is not diffeomorphic

I have two T1 weighted images of the knee from the same subject and with the same intensity range that I want to align nonlinearly using:

mrregister -type rigid_affine_nonlinear image1.mif image2.mif -nl_warp_full warp.mif

but I get the following warning:

mrregister: [WARNING] final warp computed is not diffeomorphic (negative jacobian determinants detected). Try increasing -nl_disp_smooth or -nl_update_smooth regularisation.

and the resulting images are not aligned well.

The reason I want to do it nonlinearly is because the patient moved, causing slightly different configuration of the joint, which prevents linear registration.

I tried increasing both -nl_disp_smooth and -nl_update_smooth but I keep getting the same warning. What is the general advice to changing these parameters and tackling the above issue? Should this kind of application even work with mrregister?

Hi @bjeurissen,

Did you ever solve this issue? I’ve recently had a similar problem

If the images are not ODFs, I’d recommend removing large bias fields if present, rescaling the images to roughly 0.5 average intensity but most importantly match intensities across input images. This might help.

You can also use a different cost function for instance in ANTs and convert the warps to mrtrix format.

Make sure the affine registration and masks are sensible.

You can convert the non-diffeomorphic warp to the jacobian determinant image and check where the Jacobian is far from 1. You could exclude these areas from the mask, forcing registration to ignore those.

1 Like