Hello. I found a strange behavior after hardening a transform that was created using the Landmark Registration module.
After using the Landmark Registration module to register (using ThinPlate Registration) any 2D color images (vector volumes with one slice in the axial direction), the resulting image will still have one slice in the axial direction (as expected). If I harden the transform, then the image will end up with two or even three slices, in the axial direction.
Tested with the latest preview release (revision 30342).
This is the intended behavior. Thin-plate spline transform is a warping transform, which can change the size of the volumeās bounding box (e.g., one side of the volume may bulge out). To avoid cutting off any part of the volume, when a warping transform is hardened then the new volume extents will be determined so that the entire bounding box of the volume is included. This may be larger or smaller than the volumeās original extent.
If you prefer your volume to have a specific geometry then you can use āResample Scalar/Vector/DWI volumeā module and specify the desired geometry as reference volume.
Even for 2D images only? Because right now, it is transforming a 2D image into a 3D volume. The newly created slices (in the axial direction) donāt contain any meaningful data (just some constant value). I understand that on the image plane the dimensions will probably change.
Yes, regardless of how many slices the volume contains (one or more), if the transform even slightly moves out of plane then the volume bounds will increase and the extents will be increased to accommodate that. If out-of-plane translation component is very little then the other slice may appear blank (due to the linear interpolation).
Since due to numerical precision issues it is almost inevitable to limit out-of-plane transformation component to exactly 0 in every situations (e.g., for oblique image axes), it could make sense to add some tolerance to the computations here. For example, if the bounds are off by less than 0.001 * spacing then that can be ignored.