1 #ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
2 #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
6 #include <cpExtensions/cpExtensions_Export.h>
7 #include <cpExtensions/Visualization/ImageSliceActors.h>
9 #include <vtkSmartPointer.h>
11 #include <vtkImageMapToColors.h>
13 // -------------------------------------------------------------------------
14 class vtkAlgorithmOutput;
17 class vtkScalarsToColors;
19 // -------------------------------------------------------------------------
20 namespace cpExtensions
22 namespace Visualization
26 class cpExtensions_EXPORT MPRActors
27 : public vtkPropCollection
30 typedef MPRActors Self;
33 vtkTypeMacro( MPRActors, vtkPropCollection );
37 static MPRActors* New( );
39 ImageSliceActors* GetSliceActors( const int& i ) const;
41 int AddInputConnection( vtkAlgorithmOutput* aout );
42 int AddInputData( vtkImageData* image );
56 void LinkInteractors( );
58 // Lookup table methods
59 void SetLookupTable( unsigned int i, vtkScalarsToColors* lut );
60 vtkScalarsToColors* GetLookupTable( unsigned int i ) const;
62 // Grayscale window/level lookup
63 void SetLookupTableToWindowLevel( unsigned int i );
64 double GetMinWindow( unsigned int i ) const;
65 double GetMaxWindow( unsigned int i ) const;
66 double GetMinLevel( unsigned int i ) const;
67 double GetMaxLevel( unsigned int i ) const;
68 double GetWindow( unsigned int i ) const;
69 double GetLevel( unsigned int i ) const;
70 void SetWindow( unsigned int i, const double& w );
71 void SetLevel( unsigned int i, const double& l );
72 void SetWindowLevel( unsigned int i, const double& w, const double& l );
73 void ResetWindowLevel( unsigned int i );
76 void SetLookupTableToColor(
78 const double& r = double( 1 ),
79 const double& g = double( 0 ),
80 const double& b = double( 0 )
84 int GetSliceNumberMinValue( const int& axis ) const;
85 int GetSliceNumberMaxValue( const int& axis ) const;
86 int GetSlice( const int& axis ) const;
87 void SetSlice( const int& axis, const int& slice );
88 void SetSlice( const int& axis, const double& slice );
93 virtual ~MPRActors( );
95 vtkImageData* _Image( unsigned int i ) const;
96 void _Update( unsigned int i );
99 // Purposely not implemented
100 MPRActors( const Self& );
101 Self& operator=( const Self& );
104 std::vector< vtkSmartPointer< vtkImageMapToColors > > ImageMaps;
105 vtkSmartPointer< vtkActor > ImageOutlineActor;
106 vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
113 #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__