]> Creatis software - clitk.git/commitdiff
Ensure compatibility with newer version of VTK9
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 7 Sep 2018 09:18:45 +0000 (11:18 +0200)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 7 Sep 2018 09:18:45 +0000 (11:18 +0200)
vv/vvMainWindow.cxx

index e88a5d9695b961b8a410467d4d1f1de783c21adf..4e3ba2131de86c02ba02eccfa6a7e5cb307f2bd8 100644 (file)
@@ -3304,7 +3304,7 @@ void vvMainWindow::SaveScreenshotAllSlices()
     // Screenshot
     vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter = vtkSmartPointer<vtkWindowToImageFilter>::New();
     windowToImageFilter->SetInput(renderWindow);
-#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1
+#if (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9
     windowToImageFilter->SetScale(1);
 #else
     windowToImageFilter->SetMagnification(1);
@@ -3358,7 +3358,7 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget)
   if (!fileName.isEmpty()) {
     vtkSmartPointer<vtkWindowToImageFilter> w2i = vtkSmartPointer<vtkWindowToImageFilter>::New();
     w2i->SetInput(widget->GetRenderWindow());
-#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1
+#if (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9
     w2i->SetScale(1);
 #else
     w2i->SetMagnification(1);