]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPRObjects.h
More widgets added
[cpPlugins.git] / lib / cpExtensions / Visualization / MPRObjects.h
1 #ifndef __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__
2 #define __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__
3
4 #include <cpExtensions/cpExtensions_Export.h>
5 #include <cpExtensions/Visualization/MPRActors.h>
6
7 #include <vtkObject.h>
8 #include <vtkRenderer.h>
9 #include <vtkRenderWindow.h>
10
11 namespace cpExtensions
12 {
13   namespace Visualization
14   {
15     /**
16      */
17     class cpExtensions_EXPORT MPRObjects
18       : public vtkObject
19     {
20     public:
21       typedef MPRObjects Self;
22
23       typedef MPRActors::TBaseStyle          TBaseStyle;
24       typedef MPRActors::TStyle              TStyle;
25       typedef MPRActors::TSlicesCommand      TSlicesCommand;
26       typedef MPRActors::TWindowLevelCommand TWindowLevelCommand;
27       typedef MPRActors::TMouseCommand       TMouseCommand;
28       typedef MPRActors::TMouseWheelCommand  TMouseWheelCommand;
29       typedef MPRActors::TKeyCommand         TKeyCommand;
30       typedef MPRActors::TVoidCommand        TVoidCommand;
31
32     public:
33       vtkTypeMacro( MPRObjects, vtkObject );
34
35     public:
36       // Creation
37       static MPRObjects* New( );
38
39       void SetRenderWindows(
40         vtkRenderWindow* wx, vtkRenderWindow* wy,
41         vtkRenderWindow* wz, vtkRenderWindow* w3D
42         );
43       void AddImage( vtkImageData* image );
44       void ClearAll( );
45
46       void ResetCamera( const int& id );
47       void ResetCameras( );
48       void Render( const int& id );
49       void RenderAll( );
50       vtkRenderer* GetXRenderer( );
51       vtkRenderer* GetYRenderer( );
52       vtkRenderer* GetZRenderer( );
53       vtkRenderer* Get3DRenderer( );
54       const vtkRenderer* GetXRenderer( ) const;
55       const vtkRenderer* GetYRenderer( ) const;
56       const vtkRenderer* GetZRenderer( ) const;
57       const vtkRenderer* Get3DRenderer( ) const;
58
59       MPRActors* GetMPRActors( );
60       const MPRActors* GetMPRActors( ) const;
61
62       double GetWindow( ) const;
63       double GetLevel( ) const;
64
65     protected:
66       MPRObjects( );
67       virtual ~MPRObjects( );
68
69     private:
70       // Purposely not implemented
71       MPRObjects( const Self& );
72       Self& operator=( const Self& );
73
74     protected:
75       // Inputs
76       vtkSmartPointer< vtkRenderWindow > m_Windows[ 4 ];
77
78       // Internal pipelines
79       vtkSmartPointer< MPRActors >   m_MPRActors;
80       vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ];
81     };
82
83   } // ecapseman
84
85 } // ecapseman
86
87 #endif //  __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__
88
89 // eof - $RCSfile$