]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPRObjects.h
Widget integration (step 5/6): generic widget controller finished and tested on linux...
[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       typedef cpExtensions::Visualization::MPRActors TMPRActors;
23
24     public:
25       vtkTypeMacro( MPRObjects, vtkObject );
26
27     public:
28       // Creation
29       static MPRObjects* New( );
30
31       void SetRenderWindows(
32         vtkRenderWindow* wx, vtkRenderWindow* wy,
33         vtkRenderWindow* wz, vtkRenderWindow* w3D
34         );
35       void SetImage( vtkImageData* image );
36       void AddAuxiliaryImage( vtkImageData* image );
37       void ActivateInteractors( );
38
39       void ResetCamera( const int& id );
40       void ResetCameras( );
41       void Render( const int& id );
42       void RenderAll( );
43       vtkRenderer* GetXRenderer( );
44       vtkRenderer* GetYRenderer( );
45       vtkRenderer* GetZRenderer( );
46       vtkRenderer* Get3DRenderer( );
47       const vtkRenderer* GetXRenderer( ) const;
48       const vtkRenderer* GetYRenderer( ) const;
49       const vtkRenderer* GetZRenderer( ) const;
50       const vtkRenderer* Get3DRenderer( ) const;
51
52       TMPRActors* GetMPRActors( );
53       const TMPRActors* GetMPRActors( ) const;
54
55     protected:
56       MPRObjects( );
57       virtual ~MPRObjects( );
58
59     private:
60       // Purposely not implemented
61       MPRObjects( const Self& );
62       Self& operator=( const Self& );
63
64     protected:
65       // Inputs
66       vtkSmartPointer< vtkRenderWindow > m_Windows[ 4 ];
67
68       // Internal pipelines
69       vtkSmartPointer< TMPRActors >  m_MPRActors;
70       vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ];
71     };
72
73   } // ecapseman
74
75 } // ecapseman
76
77 #endif //  __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__
78
79 // eof - $RCSfile$