]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPRObjects.h
a348e91513d15c4379091677f4621ee48f3041f1
[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 #include <cpExtensions/Visualization/ImageInteractorStyle.h>
7
8 #include <vtkObject.h>
9 #include <vtkRenderer.h>
10 #include <vtkRenderWindow.h>
11
12 namespace cpExtensions
13 {
14   namespace Visualization
15   {
16     /**
17      */
18     class cpExtensions_EXPORT MPRObjects
19       : public vtkObject
20     {
21     public:
22       typedef MPRObjects Self;
23       typedef cpExtensions::Visualization::MPRActors            TMPRActors;
24       typedef cpExtensions::Visualization::ImageInteractorStyle TStyle;
25
26     public:
27       vtkTypeMacro( MPRObjects, vtkObject );
28
29     public:
30       // Creation
31       static MPRObjects* New( );
32
33       void SetRenderWindows(
34         vtkRenderWindow* wx, vtkRenderWindow* wy,
35         vtkRenderWindow* wz, vtkRenderWindow* w3D
36         );
37       void SetImage( vtkImageData* image );
38       void ActivateInteractors( );
39
40       void ResetCamera( const int& id );
41       void ResetCameras( );
42       void Render( const int& id );
43       void RenderAll( );
44       vtkRenderer* GetXRenderer( );
45       vtkRenderer* GetYRenderer( );
46       vtkRenderer* GetZRenderer( );
47       vtkRenderer* Get3DRenderer( );
48       const vtkRenderer* GetXRenderer( ) const;
49       const vtkRenderer* GetYRenderer( ) const;
50       const vtkRenderer* GetZRenderer( ) const;
51       const vtkRenderer* Get3DRenderer( ) const;
52
53     protected:
54       MPRObjects( );
55       virtual ~MPRObjects( );
56
57     private:
58       // Purposely not implemented
59       MPRObjects( const Self& );
60       Self& operator=( const Self& );
61
62     protected:
63       // Inputs
64       vtkSmartPointer< vtkRenderWindow > m_Windows[ 4 ];
65
66       // Internal pipelines
67       vtkSmartPointer< TMPRActors >  m_MPRActors;
68       vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ];
69       vtkSmartPointer< TStyle >      m_Styles[ 3 ];
70     };
71
72   } // ecapseman
73
74 } // ecapseman
75
76 #endif //  __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__
77
78 // eof - $RCSfile$