From 77c758939d173f1ae16d13687c25923c116ed046 Mon Sep 17 00:00:00 2001 From: Ken Martin <ken.martin@kitware.com> Date: Tue, 30 Apr 2019 11:31:25 -0400 Subject: [PATCH] clamp the image diff gain to not overflow Otherwise the diff image can overflow and misrepresent the differences. --- Testing/Rendering/vtkTesting.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Testing/Rendering/vtkTesting.cxx b/Testing/Rendering/vtkTesting.cxx index 943e91a43f4..5031810e7b3 100644 --- a/Testing/Rendering/vtkTesting.cxx +++ b/Testing/Rendering/vtkTesting.cxx @@ -776,6 +776,7 @@ int vtkTesting::RegressionTest(vtkAlgorithm* imageSource, rtGamma->SetInputConnection(rtId->GetOutputPort()); rtGamma->SetShift(0); rtGamma->SetScale(10); + rtGamma->ClampOverflowOn(); vtkNew<vtkPNGWriter> rtPngw; rtPngw->SetFileName(diffFilename.c_str()); -- GitLab