Skip to content

If a SetInterpolator() is used, then clamp the results.

David Gobbi requested to merge dgobbi/vtk:reslice-interpolate-overflow into master

This fixes a numerical overflow issue. The code skips the clamping step for linear and NN interpolation for better performance, but for high-order interpolation, it needs to clamp the result to the range of the output scalar type. A bug caused it to incorrectly skip the clamping if a high order interpolator was set with SetInterpolator(), but only for the "PermuteExecute" code path that is used for rotations that are precise multiples of 90 degrees.

Merge request reports