From 75719c377dd8aa759f32dd277cfd7b2f914ebfa8 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Fri, 21 Sep 2018 09:46:59 +0200 Subject: [PATCH] Update QVTKWidget to QVTKOpenGLNativeWidget for VTK > 8.1 --- vv/CMakeLists.txt | 43 +- vv/qt_ui/vvMainWindow.ui | 12 +- vv/qt_ui/vvMainWindowVTK7.ui | 1332 +++++++++++++++++++++++++ vv/qt_ui/vvSegmentationDialog.ui | 6 +- vv/qt_ui/vvSegmentationDialogVTK7.ui | 159 +++ vv/qt_ui/vvSurfaceViewerDialog.ui | 6 +- vv/qt_ui/vvSurfaceViewerDialogVTK7.ui | 74 ++ vv/qt_ui/vvToolHistogram.ui | 6 +- vv/qt_ui/vvToolHistogramVTK7.ui | 106 ++ vv/qt_ui/vvToolProfile.ui | 6 +- vv/qt_ui/vvToolProfileVTK7.ui | 169 ++++ vv/vvMainWindow.cxx | 8 + vv/vvMainWindow.h | 9 + vv/vvSegmentationDialog.h | 5 + vv/vvSurfaceViewerDialog.h | 5 + vv/vvToolHistogram.cxx | 4 + vv/vvToolHistogram.h | 9 + vv/vvToolProfile.h | 5 + 18 files changed, 1940 insertions(+), 24 deletions(-) create mode 100644 vv/qt_ui/vvMainWindowVTK7.ui create mode 100644 vv/qt_ui/vvSegmentationDialogVTK7.ui create mode 100644 vv/qt_ui/vvSurfaceViewerDialogVTK7.ui create mode 100644 vv/qt_ui/vvToolHistogramVTK7.ui create mode 100644 vv/qt_ui/vvToolProfileVTK7.ui diff --git a/vv/CMakeLists.txt b/vv/CMakeLists.txt index fe6120e..9453e1b 100644 --- a/vv/CMakeLists.txt +++ b/vv/CMakeLists.txt @@ -26,8 +26,6 @@ set(vv_TOOLS vvToolConvert ## with dummy vvToolConvert.ui vvToolROIManager vvToolSegmentation - vvToolProfile - vvToolHistogram ## these ones are for tests (not working) # vvToolTest # vvToolFoo @@ -39,6 +37,12 @@ set(vv_TOOLS # vvToolExtractLung # vvToolStructureSetManager ) +#List of vv tools to compile +#Ensure compatibility with QVTKOpenGL for VTK < v8.1 and QVTKOpenGLNativeWidget for others +set(vv_TOOLS_VTK7 + vvToolProfile + vvToolHistogram +) # dependencies of the tools # Future issues : when tool depend on other tools ... how to manage that ? # >> add the relevant $_LIBS variable to the tool that has dependencies? @@ -65,8 +69,6 @@ set(vv_COMMON_WITH_UI vvOverlayPanel vvLandmarksPanel vvProgressDialog - vvSegmentationDialog - vvSurfaceViewerDialog vvDeformationDialog vvStructSelector vvIntensityValueSlider @@ -76,6 +78,13 @@ set(vv_COMMON_WITH_UI vvToolInputSelectorWidget vvRegisterForm ) +# in COMMON_WITH_UI -> must have .h and .cxx and VTK7.ui +#Ensure compatibility with QVTKOpenGL for VTK < v8.1 and QVTKOpenGLNativeWidget for others +set(vv_COMMON_WITH_UI_VTK7 + vvMainWindow + vvSegmentationDialog + vvSurfaceViewerDialog +) # All others sources set(vv_SRCS @@ -208,7 +217,7 @@ endif(CLITK_USE_PACS_CONNECTION) # variables in vv.cxx for the tools contained in vvLib if(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h) file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h) - foreach(tool ${vv_TOOLS}) + foreach(tool ${vv_TOOLS} ${vv_TOOLS_VTK7}) file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "#include \"${tool}.h\"\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "extern const vvToolCreator<${tool}> *dummy${tool};\n") file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/vvToolsList.h "const vvToolCreator<${tool}> *dummy${tool}2 = dummy${tool};\n\n") @@ -226,6 +235,28 @@ endif(CLITK_USE_PACS_CONNECTION) QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) endif() endforeach(tool) + + #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(vv_QT_VERSION VERSION_GREATER "4") + QT5_WRAP_CPP(vv_SRCS ${tool}.h) + QT5_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) + else() + QT4_WRAP_CPP(vv_SRCS ${tool}.h) + QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}.ui) + endif() + else() + if(vv_QT_VERSION VERSION_GREATER "4") + QT5_WRAP_CPP(vv_SRCS ${tool}.h) + QT5_WRAP_UI(vv_UI_CXX qt_ui/${tool}VTK7.ui) + else() + QT4_WRAP_CPP(vv_SRCS ${tool}.h) + QT4_WRAP_UI(vv_UI_CXX qt_ui/${tool}VTK7.ui) + endif() + endif() + endforeach(tool) # Add the common source files foreach(tool ${vv_COMMON}) @@ -301,7 +332,7 @@ include_directories( #========================================================= #Add each tool's dependencies -foreach(tool ${vv_TOOLS}) +foreach(tool ${vv_TOOLS} ${vv_TOOLS_VTK7}) set(toolLibs ${toolLibs} ${${tool}_LIBS}) endforeach(tool) diff --git a/vv/qt_ui/vvMainWindow.ui b/vv/qt_ui/vvMainWindow.ui index fa205e0..09050ba 100644 --- a/vv/qt_ui/vvMainWindow.ui +++ b/vv/qt_ui/vvMainWindow.ui @@ -651,7 +651,7 @@ 2 - + true @@ -691,7 +691,7 @@ 2 - + true @@ -733,7 +733,7 @@ 2 - + true @@ -770,7 +770,7 @@ 2 - + 0 @@ -1285,9 +1285,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
vvInfoPanel diff --git a/vv/qt_ui/vvMainWindowVTK7.ui b/vv/qt_ui/vvMainWindowVTK7.ui new file mode 100644 index 0000000..fa205e0 --- /dev/null +++ b/vv/qt_ui/vvMainWindowVTK7.ui @@ -0,0 +1,1332 @@ + + + vvMainWindow + + + true + + + + 0 + 0 + 1008 + 758 + + + + + 0 + 0 + + + + vv : the 4D Slicer + + + + :/common/icons/ducky.png:/common/icons/ducky.png + + + Type 'F1' on image to display help on navigation + + + + + 0 + 0 + + + + Type 'F1' on image to display help on navigation + + + + + + + 0 + 0 + + + + + 16 + 36 + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + 24 + 24 + + + + Go to cursor + + + + + + + :/common/icons/cross.png:/common/icons/cross.png + + + + + + + QFrame::Sunken + + + Qt::Vertical + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + Play Current Image + + + + + + + :/common/icons/player_play.png:/common/icons/player_play.png + + + + + + + Qt::Vertical + + + + + + + Window : + + + + + + + 6 + + + -66000.000000000000000 + + + 66000.000000000000000 + + + 10.000000000000000 + + + + + + + + 0 + 0 + + + + + 24 + 16777215 + + + + Inverse colors + + + + + + + :/common/icons/invertcolor.png:/common/icons/invertcolor.png + + + + + + + Level : + + + + + + + 6 + + + -66000.000000000000000 + + + 66000.000000000000000 + + + 10.000000000000000 + + + + + + + Preset : + + + + + + + + 0 + 0 + + + + + 100 + 16777215 + + + + + Auto Scale + + + + + Hounsfield Full Scale + + + + + Soft Tissue + + + + + Lungs + + + + + Bones + + + + + Head/Brain + + + + + [0,1] Scale + + + + + User Scale + + + + + Ventilation Image + + + + + + + + Colormap : + + + + + + + + B&W + + + + + Heat + + + + + Cold + + + + + Dosimetry + + + + + Full Color + + + + + Segmentation + + + + + Ventilation + + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + Expand window + + + + + + + :/common/icons/adjustsize.png:/common/icons/adjustsize.png + + + + + + + 1 + + + 100 + + + 10 + + + + + + + Speed : + + + + + + + true + + + + 24 + 16777215 + + + + Apply windowing to all images + + + All + + + + + + + + World + + + + + Voxels + + + + + + + + Slice to + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + Qt::Horizontal + + + + Qt::Vertical + + + + + 0 + 1 + + + + 0 + + + + Images + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + Qt::ScrollBarAsNeeded + + + false + + + Qt::ElideLeft + + + true + + + 7 + + + + 1 + + + + + 2 + + + + + 3 + + + + + 4 + + + + + Data + + + + + 6 + + + + + 8 + + + + + + + + + + 0 + 0 + + + + Overlay + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + + + + + ROI + + + + + + + 0 + 0 + + + + Link + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + + + + + + 0 + 0 + + + + Landmarks + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + + + + + + + true + + + + 0 + 0 + + + + + + + + 1 + 0 + + + + Qt::Horizontal + + + + Qt::Vertical + + + + + 0 + 0 + + + + + 2 + + + 2 + + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + 0 + 0 + + + + Qt::NoFocus + + + + 2 + + + 2 + + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + Qt::Vertical + + + + + 0 + 0 + + + + + 2 + + + 2 + + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + 0 + 0 + + + + + 2 + + + 2 + + + + + + 0 + 0 + + + + true + + + + + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + + + + + + + + + + + + + 0 + 0 + 1008 + 27 + + + + false + + + + Help + + + + + + + + Overlay + + + + + + + + + Screenshots + + + + + + + + + + + Experimental + + + + + + + + + + Tools + + + + + File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + :/common/icons/fileopen.png:/common/icons/fileopen.png + + + Open image(s) + + + Ctrl+O + + + true + + + + + Close images + + + + + + :/common/icons/exit.png:/common/icons/exit.png + + + Exit + + + true + + + + + Save screenshot + + + + + pickable + + + + + dragable + + + + + Set colormap + + + + + IsoContours + + + + + About QtVTKRender2D + + + + + About + + + true + + + + + Reload images + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open Dicom + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Merge several nD images into a single (n+1)D image + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Slice a nD image into several (n-1)D images + + + true + + + + + Open One Image As Multiple + + + + + + :/common/icons/filesave.png:/common/icons/filesave.png + + + Save current image + + + Ctrl+S + + + true + + + + + + :/common/icons/cursor-uparrow.png:/common/icons/cursor-uparrow.png + + + Add deformation field to current image + + + true + + + + + + :/common/icons/NOgrid.png:/common/icons/NOgrid.png + + + Save image in TL + + + true + + + + + + :/common/icons/NEgrid.png:/common/icons/NEgrid.png + + + Save image in TR + + + true + + + + + + :/common/icons/SOgrid.png:/common/icons/SOgrid.png + + + Save image in BL + + + true + + + + + + :/common/icons/SEgrid.png:/common/icons/SEgrid.png + + + Save image in BR + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open a nD image as a (n-1)D + t image + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open several nD images into a single nD+t image + + + true + + + + + + :/common/icons/fusion.png:/common/icons/fusion.png + + + Add fusion image to current image + + + true + + + + + Segmentation + + + true + + + + + Resample + + + + + Surface Viewer + + + true + + + + + joelDebug + + + + + Deformable Registration + + + true + + + + + Verify Registration + + + true + + + + + Maximum Intensity Projection + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open VTK or OBJ contour + + + true + + + + + Navigation Help + + + true + + + QAction::NormalPriority + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Open Dicom-Struct + + + true + + + + + Compute mid-position image + + + true + + + + + Experimental... + + + + + Register vv + + + true + + + + + Save all slices (Top-Left view) + + + + + + :/common/icons/filesave.png:/common/icons/filesave.png + + + Save current state + + + Save current window and file states + + + true + + + + + + :/common/icons/open.png:/common/icons/open.png + + + Read Saved State + + + true + + + + + + :/common/icons/GPSup.png:/common/icons/GPSup.png + + + Add overlay image to current image + + + true + + + + + + :/common/icons/rotateright.png:/common/icons/rotateright.png + + + Test / Fusion of US & CT sequences + + + true + + + + + Connect Pacs + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+ + vvInfoPanel + QWidget +
vvInfoPanel.h
+
+ + vvLandmarksPanel + QWidget +
vvLandmarksPanel.h
+
+ + vvLinkPanel + QWidget +
vvLinkPanel.h
+
+ + vvOverlayPanel + QWidget +
vvOverlayPanel.h
+
+
+ + presetComboBox + windowSpinBox + levelSpinBox + NOViewWidget + NOVerticalSlider + NOHorizontalSlider + SOVerticalSlider + SOHorizontalSlider + NEVerticalSlider + NEHorizontalSlider + SEVerticalSlider + SEHorizontalSlider + viewButton + + + + + +
diff --git a/vv/qt_ui/vvSegmentationDialog.ui b/vv/qt_ui/vvSegmentationDialog.ui index 4767625..d7e9309 100644 --- a/vv/qt_ui/vvSegmentationDialog.ui +++ b/vv/qt_ui/vvSegmentationDialog.ui @@ -28,7 +28,7 @@
- + @@ -132,9 +132,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvSegmentationDialogVTK7.ui b/vv/qt_ui/vvSegmentationDialogVTK7.ui new file mode 100644 index 0000000..4767625 --- /dev/null +++ b/vv/qt_ui/vvSegmentationDialogVTK7.ui @@ -0,0 +1,159 @@ + + vvSegmentationDialog + + + + 0 + 0 + 561 + 453 + + + + Segmentation tool + + + + + + Qt::Vertical + + + + + + + Qt::Vertical + + + + + + + + + + + 0 + 0 + + + + Min : + + + + + + + Max : + + + + + + + + 0 + 0 + + + + Binarise + + + + + + + Erode + + + + + + + Dilate + + + + + + + Kernel Size : + + + + + + + 1 + + + 2 + + + + + + + + 0 + 0 + + + + 3D + + + + + + + Save As + + + + + + + Close + + + + + + + TextLabel + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + + + closeButton + clicked() + vvSegmentationDialog + reject() + + + 528 + 403 + + + 542 + 423 + + + + +
diff --git a/vv/qt_ui/vvSurfaceViewerDialog.ui b/vv/qt_ui/vvSurfaceViewerDialog.ui index 6683830..a87d8ff 100644 --- a/vv/qt_ui/vvSurfaceViewerDialog.ui +++ b/vv/qt_ui/vvSurfaceViewerDialog.ui @@ -14,7 +14,7 @@ - + @@ -47,9 +47,9 @@
- QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvSurfaceViewerDialogVTK7.ui b/vv/qt_ui/vvSurfaceViewerDialogVTK7.ui new file mode 100644 index 0000000..6683830 --- /dev/null +++ b/vv/qt_ui/vvSurfaceViewerDialogVTK7.ui @@ -0,0 +1,74 @@ + + vvSurfaceViewerDialog + + + + 0 + 0 + 554 + 472 + + + + Dialog + + + + + + + + + Qt::Horizontal + + + + 311 + 20 + + + + + + + + Load + + + + + + + Close + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + + + closeButton + clicked() + vvSurfaceViewerDialog + reject() + + + 492 + 436 + + + 443 + 435 + + + + +
diff --git a/vv/qt_ui/vvToolHistogram.ui b/vv/qt_ui/vvToolHistogram.ui index 01851e0..7cc94e9 100644 --- a/vv/qt_ui/vvToolHistogram.ui +++ b/vv/qt_ui/vvToolHistogram.ui @@ -78,7 +78,7 @@
- + 0 @@ -96,9 +96,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvToolHistogramVTK7.ui b/vv/qt_ui/vvToolHistogramVTK7.ui new file mode 100644 index 0000000..01851e0 --- /dev/null +++ b/vv/qt_ui/vvToolHistogramVTK7.ui @@ -0,0 +1,106 @@ + + + vvToolHistogram + + + + 0 + 0 + 506 + 452 + + + + Histogram image + + + + + + + + 6 + + + + + + + + 0 + 0 + + + + Save Histogram + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + 0 + 300 + + + + true + + + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + +
diff --git a/vv/qt_ui/vvToolProfile.ui b/vv/qt_ui/vvToolProfile.ui index bc3c9c8..fb0b5ad 100644 --- a/vv/qt_ui/vvToolProfile.ui +++ b/vv/qt_ui/vvToolProfile.ui @@ -141,7 +141,7 @@
- + 0 @@ -159,9 +159,9 @@ - QVTKWidget + QVTKOpenGLNativeWidget QWidget -
QVTKWidget.h
+
QVTKOpenGLNativeWidget.h
diff --git a/vv/qt_ui/vvToolProfileVTK7.ui b/vv/qt_ui/vvToolProfileVTK7.ui new file mode 100644 index 0000000..bc3c9c8 --- /dev/null +++ b/vv/qt_ui/vvToolProfileVTK7.ui @@ -0,0 +1,169 @@ + + + vvToolProfile + + + + 0 + 0 + 505 + 452 + + + + Profile image + + + + + + + + 6 + + + + + + + Select point 2 + + + + + + + Center of voxel2 (vox): + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + + + + + + + + + + + Cancel + + + + + + + + 0 + 0 + + + + Save Profile + + + + + + + + + + + Select point 1 + + + + + + + Center of voxel1 (vox): + + + + + + + + + + + + 0 + 0 + + + + + 200 + 0 + + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + + + + + 0 + 300 + + + + true + + + + + + + + + + QVTKWidget + QWidget +
QVTKWidget.h
+
+
+ + +
diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 4e3ba21..6a81732 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -3278,7 +3278,11 @@ void vvMainWindow::SaveSEScreenshot() //------------------------------------------------------------------------------ void vvMainWindow::SaveScreenshotAllSlices() { +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 + QVTKOpenGLNativeWidget *widget = NOViewWidget; +#else QVTKWidget *widget = NOViewWidget; +#endif int index = 0;// GetSlicerIndexFromItem(DataTree->selectedItems()[0]); vvSlicerManager * SM = mSlicerManagers[index]; @@ -3334,7 +3338,11 @@ void vvMainWindow::SaveScreenshotAllSlices() //------------------------------------------------------------------------------ +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +void vvMainWindow::SaveScreenshot(QVTKOpenGLNativeWidget *widget) +#else void vvMainWindow::SaveScreenshot(QVTKWidget *widget) +#endif { QString Extensions = "Images( *.png);;"; Extensions += "Images( *.jpg);;"; diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index 8908b24..2be7e75 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -21,7 +21,12 @@ #include #include +#include "vtkVersion.h" +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvMainWindow.h" +#else +#include "ui_vvMainWindowVTK7.h" +#endif #include "vvMainWindowBase.h" #include "vvToolManager.h" #include "vvImageReader.h" @@ -222,7 +227,11 @@ private: QString GetVectorIntAsString(std::vector vectorInt); 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 + void SaveScreenshot(QVTKOpenGLNativeWidget *widget); +#else void SaveScreenshot(QVTKWidget *widget); +#endif int GetImageDuplicateFilenameNumber(std::string filename); QMenu contextMenu; diff --git a/vv/vvSegmentationDialog.h b/vv/vvSegmentationDialog.h index f457df5..d359e5d 100644 --- a/vv/vvSegmentationDialog.h +++ b/vv/vvSegmentationDialog.h @@ -17,7 +17,12 @@ ===========================================================================**/ #ifndef _VVSEGMENTATIONDIALOG_H #define _VVSEGMENTATIONDIALOG_H +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvSegmentationDialog.h" +#else +#include "ui_vvSegmentationDialogVTK7.h" +#endif #include "clitkCommon.h" #include "vvImage.h" #include "vvSlicerManager.h" diff --git a/vv/vvSurfaceViewerDialog.h b/vv/vvSurfaceViewerDialog.h index f53c9bb..c0a8840 100644 --- a/vv/vvSurfaceViewerDialog.h +++ b/vv/vvSurfaceViewerDialog.h @@ -17,7 +17,12 @@ ===========================================================================**/ #ifndef _vvSurfaceViewerDialog_H #define _vvSurfaceViewerDialog_H +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvSurfaceViewerDialog.h" +#else +#include "ui_vvSurfaceViewerDialogVTK7.h" +#endif class vtkPolyDataMapper; class vtkActor; diff --git a/vv/vvToolHistogram.cxx b/vv/vvToolHistogram.cxx index 293fbcd..939642a 100644 --- a/vv/vvToolHistogram.cxx +++ b/vv/vvToolHistogram.cxx @@ -311,7 +311,11 @@ void vvToolHistogram::InputIsSelected(vvSlicerManager * m) //------------------------------------------------------------------------------ +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 +QVTKOpenGLNativeWidget* vvToolHistogram::GetHistogramWidget() +#else QVTKWidget* vvToolHistogram::GetHistogramWidget() +#endif { return(HistogramWidget); } diff --git a/vv/vvToolHistogram.h b/vv/vvToolHistogram.h index 437e4e6..3897c90 100644 --- a/vv/vvToolHistogram.h +++ b/vv/vvToolHistogram.h @@ -27,7 +27,12 @@ #include "vvToolBase.h" #include "vvToolWidgetBase.h" +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvToolHistogram.h" +#else +#include "ui_vvToolHistogramVTK7.h" +#endif #include "clitkHistogramImage_ggo.h" #include "clitkHistogramImageGenericFilter.h" @@ -61,7 +66,11 @@ class vvToolHistogram: void displayHistogram(); +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 + QVTKOpenGLNativeWidget* GetHistogramWidget(); +#else QVTKWidget* GetHistogramWidget(); +#endif //----------------------------------------------------- public slots: diff --git a/vv/vvToolProfile.h b/vv/vvToolProfile.h index 0410637..0f94ff3 100644 --- a/vv/vvToolProfile.h +++ b/vv/vvToolProfile.h @@ -29,7 +29,12 @@ #include "vvToolWidgetBase.h" #include "vvImageContour.h" #include "vvLandmarks.h" +#include +#if (VTK_MAJOR_VERSION == 8 && VTK_MINOR_VERSION >= 1) || VTK_MAJOR_VERSION >= 9 #include "ui_vvToolProfile.h" +#else +#include "ui_vvToolProfileVTK7.h" +#endif #include "vvBinaryImageOverlayActor.h" #include "clitkProfileImage_ggo.h" -- 2.45.0