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 ofnewimage
where, for 4D images, thevolume
class would store astd::vector<volume>
containing a separate 3D volume for each timepoint. After the introduction of theShadowVolume
pattern, this code was having no effect, as theoperator[]
function would return a newShadowVolume
instance on each invocation. The logic inapplyxfm4D
has been changed so that the pad value is set via theNEWIMAGE::affine_transform
overload (innewimagefns.cc
) which accepts aset_backgnd
parameter. - With the introduction of the
ShadowVolume
cache in newimage!41, the calls toinvol[t]
described above resulted in the creation of aShadowVolume
for each time point, which meant that the subsequent call toinvol.setinterpolationmethod
(and similar) were not being applied to thoseShadowVolume
instances. This is being addressed in newimage!42, but the reworked code here avoids this issue.
Edited by Paul McCarthy