]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/QT/MPR3DWidget.h
Spline widget added.
[cpPlugins.git] / lib / cpExtensions / QT / MPR3DWidget.h
1 #ifndef __cpExtensions__QT__MPR3DWidget__h__
2 #define __cpExtensions__QT__MPR3DWidget__h__
3
4 #include <cpExtensions/QT/RendererWidget.h>
5
6 #ifdef cpExtensions_QT4
7
8 // -------------------------------------------------------------------------
9 class vtkDataSet;
10
11 // -------------------------------------------------------------------------
12 namespace cpExtensions
13 {
14   namespace Visualization
15   {
16     class ImageOutlineActor;
17     class WindowLevelImageActor;
18   }
19
20   namespace QT
21   {
22     /**
23      */
24     class cpExtensions_EXPORT MPR3DWidget
25       : public cpExtensions::QT::RendererWidget
26     {
27       Q_OBJECT;
28
29     public:
30       typedef MPR3DWidget                      Self;
31       typedef cpExtensions::QT::RendererWidget Superclass;
32
33       typedef cpExtensions::Visualization::ImageOutlineActor     TOLActor;
34       typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
35
36     public:
37       explicit MPR3DWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
38       virtual ~MPR3DWidget( );
39
40       void Clear( );
41       void SetImage( vtkImageData* image, const std::string& name );
42
43       TWLActor* GetImageActor( int o );
44       const TWLActor* GetImageActor( int o ) const;
45
46       void SetSliceNumber( int orientation, int slice );
47       void SetSlicesNumbers( int x, int y, int z );
48
49       /* TODO
50          void SetImage( vtkImageData* image, const std::string& name );
51          void Add( vtkDataSet* data, const std::string& name );
52
53
54          void SetScalarRange( double r[ 2 ] );
55          void SetWindowLevel( double wl[ 2 ] );
56          void SetImageOpacity( double o );
57          void SetImageInterpolation( unsigned char i );
58       */
59
60     protected:
61       std::string m_ImageName;
62
63       vtkSmartPointer< TWLActor > m_WLActors[ 3 ];
64       vtkSmartPointer< TOLActor > m_OLActors[ 3 ];
65
66       /* TODO
67          vtkSmartPointer< cpExtensions::Visualization::MPR3DActors > m_Actors;
68          std::string m_ImageName;
69       */
70     };
71
72   } // ecapseman
73
74 } // ecapseman
75
76 #endif // cpExtensions_QT4
77
78 #endif // __cpExtensions__QT__MPR3DWidget__h__
79
80 // eof - $RCSfile$