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 );
45 void SetInputConnection( vtkAlgorithmOutput* aout );
46 void SetInputData( vtkImageData* image );
62 // Lookup table methods
63 void SetLookupTable( unsigned int i, vtkScalarsToColors* lut );
64 vtkScalarsToColors* GetLookupTable( unsigned int i ) const;
66 // Grayscale window/level lookup
67 void SetLookupTableToWindowLevel( unsigned int i );
68 double GetMinWindow( unsigned int i ) const;
69 double GetMaxWindow( unsigned int i ) const;
70 double GetMinLevel( unsigned int i ) const;
71 double GetMaxLevel( unsigned int i ) const;
72 double GetWindow( unsigned int i ) const;
73 double GetLevel( unsigned int i ) const;
74 void SetWindow( unsigned int i, const double& w );
75 void SetLevel( unsigned int i, const double& l );
76 void ResetWindowLevel( unsigned int i );
79 int GetSliceNumberMinValue( const int& axis ) const;
80 int GetSliceNumberMaxValue( const int& axis ) const;
81 int GetSlice( const int& axis ) const;
82 void SetSlice( const int& axis, const int& slice );
83 void SetSlice( const int& axis, const double& slice );
88 virtual ~MPRActors( );
90 vtkImageData* _Image( unsigned int i ) const;
91 void _Update( unsigned int i );
94 // Purposely not implemented
95 MPRActors( const Self& );
96 Self& operator=( const Self& );
99 std::vector< vtkSmartPointer< vtkImageMapToColors > > ImageMaps;
100 vtkSmartPointer< vtkActor > ImageOutlineActor;
101 vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ];
108 #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__