Skip to content

RF: Change `NEWIMAGE::volume` extrapolation settings in a thread-safe manner

Paul McCarthy requested to merge mnt/volume-extrapolation into master

This MR builds on !7, which must be merged first.

This MR makes some adjustments to the functions in warpfns.h so that changes to the extrapolation settings of NEWIMAGE::volume instances are made via passing in extrapparams instances at the time of interpolation/extrapolation. These changes should be source-compatible with downstream projects, but they will require recompilation.

This is an alternative to using the setextrapolationmethod and similar functions which, because they change the state of the volume instance, cannot be safely used in multi-threaded applications.

I have also added a warpfns_stubs.cc file which contains instantiations of the templated functions in warpfns.h, to allow us to catch errors at build time, rather than when downstream code is compiled.

Edited by Paul McCarthy

Merge request reports

Loading