niftyreg
niftyreg copied to clipboard
Warped image intensity range larger than floating image intensity range with default reg_aladin parameter (linear resampling)
I am doing a rigid registration of an ADC map to a T2 MRI using reg_aladin. The only optional parameter I set is -rigOnly. The source code for reg_aladin appears to show the default resampling scheme is linear. However, my original ADC map has a minimum intensity of 0 while my registered ADC map has a minimum intensity of -154. My understanding of linear resampling is that the registered ADC map should not have intensities outside the range of the original ADC map.
Pasting some relevant lines after discussion with @pmehta1203 trying to figure out if default interpolation was linear:
https://github.com/KCL-BMEIS/niftyreg/blob/f673b7837c0824f55dedb1534b32b55bf68a2823/reg-apps/reg_aladin.cpp#L161
https://github.com/KCL-BMEIS/niftyreg/blob/f673b7837c0824f55dedb1534b32b55bf68a2823/reg-lib/_reg_aladin.h#L255-L258
The interpolation is set to linear during the registration optimisation, but the final interpolation to generate the final warped image is cubic interpolation. If needed, we could add another parameter to user-specify the order of the final interpolation.
A parameter to specify the order of the final interpolation would be great. Thanks!