]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPR3DActors.h
bc02490bee92da8463372c7f8bacce37fcb4a632
[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     protected:
61       MPR3DActors( );
62       virtual ~MPR3DActors( );
63
64     private:
65       // Purposely not implemented
66       MPR3DActors( const Self& );
67       Self& operator=( const Self& );
68
69     protected:
70       vtkSmartPointer< ImageSliceActors > m_Slices[ 3 ];
71       std::map< vtkSmartPointer< vtkPolyData >, TMeshActor > m_Meshes;
72     };
73
74   } // ecapseman
75
76 } // ecapseman
77
78 #endif // __cpExtensions__Visualization__MPR3DActors__h__
79
80 // eof - $RCSfile$