Skip to content

RF: Update method for changing interpolation/extrapolation settings on `NEWIMAGE::volume` instances

Paul McCarthy requested to merge mnt/shadowvolume-updates into master

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

Merge request reports

Loading