Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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