From: tbaudier Date: Mon, 4 Mar 2019 10:44:02 +0000 (+0100) Subject: QVTKOpenGLNativeWidget is available from VTK8.2 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=543b72e23ad001ac2a7743b9beacf48e2d0054ac;p=clitk.git QVTKOpenGLNativeWidget is available from VTK8.2 Before this version (eg VTK8.1.1), use QVTKWidget --- diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index 9453e1b..6f22571 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -239,7 +239,7 @@ endif(CLITK_USE_PACS_CONNECTION) #Special case for Main Window with QVTKWidget according VTK version foreach(tool ${vv_TOOLS_VTK7} ${vv_COMMON_WITH_UI_VTK7}) set(vv_SRCS ${vv_SRCS} ${tool}.cxx) - if(VTK_VERSION VERSION_GREATER "8.0.0") + if(VTK_VERSION VERSION_GREATER "8.2.0") if(vv_QT_VERSION VERSION_GREATER "4") QT5_WRAP_CPP(vv_SRCS ${tool}.h) QT5_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 2b41492..8107d7f 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -3333,7 +3333,7 @@ void vvMainWindow::SaveSEScreenshot() //------------------------------------------------------------------------------ void vvMainWindow::SaveScreenshotAllSlices() { -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 QVTKOpenGLNativeWidget *widget = NOViewWidget; #else QVTKWidget *widget = NOViewWidget; @@ -3363,7 +3363,7 @@ void vvMainWindow::SaveScreenshotAllSlices() // Screenshot vtkSmartPointer windowToImageFilter = vtkSmartPointer::New(); windowToImageFilter->SetInput(renderWindow); -#if (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 windowToImageFilter->SetScale(1); #else windowToImageFilter->SetMagnification(1); @@ -3393,7 +3393,7 @@ void vvMainWindow::SaveScreenshotAllSlices() //------------------------------------------------------------------------------ -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 void vvMainWindow::SaveScreenshot(QVTKOpenGLNativeWidget *widget) #else void vvMainWindow::SaveScreenshot(QVTKWidget *widget) @@ -3421,7 +3421,7 @@ 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) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION >= 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 w2i->SetScale(1); #else w2i->SetMagnification(1); diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index 769865e..c95ee4d 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -23,7 +23,7 @@ #include #include #include "vtkVersion.h" -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 #include "ui_vvMainWindow.h" #else #include "ui_vvMainWindowVTK7.h" @@ -234,7 +234,7 @@ private: std::vector GetItemFromPathname(const QString& pathname); int GetSlicerIndexFromItem(QTreeWidgetItem* item); //this actually returns the SlicerManager index TODO: rename it to GetSlicerManagerIndexFromItem QTreeWidgetItem* GetItemFromSlicerManager(vvSlicerManager* sm); -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 void SaveScreenshot(QVTKOpenGLNativeWidget *widget); #else void SaveScreenshot(QVTKWidget *widget); diff --git a/vv/vvSegmentationDialog.h b/vv/vvSegmentationDialog.h index d359e5d..277abc1 100644 --- a/vv/vvSegmentationDialog.h +++ b/vv/vvSegmentationDialog.h @@ -18,7 +18,7 @@ #ifndef _VVSEGMENTATIONDIALOG_H #define _VVSEGMENTATIONDIALOG_H #include -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 #include "ui_vvSegmentationDialog.h" #else #include "ui_vvSegmentationDialogVTK7.h" diff --git a/vv/vvSurfaceViewerDialog.h b/vv/vvSurfaceViewerDialog.h index c0a8840..9601e9a 100644 --- a/vv/vvSurfaceViewerDialog.h +++ b/vv/vvSurfaceViewerDialog.h @@ -18,7 +18,7 @@ #ifndef _vvSurfaceViewerDialog_H #define _vvSurfaceViewerDialog_H #include -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 #include "ui_vvSurfaceViewerDialog.h" #else #include "ui_vvSurfaceViewerDialogVTK7.h" diff --git a/vv/vvToolHistogram.cxx b/vv/vvToolHistogram.cxx index 939642a..5461bcc 100644 --- a/vv/vvToolHistogram.cxx +++ b/vv/vvToolHistogram.cxx @@ -311,7 +311,7 @@ void vvToolHistogram::InputIsSelected(vvSlicerManager * m) //------------------------------------------------------------------------------ -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 QVTKOpenGLNativeWidget* vvToolHistogram::GetHistogramWidget() #else QVTKWidget* vvToolHistogram::GetHistogramWidget() diff --git a/vv/vvToolHistogram.h b/vv/vvToolHistogram.h index 3897c90..8481378 100644 --- a/vv/vvToolHistogram.h +++ b/vv/vvToolHistogram.h @@ -28,7 +28,7 @@ #include "vvToolBase.h" #include "vvToolWidgetBase.h" #include -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 #include "ui_vvToolHistogram.h" #else #include "ui_vvToolHistogramVTK7.h" @@ -66,7 +66,7 @@ class vvToolHistogram: void displayHistogram(); -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 QVTKOpenGLNativeWidget* GetHistogramWidget(); #else QVTKWidget* GetHistogramWidget(); diff --git a/vv/vvToolProfile.h b/vv/vvToolProfile.h index 0f94ff3..8297a90 100644 --- a/vv/vvToolProfile.h +++ b/vv/vvToolProfile.h @@ -30,7 +30,7 @@ #include "vvImageContour.h" #include "vvLandmarks.h" #include -#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 2) || VTK_MAJOR_VERSION >= 9 #include "ui_vvToolProfile.h" #else #include "ui_vvToolProfileVTK7.h"