Open yesulove opened 1 month ago
The transformation components are located in out['fwdtransforms']
and out['invtransforms']
. out['warpedmovout']
is the moving image warped to the space of the fixed image and is not a list.
With that correction and correcting the indices in the out['fwdtransforms']
:
out['fwdtransforms'][1]
is a nifti file constituting a 3-D displacement field for a 3-D registration. If that is not the case in your situation, we would need more information to diagnose. Nick, I think the warp field comes first, so that the elements go in order to antsApplyTransforms. It's reversed in the invtransforms
@yesulove, as to dimensions, the nifti warp field from a 2D registration has two dimensions and two components. At every voxel (i,j) there is a displacement vector (x,y). This, when composed with the linear transform matrix, is the full transform.
Oops, thanks @cookpa. It's early here.
@ntustison to err is human, but I've also noticed chatGPT gets confused about this
Nick, I think the warp field comes first, so that the elements go in order to antsApplyTransforms. It's reversed in the invtransforms
@yesulove, as to dimensions, the nifti warp field from a 2D registration has two dimensions and two components. At every voxel (i,j) there is a displacement vector (x,y). This, when composed with the linear transform matrix, is the full transform.
I have a question too... Why do I calculate outs['fwdtransforms'][0] that the number of non-normal Jacobian determinants is always 0 after reading, but I am doing a deformable SyN registration
I have a question that I would like to ask: For nonlinear transformations(eg:out['warpedmovout']), the output deformation field list has two elements
1.out['warpedmovout'][0] The first element is a. nii.gz file, but its shape is not three-dimensional but two-dimensional, so it should not be a deformation field but a Jacobian determinant of the deformation field. Because for two-dimensional registration, the dimension of the deformation field should be three.Can we obtain a deformation field with a three-dimensional shape? How to obtain and save it?