1 #ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
2 #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__
6 #include <cpExtensions/cpExtensions_Export.h>
7 #include <cpExtensions/Visualization/ImageSliceActors.h>
10 #include <vtkSmartPointer.h>
12 #include <vtkImageMapToColors.h>
15 // -------------------------------------------------------------------------
17 class vtkAlgorithmOutput;
20 class vtkScalarsToColors;
23 // -------------------------------------------------------------------------
24 namespace cpExtensions
26 namespace Visualization
30 class cpExtensions_EXPORT MPRActors
31 : public vtkPropCollection
34 typedef MPRActors Self;
37 vtkTypeMacro( MPRActors, vtkPropCollection );
41 static MPRActors* New( );
43 ImageSliceActors* GetSliceActors( const int& i ) const;
45 int AddInputConnection(
46 vtkAlgorithmOutput* aout,
47 ImageSliceActors::LUTType lut = ImageSliceActors::LUTType_WindowLevel
51 ImageSliceActors::LUTType lut = ImageSliceActors::LUTType_WindowLevel
67 // Lookup table methods
68 void SetLookupTable( unsigned int i, vtkScalarsToColors* lut );
69 vtkScalarsToColors* GetLookupTable( unsigned int i ) const;
71 // Grayscale window/level lookup
72 void SetLookupTableToWindowLevel( unsigned int i );
73 double GetMinWindow( unsigned int i ) const;
74 double GetMaxWindow( unsigned int i ) const;
75 double GetMinLevel( unsigned int i ) const;
76 double GetMaxLevel( unsigned int i ) const;
77 double GetWindow( unsigned int i ) const;
78 double GetLevel( unsigned int i ) const;
79 void SetWindow( unsigned int i, const double& w );
80 void SetLevel( unsigned int i, const double& l );
81 void SetWindowLevel( unsigned int i, const double& w, const double& l );
82 void ResetWindowLevel( unsigned int i );
85 void SetLookupTableToColor(
87 const double& r = double( 1 ),
88 const double& g = double( 0 ),
89 const double& b = double( 0 )
93 int GetSliceNumberMinValue( const int& axis ) const;
94 int GetSliceNumberMaxValue( const int& axis ) const;
95 int GetSlice( const int& axis ) const;
96 void SetSlice( const int& axis, const int& slice );
97 void SetSlice( const int& axis, const double& slice );
102 virtual ~MPRActors( );
104 vtkImageData* _Image( unsigned int i ) const;
105 void _Update( unsigned int i );
108 // Purposely not implemented
109 MPRActors( const Self& );
110 Self& operator=( const Self& );
113 // TODO: std::vector< vtkSmartPointer< vtkImageMapToColors > > ImageMaps;
114 vtkSmartPointer< vtkActor > ImageOutlineActor;
115 vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
122 #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__