]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/MPRActors.h
MPR objects updated
[cpPlugins.git] / lib / cpExtensions / Visualization / MPRActors.h
1 #ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
2 #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
3
4 #include <cpExtensions/cpExtensions_Export.h>
5 #include <cpExtensions/Visualization/ImageSliceActors.h>
6
7 namespace cpExtensions
8 {
9   namespace Visualization
10   {
11     /**
12      */
13     /*
14     class cpExtensions_EXPORT MPRActors
15       : public vtkPropCollection
16     {
17     public:
18       typedef MPRActors Self;
19
20       typedef ImageSliceActors::TStyle                   TStyle;
21       typedef ImageSliceActors::TMouseCommand            TMouseCommand;
22       typedef ImageSliceActors::TMouseWheelCommand       TMouseWheelCommand;
23       typedef ImageSliceActors::TKeyCommand              TKeyCommand;
24       typedef ImageSliceActors::TVoidCommand             TVoidCommand;
25       typedef ImageSliceActors::TMouseMoveCommand        TMouseMoveCommand;
26       typedef ImageSliceActors::TMouseClickCommand       TMouseClickCommand;
27       typedef ImageSliceActors::TMouseDoubleClickCommand TMouseDoubleClickCommand;
28       typedef ImageSliceActors::TExposeCommand           TExposeCommand;
29       typedef ImageSliceActors::TConfigureCommand        TConfigureCommand;
30       typedef ImageSliceActors::TEnterCommand            TEnterCommand;
31       typedef ImageSliceActors::TLeaveCommand            TLeaveCommand;
32
33     public:
34       vtkTypeMacro( MPRActors, vtkPropCollection );
35
36     public:
37       // Creation
38       static MPRActors* New( );
39
40       ImageSliceActors* GetSliceActors( const int& i ) const;
41
42       void SetInputConnection( vtkAlgorithmOutput* aout );
43       void SetInputImage( vtkImageData* data );
44       int AddBinaryConnection(
45         vtkAlgorithmOutput* aout,
46         const double& r, const double& g, const double& b
47         );
48       int AddBinaryImage(
49         vtkImageData* data,
50         const double& r, const double& g, const double& b
51         );
52       void Clear( );
53
54       vtkImageData* GetInputImage( );
55       const vtkImageData* GetInputImage( ) const;
56
57       unsigned int GetNumberOfImages( ) const;
58
59       void SetInterpolate( bool v );
60       void InterpolateOn( );
61       void InterpolateOff( );
62
63       void PushActorsInto(
64         vtkRenderWindow* x,
65         vtkRenderWindow* y,
66         vtkRenderWindow* z,
67         vtkRenderWindow* w
68         );
69       void PopActorsFrom(
70         vtkRenderWindow* x,
71         vtkRenderWindow* y,
72         vtkRenderWindow* z,
73         vtkRenderWindow* w
74         );
75
76       double GetMinWindow( ) const;
77       double GetMaxWindow( ) const;
78       double GetMinLevel( ) const;
79       double GetMaxLevel( ) const;
80       double GetWindow( );
81       double GetLevel( );
82       void SetWindow( double w );
83       void SetLevel( double l );
84       void SetWindowLevel( double w, double l );
85       void ResetWindowLevel( );
86
87       // Slice access
88       int GetSliceNumber( const int& axis ) const;
89       int GetSliceNumberMinValue( const int& axis ) const;
90       int GetSliceNumberMaxValue( const int& axis ) const;
91       void SetSliceNumber( const int& axis, const int& slice );
92       void SetSlice( const int& axis, double* pos );
93       void SetAxesCursor( const int& axis, double* pos );
94
95       // Rendering controls
96       void Render( const int& axis );
97       void Render( );
98       void ResetCamera( const int& axis );
99       void ResetCameras( );
100
101     protected:
102       MPRActors( );
103       virtual ~MPRActors( );
104
105       void _CreateBoundingBox( );
106
107       static void _SlicesCommand( double* pos, int axis, void* data );
108       static void _WindowLevelCommand(
109         double window, double level, void* data
110         );
111       static void _RenderCommand( void* data );
112
113     private:
114       // Purposely not implemented
115       MPRActors( const Self& );
116       Self& operator=( const Self& );
117
118     protected:
119       vtkSmartPointer< vtkActor >         ImageOutlineActor;
120       vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
121     };
122     */
123
124   } // ecapseman
125
126 } // ecapseman
127
128 #endif //  __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
129
130 // eof - $RCSfile$