]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPR3DActors.h
yet another refactoring
[cpPlugins.git] / lib / cpExtensions / Visualization / MPR3DActors.h
1 #ifndef __cpExtensions__Visualization__MPR3DActors__h__
2 #define __cpExtensions__Visualization__MPR3DActors__h__
3
4 #include <cpExtensions/Config.h>
5 #include <cpExtensions/Visualization/MeshActor.h>
6 #include <vtkPropCollection.h>
7 #include <vtkSmartPointer.h>
8 #include <map>
9
10 // -------------------------------------------------------------------------
11 class vtkActor;
12 class vtkImageData;
13 class vtkPolyData;
14
15 // -------------------------------------------------------------------------
16 namespace cpExtensions
17 {
18   namespace Visualization
19   {
20     class ImageOutlineActor;
21     class ImageSliceActors;
22     class LUTImageActor;
23     class WindowLevelImageActor;
24
25     /**
26      */
27     class cpExtensions_EXPORT MPR3DActors
28       : public vtkPropCollection
29     {
30     public:
31       typedef MPR3DActors Self;
32
33       typedef cpExtensions::Visualization::MeshActor TMeshActor;
34
35     public:
36       vtkTypeMacro( MPR3DActors, vtkPropCollection );
37
38     public:
39       static Self* New( );
40
41       vtkImageData* GetImage( );
42       const vtkImageData* GetImage( ) const;
43
44       WindowLevelImageActor* GetWindowLevelImageActor( int o );
45       const WindowLevelImageActor* GetWindowLevelImageActor( int o ) const;
46
47       LUTImageActor* GetLUTImageActor( int o );
48       const LUTImageActor* GetLUTImageActor( int o ) const;
49
50       ImageOutlineActor* GetImageOutlineActor( int o );
51       const ImageOutlineActor* GetImageOutlineActor( int o ) const;
52
53       int GetSliceNumber( int o ) const;
54       virtual void SetImage( vtkImageData* image );
55       virtual unsigned int AddLUTImage( vtkImageData* image );
56       virtual void SetSliceNumber( int o, int s );
57
58       virtual vtkActor* AddMesh( vtkPolyData* mesh );
59
60       void SetScalarRange( double r[ 2 ] );
61       void SetWindowLevel( double wl[ 2 ] );
62       void SetImageOpacity( double o );
63       void SetImageInterpolation( unsigned char i );
64
65     protected:
66       MPR3DActors( );
67       virtual ~MPR3DActors( );
68
69     private:
70       // Purposely not implemented
71       MPR3DActors( const Self& );
72       Self& operator=( const Self& );
73
74     protected:
75       vtkSmartPointer< ImageSliceActors > m_Slices[ 3 ];
76       std::map< vtkSmartPointer< vtkPolyData >, TMeshActor > m_Meshes;
77     };
78
79   } // ecapseman
80
81 } // ecapseman
82
83 #endif // __cpExtensions__Visualization__MPR3DActors__h__
84
85 // eof - $RCSfile$