38 #ifndef __us3DSceneWidget_h_
39 #define __us3DSceneWidget_h_
42 #include <visp3/ustk_core/usConfig.h>
44 #ifdef USTK_HAVE_VTK_QT
46 #include <visp3/ustk_gui/usViewerWidget.h>
49 #include <vtkAxesActor.h>
50 #include <vtkCubeSource.h>
51 #include <vtkCutter.h>
52 #include <vtkImageData.h>
53 #include <vtkImagePlaneWidget.h>
54 #include <vtkImageResliceMapper.h>
55 #include <vtkImageSlice.h>
57 #include <vtkPolyDataMapper.h>
58 #include <vtkRenderWindow.h>
59 #include <vtkRenderer.h>
60 #include <vtkSmartPointer.h>
63 #if defined(USTK_HAVE_VTK_QT4)
64 #include <QApplication>
65 #include <QtGui/QGridLayout>
66 #include <QtGui/QMainWindow>
67 #include <QtGui/QPushButton>
68 #elif defined USTK_HAVE_VTK_QT5
69 #include <QApplication>
70 #include <QtWidgets/QGridLayout>
71 #include <QtWidgets/QMainWindow>
72 #include <QtWidgets/QPushButton>
75 #if USTK_HAVE_VTK_VERSION < 0x090000
76 #include <QVTKWidget.h>
78 #include <QVTKOpenGLStereoWidget.h>
124 us3DSceneWidget(QWidget *parent = NULL, Qt::WindowFlags f = Qt::WindowFlags());
127 vtkPolyData *getContour1();
128 vtkPolyData *getContour2();
129 vtkPolyData *getContour3();
131 vtkImageData *getImageData();
133 vtkPolyData *getMeshInPlane1();
134 vtkPolyData *getMeshInPlane2();
135 vtkPolyData *getMeshInPlane3();
137 vtkPlane *getPlane1();
138 vtkPlane *getPlane2();
139 vtkPlane *getPlane3();
147 void setImageData(vtkImageData *imageData);
150 void setPlane1(vtkPlane *plane);
151 void setPlane2(vtkPlane *plane);
152 void setPlane3(vtkPlane *plane);
153 void setPlanes(vtkPlane *plane1, vtkPlane *plane2, vtkPlane *plane3);
157 void updateImageData(vtkImageData *imageData);
158 void updateMatrix1(vtkMatrix4x4 *matrix);
159 void updateMatrix2(vtkMatrix4x4 *matrix);
160 void updateMatrix3(vtkMatrix4x4 *matrix);
169 vtkImageData *imageData;
172 vtkSmartPointer<vtkCubeSource> imageBoundsCube;
180 vtkPolyData *meshPolyData;
183 vtkImageResliceMapper *imageResliceMapper1;
184 vtkImageResliceMapper *imageResliceMapper2;
185 vtkImageResliceMapper *imageResliceMapper3;
188 vtkImageSlice *imageSlice1;
189 vtkImageSlice *imageSlice2;
190 vtkImageSlice *imageSlice3;
193 vtkSmartPointer<vtkCutter> cutter1;
194 vtkSmartPointer<vtkCutter> cutter2;
195 vtkSmartPointer<vtkCutter> cutter3;
198 vtkSmartPointer<vtkCutter> cutterPolyDataPlane1;
199 vtkSmartPointer<vtkCutter> cutterPolyDataPlane2;
200 vtkSmartPointer<vtkCutter> cutterPolyDataPlane3;
203 vtkSmartPointer<vtkAxesActor> m_axesActor;
206 vtkRenderer *renderer;