]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPRObjects.h
c21fca66f55e2fc36614e1442e502ad0c6af86a7
[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::TStyle                   TStyle;
24       typedef MPRActors::TMouseCommand            TMouseCommand;
25       typedef MPRActors::TMouseWheelCommand       TMouseWheelCommand;
26       typedef MPRActors::TKeyCommand              TKeyCommand;
27       typedef MPRActors::TVoidCommand             TVoidCommand;
28       typedef MPRActors::TMouseMoveCommand        TMouseMoveCommand;
29       typedef MPRActors::TMouseClickCommand       TMouseClickCommand;
30       typedef MPRActors::TMouseDoubleClickCommand TMouseDoubleClickCommand;
31       typedef MPRActors::TExposeCommand           TExposeCommand;
32       typedef MPRActors::TConfigureCommand        TConfigureCommand;
33       typedef MPRActors::TEnterCommand            TEnterCommand;
34       typedef MPRActors::TLeaveCommand            TLeaveCommand;
35
36     public:
37       vtkTypeMacro( MPRObjects, vtkObject );
38
39     public:
40       // Creation
41       static MPRObjects* New( );
42
43       void SetRenderWindows(
44         vtkRenderWindow* wx, vtkRenderWindow* wy,
45         vtkRenderWindow* wz, vtkRenderWindow* w3D
46         );
47       void AddImage( vtkImageData* image );
48       unsigned int GetNumberOfImages( ) const;
49       void ClearAll( );
50
51       void ResetCamera( const int& id );
52       void ResetCameras( );
53       void Render( const int& id, const double& t );
54       void RenderAll( const double& t );
55       vtkRenderer* GetXRenderer( );
56       vtkRenderer* GetYRenderer( );
57       vtkRenderer* GetZRenderer( );
58       vtkRenderer* Get3DRenderer( );
59       const vtkRenderer* GetXRenderer( ) const;
60       const vtkRenderer* GetYRenderer( ) const;
61       const vtkRenderer* GetZRenderer( ) const;
62       const vtkRenderer* Get3DRenderer( ) const;
63
64       MPRActors* GetMPRActors( );
65       const MPRActors* GetMPRActors( ) const;
66
67       double GetWindow( ) const;
68       double GetLevel( ) const;
69
70     protected:
71       MPRObjects( );
72       virtual ~MPRObjects( );
73
74     private:
75       // Purposely not implemented
76       MPRObjects( const Self& );
77       Self& operator=( const Self& );
78
79     protected:
80       // Inputs
81       vtkSmartPointer< vtkRenderWindow > m_Windows[ 4 ];
82
83       // Internal pipelines
84       vtkSmartPointer< MPRActors >   m_MPRActors;
85       vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ];
86     };
87
88   } // ecapseman
89
90 } // ecapseman
91
92 #endif //  __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__
93
94 // eof - $RCSfile$