]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPRObjects.h
Double click widget integrated with segmentation and deformation filters.
[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       void ClearAll( );
49
50       void ResetCamera( const int& id );
51       void ResetCameras( );
52       void Render( const int& id, const double& t );
53       void RenderAll( const double& t );
54       vtkRenderer* GetXRenderer( );
55       vtkRenderer* GetYRenderer( );
56       vtkRenderer* GetZRenderer( );
57       vtkRenderer* Get3DRenderer( );
58       const vtkRenderer* GetXRenderer( ) const;
59       const vtkRenderer* GetYRenderer( ) const;
60       const vtkRenderer* GetZRenderer( ) const;
61       const vtkRenderer* Get3DRenderer( ) const;
62
63       MPRActors* GetMPRActors( );
64       const MPRActors* GetMPRActors( ) const;
65
66       double GetWindow( ) const;
67       double GetLevel( ) const;
68
69     protected:
70       MPRObjects( );
71       virtual ~MPRObjects( );
72
73     private:
74       // Purposely not implemented
75       MPRObjects( const Self& );
76       Self& operator=( const Self& );
77
78     protected:
79       // Inputs
80       vtkSmartPointer< vtkRenderWindow > m_Windows[ 4 ];
81
82       // Internal pipelines
83       vtkSmartPointer< MPRActors >   m_MPRActors;
84       vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ];
85     };
86
87   } // ecapseman
88
89 } // ecapseman
90
91 #endif //  __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__
92
93 // eof - $RCSfile$