Skip to content

Instantly share code, notes, and snippets.

@tfmoraes
Created April 10, 2019 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfmoraes/eacb51381e2595b9dfea74d9c901cbd7 to your computer and use it in GitHub Desktop.
Save tfmoraes/eacb51381e2595b9dfea74d9c901cbd7 to your computer and use it in GitHub Desktop.
diff --git a/Utilities/VTK/vtkImageColorViewer.cxx b/Utilities/VTK/vtkImageColorViewer.cxx
index 3d6df39..ea857ef 100644
--- a/Utilities/VTK/vtkImageColorViewer.cxx
+++ b/Utilities/VTK/vtkImageColorViewer.cxx
@@ -539,7 +539,15 @@ public:
if (event == vtkCommand::ResetWindowLevelEvent)
{
-#if (VTK_MAJOR_VERSION >= 6)
+#if VTK_MAJOR_VERSION > 7 || (VTK_MAJOR_VERSION == 7 && VTK_MINOR_VERSION >= 1)
+ this->IV->GetInputAlgorithm()->UpdateInformation();
+ this->IV->GetInputInformation()->Set(
+ vtkStreamingDemandDrivenPipeline::UPDATE_EXTENT(),
+ vtkStreamingDemandDrivenPipeline::GetWholeExtent(
+ this->IV->GetInputInformation()),
+ 6);
+ this->IV->GetInputAlgorithm()->Update();
+#elif (VTK_MAJOR_VERSION >= 6)
this->IV->GetInputAlgorithm()->UpdateInformation();
vtkStreamingDemandDrivenPipeline::SetUpdateExtent(
this->IV->GetInputInformation(),
@@ -963,4 +971,4 @@ void vtkImageColorViewer::PrintSelf(ostream& os, vtkIndent indent)
{
os << "None";
}
-}
+}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment