]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/BaseMPRWindow.h
Merge ssh://git.creatis.insa-lyon.fr/cpPlugins
[cpPlugins.git] / lib / cpPlugins / Interface / BaseMPRWindow.h
1 #ifndef __CPPLUGINS__INTERFACE__BASEMPRWINDOW__H__
2 #define __CPPLUGINS__INTERFACE__BASEMPRWINDOW__H__
3
4 #include <cpPlugins/Interface/cpPlugins_Interface_Export.h>
5 #include <cpPlugins/Interface/Config.h>
6
7 #ifdef cpPlugins_Interface_QT4
8
9 #include <QApplication>
10 #include <QMenu>
11 #include <QVTKWidget.h>
12
13 #include <vtkSmartPointer.h>
14 #include <cpExtensions/QT/QuadSplitter.h>
15 #include <cpExtensions/Visualization/MPRObjects.h>
16
17 namespace cpPlugins
18 {
19   namespace Interface
20   {
21     /**
22      */
23     class cpPlugins_Interface_EXPORT BaseMPRWindow
24       : public cpExtensions::QT::QuadSplitter
25     {
26       Q_OBJECT;
27
28     public:
29       typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
30
31       typedef TMPRObjects::TBaseStyle          TBaseStyle;
32       typedef TMPRObjects::TStyle              TStyle;
33       typedef TMPRObjects::TSlicesCommand      TSlicesCommand;
34       typedef TMPRObjects::TWindowLevelCommand TWindowLevelCommand;
35       typedef TMPRObjects::TMouseCommand       TMouseCommand;
36       typedef TMPRObjects::TMouseWheelCommand  TMouseWheelCommand;
37       typedef TMPRObjects::TKeyCommand         TKeyCommand;
38       typedef TMPRObjects::TVoidCommand        TVoidCommand;
39
40     public:
41       explicit BaseMPRWindow( QWidget* parent = 0 );
42       virtual ~BaseMPRWindow( );
43
44       // Some visualization accessors
45       bool ShowImage( vtkImageData* image );
46       bool ShowImage( vtkImageData* image, double r, double g, double b );
47       bool ShowMesh( vtkPolyData* mesh );
48       double GetWindow( ) const;
49       double GetLevel( ) const;
50       void ClearAll( );
51
52       // Some more visualization (3D)
53       void Add3DActor( vtkProp3D* prop );
54
55     protected:
56       vtkSmartPointer< TMPRObjects > m_MPRObjects;
57
58       QVTKWidget* m_XVTK;
59       QVTKWidget* m_YVTK;
60       QVTKWidget* m_ZVTK;
61       QVTKWidget* m_WVTK;
62     };
63
64   } // ecapseman
65
66 } // ecapseman
67
68 #endif // cpPlugins_Interface_QT4
69
70 #endif // __CPPLUGINS__INTERFACE__BASEMPRWINDOW__H__
71
72 // eof - $RCSfile$