Closed ebrahimebrahim closed 2 days ago
Double checked an output: Indeed it is a displacement field. The voxelmorph documentation probably meant that as "deformation field" is a bit ambiguous.
(Still looking into the voxel vs scanner units question)
In an example, I visually compared the target image, the warped moving image that comes out of voxelmorph, and the warped moving image that I obtained by apply mrtrix's mrtransform
to the transform generated by transformation_utils.convert_voxelmorph_transform_to_mrtrix_transform
. They all look aligned! Just slightly different interpolation methods between the two warped images. So I would say that confirms that coordinates are being handled correctly (or at least not so incorrectly that it is perceptible).
mrtransform
accepts -warp
in scanner coordinates, not voxel coordinates. Voxelmorph however seems to be unaware of scanner coordinates... so how is this working out? I think it all works out the same because what we are passing around is the nifti file and we are keeping its header intact which contains the affine. So even though the transform generated by voxelmorph is most likely in voxel coordinates and voxelmorph is unaware of scanner coordinates, mrtrix still knows what to do with the transform nifti file because the header is there.
The open issue regarding voxelmorph is the output deformation and it's format.