RF: Update method for changing interpolation/extrapolation settings on `NEWIMAGE::volume` instances
This MR contains some ShadowVolume-related fixes to flirt and applyxfm4D:
- The code was calling
invol[t].setpadvalue(..);. This is a throwback to an old version ofnewimagewhere, for 4D images, thevolumeclass would store astd::vector<volume>containing a separate 3D volume for each timepoint. After the introduction of theShadowVolumepattern, this code was having no effect, as theoperator[]function would return a newShadowVolumeinstance on each invocation. The logic inapplyxfm4Dhas been changed so that the pad value is set via theNEWIMAGE::affine_transformoverload (innewimagefns.cc) which accepts aset_backgndparameter. - With the introduction of the
ShadowVolumecache in newimage!41 (merged), the calls toinvol[t]described above resulted in the creation of aShadowVolumefor each time point, which meant that the subsequent call toinvol.setinterpolationmethod(and similar) were not being applied to thoseShadowVolumeinstances. This is being addressed in newimage!42 (merged), but the reworked code here avoids this issue.
Edited by Paul McCarthy