#ifndef __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ #define __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ #include #include #include #include // ------------------------------------------------------------------------- class vtkAlgorithmOutput; class vtkImageData; class vtkRenderer; class vtkScalarsToColors; class vtkWindowLevelLookupTable; // ------------------------------------------------------------------------- namespace cpExtensions { namespace Visualization { /** */ class cpExtensions_EXPORT MPRActors : public vtkPropCollection { public: typedef MPRActors Self; public: vtkTypeMacro( MPRActors, vtkPropCollection ); cpPlugins_ImageSliceActors( ImageOutline, vtkImageActor ); public: // Creation static MPRActors* New( ); ImageSliceActors* GetSliceActors( const int& i ) const; void SetInputConnection( vtkAlgorithmOutput* aout ); void SetInputData( vtkImageData* image ); void PushDataInto( vtkRenderer* x, vtkRenderer* y, vtkRenderer* z, vtkRenderer* w ); void PopDataFrom( vtkRenderer* x, vtkRenderer* y, vtkRenderer* z, vtkRenderer* w ); // Lookup table methods vtkScalarsToColors* GetLookupTable( ) const; void SetLookupTable( vtkScalarsToColors* lut ); // Grayscale window/level lookup vtkWindowLevelLookupTable* GetLookupTableAsWindowLevel( ) const; void SetLookupTableToWindowLevel( ); double GetMinWindow( ) const; double GetMaxWindow( ) const; double GetMinLevel( ) const; double GetMaxLevel( ) const; double GetWindow( ) const; double GetLevel( ) const; void SetWindow( const double& w ); void SetLevel( const double& l ); void SetWindowLevel( const double& w, const double& l ); void ResetWindowLevel( ); // 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( ); // General accessors void GetImageBounds( double bounds[ 6 ] ) const; protected: MPRActors( ); virtual ~MPRActors( ); vtkImageData* _InputImage( ) const; void _UpdateSlices( ); private: // Purposely not implemented MPRActors( const Self& ); Self& operator=( const Self& ); protected: vtkSmartPointer< vtkImageMapToColors > ImageMapToColors; vtkSmartPointer< vtkActor > ImageOutlineActor; typedef cpExtensions::Visualization::ImageSliceActors _TSlice; vtkSmartPointer< _TSlice > Slices[ 3 ]; unsigned int ImageOutlineActorIndex; }; } // ecapseman } // ecapseman #endif // __CPEXTENSIONS__VISUALIZATION__MPRACTORS__H__ // eof - $RCSfile$