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
13 class cpExtensions_EXPORT MPRActors
14 : public vtkPropCollection
17 typedef MPRActors Self;
19 typedef ImageSliceActors::TStyle TStyle;
20 typedef ImageSliceActors::TMouseCommand TMouseCommand;
21 typedef ImageSliceActors::TMouseWheelCommand TMouseWheelCommand;
22 typedef ImageSliceActors::TKeyCommand TKeyCommand;
23 typedef ImageSliceActors::TVoidCommand TVoidCommand;
24 typedef ImageSliceActors::TMouseMoveCommand TMouseMoveCommand;
25 typedef ImageSliceActors::TMouseClickCommand TMouseClickCommand;
26 typedef ImageSliceActors::TMouseDoubleClickCommand TMouseDoubleClickCommand;
27 typedef ImageSliceActors::TExposeCommand TExposeCommand;
28 typedef ImageSliceActors::TConfigureCommand TConfigureCommand;
29 typedef ImageSliceActors::TEnterCommand TEnterCommand;
30 typedef ImageSliceActors::TLeaveCommand TLeaveCommand;
33 vtkTypeMacro( MPRActors, vtkPropCollection );
37 static MPRActors* New( );
39 ImageSliceActors* GetSliceActors( const int& i ) const;
41 void SetInputConnection( vtkAlgorithmOutput* aout );
42 void SetInputImage( vtkImageData* data );
43 int AddBinaryConnection(
44 vtkAlgorithmOutput* aout,
45 const double& r, const double& g, const double& b
49 const double& r, const double& g, const double& b
53 vtkImageData* GetInputImage( );
54 const vtkImageData* GetInputImage( ) const;
56 unsigned int GetNumberOfImages( ) const;
58 void SetInterpolate( bool v );
59 void InterpolateOn( );
60 void InterpolateOff( );
75 double GetMinWindow( ) const;
76 double GetMaxWindow( ) const;
77 double GetMinLevel( ) const;
78 double GetMaxLevel( ) const;
81 void SetWindow( double w );
82 void SetLevel( double l );
83 void SetWindowLevel( double w, double l );
84 void ResetWindowLevel( );
87 int GetSliceNumber( const int& axis ) const;
88 int GetSliceNumberMinValue( const int& axis ) const;
89 int GetSliceNumberMaxValue( const int& axis ) const;
90 void SetSliceNumber( const int& axis, const int& slice );
91 void SetSlice( const int& axis, double* pos );
95 virtual ~MPRActors( );
97 void _CreateBoundingBox( );
99 static void _SlicesCommand( double* pos, int axis, void* data );
100 static void _WindowLevelCommand(
101 double window, double level, void* data
103 static void _RenderCommand( void* data );
106 // Purposely not implemented
107 MPRActors( const Self& );
108 Self& operator=( const Self& );
111 vtkSmartPointer< vtkActor > ImageOutlineActor;
112 vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
119 #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__