#ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ #include #include #include /* #include #include #include */ // ------------------------------------------------------------------------- /* class vtkAlgorithmOutput; class vtkImageData; class vtkRenderer; class vtkScalarsToColors; */ // ------------------------------------------------------------------------- namespace cpExtensions { namespace Visualization { /** */ class cpExtensions_EXPORT MPRActors : public vtkPropCollection { public: typedef MPRActors Self; public: vtkTypeMacro( MPRActors, vtkPropCollection ); public: // Creation static MPRActors* New( ); ImageSliceActors* GetSliceActors( const int& i ) const; int AddInputConnection( vtkAlgorithmOutput* aout, ImageSliceActors::LUTType lut = ImageSliceActors::LUTType_WindowLevel ); int AddInputData( vtkImageData* image, ImageSliceActors::LUTType lut = ImageSliceActors::LUTType_WindowLevel ); void PushActorsInto( vtkRenderWindow* x, vtkRenderWindow* y, vtkRenderWindow* z, vtkRenderWindow* w ); void PopDataFrom( vtkRenderer* x, vtkRenderer* y, vtkRenderer* z, vtkRenderer* w ); // Lookup table methods void SetLookupTable( unsigned int i, vtkScalarsToColors* lut ); vtkScalarsToColors* GetLookupTable( unsigned int i ) const; // Grayscale window/level lookup void SetLookupTableToWindowLevel( unsigned int i ); double GetMinWindow( unsigned int i ) const; double GetMaxWindow( unsigned int i ) const; double GetMinLevel( unsigned int i ) const; double GetMaxLevel( unsigned int i ) const; double GetWindow( unsigned int i ) const; double GetLevel( unsigned int i ) const; void SetWindow( unsigned int i, const double& w ); void SetLevel( unsigned int i, const double& l ); void SetWindowLevel( unsigned int i, const double& w, const double& l ); void ResetWindowLevel( unsigned int i ); // Color lookup table void SetLookupTableToColor( unsigned int i, const double& r = double( 1 ), const double& g = double( 0 ), const double& b = double( 0 ) ); // Slice access int GetSliceNumberMinValue( const int& axis ) const; int GetSliceNumberMaxValue( const int& axis ) const; int GetSlice( const int& axis ) const; void SetSlice( const int& axis, const int& slice ); void SetSlice( const int& axis, const double& slice ); void ResetSlices( ); protected: MPRActors( ); virtual ~MPRActors( ); vtkImageData* _Image( unsigned int i ) const; void _Update( unsigned int i ); static void _SetSlices( double* pos, int axis, void* data ); private: // Purposely not implemented MPRActors( const Self& ); Self& operator=( const Self& ); protected: // TODO: std::vector< vtkSmartPointer< vtkImageMapToColors > > ImageMaps; vtkSmartPointer< vtkActor > ImageOutlineActor; vtkSmartPointer< ImageSliceActors > Slices[ 2 ][ 3 ]; }; } // ecapseman } // ecapseman #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ // eof - $RCSfile$