X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=9801e8bbb65575c3a080bed78f6ff8d92ce2b7ab;hb=e90f3417df897baa4a768b35374d7a80c5fa688e;hp=aa10ded56d9944dcb11d86c8f39085e3bf95f96e;hpb=58f6f4201ec9091b5150f6576da25bfedeabbdce;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index aa10ded..9801e8b 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -3302,7 +3302,11 @@ void vvMainWindow::SaveScreenshotAllSlices() // Screenshot vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(renderWindow); +#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1 + windowToImageFilter->SetScale(1); +#else windowToImageFilter->SetMagnification(1); +#endif windowToImageFilter->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel windowToImageFilter->Update(); @@ -3352,7 +3356,11 @@ void vvMainWindow::SaveScreenshot(QVTKWidget *widget) if (!fileName.isEmpty()) { vtkSmartPointer w2i = vtkSmartPointer::New(); w2i->SetInput(widget->GetRenderWindow()); +#if VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1 + w2i->SetScale(1); +#else w2i->SetMagnification(1); +#endif w2i->SetInputBufferTypeToRGBA(); //also record the alpha (transparency) channel w2i->Update(); vtkImageData *image = w2i->GetOutput();