1 #ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
2 #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
4 #include <cpExtensions/cpExtensions_Export.h>
5 #include <cpExtensions/Visualization/ImageSliceActors.h>
9 namespace Visualization
14 class cpExtensions_EXPORT MPRActors
15 : public vtkPropCollection
18 typedef MPRActors Self;
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;
34 vtkTypeMacro( MPRActors, vtkPropCollection );
38 static MPRActors* New( );
40 ImageSliceActors* GetSliceActors( const int& i ) const;
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
50 const double& r, const double& g, const double& b
54 vtkImageData* GetInputImage( );
55 const vtkImageData* GetInputImage( ) const;
57 unsigned int GetNumberOfImages( ) const;
59 void SetInterpolate( bool v );
60 void InterpolateOn( );
61 void InterpolateOff( );
76 double GetMinWindow( ) const;
77 double GetMaxWindow( ) const;
78 double GetMinLevel( ) const;
79 double GetMaxLevel( ) const;
82 void SetWindow( double w );
83 void SetLevel( double l );
84 void SetWindowLevel( double w, double l );
85 void ResetWindowLevel( );
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 );
96 void Render( const int& axis );
98 void ResetCamera( const int& axis );
103 virtual ~MPRActors( );
105 void _CreateBoundingBox( );
107 static void _SlicesCommand( double* pos, int axis, void* data );
108 static void _WindowLevelCommand(
109 double window, double level, void* data
111 static void _RenderCommand( void* data );
114 // Purposely not implemented
115 MPRActors( const Self& );
116 Self& operator=( const Self& );
119 vtkSmartPointer< vtkActor > ImageOutlineActor;
120 vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
128 #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__