]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/QT/ImageWidget.h
Start contour tracer widget debugging: change interactor style.
[cpPlugins.git] / lib / cpExtensions / QT / ImageWidget.h
1 #ifndef __cpExtensions__QT__ImageWidget__h__
2 #define __cpExtensions__QT__ImageWidget__h__
3
4 #include <cpExtensions/QT/RendererWidget.h>
5
6 #ifdef cpExtensions_QT4
7
8 // TODO: class vtkDataSet;
9
10 namespace cpExtensions
11 {
12   namespace Visualization
13   {
14     class ImageOutlineActor;
15     class WindowLevelImageActor;
16     /* TODO
17        class ImageSliceActors;
18        class ImageViewerActors;
19     */
20   }
21   namespace Interaction { class ImageSliceStyle; }
22
23   namespace QT
24   {
25     /**
26      */
27     class cpExtensions_EXPORT ImageWidget
28       : public RendererWidget
29     {
30       Q_OBJECT;
31
32     public:
33       typedef ImageWidget    Self;
34       typedef RendererWidget Superclass;
35
36       typedef cpExtensions::Visualization::ImageOutlineActor     TOLActor;
37       typedef cpExtensions::Visualization::WindowLevelImageActor TWLActor;
38       typedef cpExtensions::Interaction::ImageSliceStyle         TStyle;
39
40     public:
41       explicit ImageWidget( QWidget* parent = NULL, Qt::WindowFlags f = 0 );
42       virtual ~ImageWidget( );
43
44       void Clear( );
45       void SetImage(
46         vtkImageData* image, int orientation, const std::string& name
47         );
48
49       /* TODO
50          void SetImage(
51          vtkImageData* image, int orientation, const std::string& name
52          );
53          void Add( vtkDataSet* data, const std::string& name );
54
55          // TODO: std::vector< vtkProp* > GetActors( const std::string& name ) const;
56          int GetOrientation( ) const;
57          void SetSliceNumber( int slice );
58
59          virtual void ResetCamera( ) cpExtensions_OVERRIDE;
60
61          void GetScalarRange( double r[ 2 ] ) const;
62          void GetWindowLevel( double wl[ 2 ] ) const;
63          double GetImageOpacity( ) const;
64          unsigned char GetImageInterpolation( ) const;
65
66          void SetScalarRange( double r[ 2 ] );
67          void SetWindowLevel( double wl[ 2 ] );
68          void SetImageOpacity( double o );
69          void SetImageInterpolation( unsigned char i );
70
71          vtkProp* GetImageActor( );
72          const vtkProp* GetImageActor( ) const;
73       */
74
75     protected:
76       std::string m_ImageName;
77
78       vtkSmartPointer< TWLActor > m_WLActor;
79       vtkSmartPointer< TOLActor > m_OLActor;
80
81       vtkSmartPointer< TStyle > m_Style;
82
83       /* TODO
84          protected:
85          vtkSmartPointer< cpExtensions::Visualization::ImageViewerActors >
86          m_ImageViewerActors;
87          vtkSmartPointer< cpExtensions::Interaction::ImageSliceStyle >
88          m_ImageSliceStyle;
89          std::string m_ImageName;
90       */
91     };
92
93   } // ecapseman
94
95 } // ecapseman
96
97 #endif // cpExtensions_QT4
98
99 #endif // __cpExtensions__QT__ImageWidget__h__
100
101 // eof - $RCSfile$