Commit 86eacbe5 authored by David Gobbi's avatar David Gobbi Committed by Kitware Robot

Merge topic 'reslice-interpolate-overflow'

a4d1bea8 If a SetInterpolator() is used, then clamp the results.
Acked-by: Kitware Robot's avatarKitware Robot <>
Acked-by: Sean McBride's avatarSean McBride <>
Reviewed-by: Cory Quammen's avatarCory Quammen <>
Merge-request: !1279
parents 00e698c5 a4d1bea8
Pipeline #8574 failed with stage
......@@ -2829,8 +2829,16 @@ void vtkReslicePermuteExecute(vtkImageReslice *self,
bool rescaleScalars = (scalarShift != 0.0 || scalarScale != 1.0);
// get the interpolation mode from the interpolator
int interpolationMode = VTK_INT_MAX;
if (interpolator->IsA("vtkImageInterpolator"))
interpolationMode =
static_cast<vtkImageInterpolator *>(interpolator)
// if doConversion is false, a special fast-path will be used
int interpolationMode = self->GetInterpolationMode();
bool doConversion = true;
int inputScalarType = scalars->GetDataType();
if (interpolationMode == VTK_NEAREST_INTERPOLATION &&
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment