#ifndef __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__ #define __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__ #include #include #include #include #include // ------------------------------------------------------------------------- #define cpExtensions_MPRObjects_Renderer( DIR ) \ inline vtkRenderer* Get##DIR##Renderer( ) \ { return( this->m_Renderers[ Self::MPRDirections_##DIR ] ); } \ inline const vtkRenderer* Get##DIR##Renderer( ) const \ { return( this->m_Renderers[ Self::MPRDirections_##DIR ] ); } namespace cpExtensions { namespace Visualization { /** */ class cpExtensions_EXPORT MPRObjects : public vtkObject { public: typedef MPRObjects Self; typedef MPRActors::TStyle TStyle; typedef MPRActors::TMouseCommand TMouseCommand; typedef MPRActors::TMouseWheelCommand TMouseWheelCommand; typedef MPRActors::TKeyCommand TKeyCommand; typedef MPRActors::TVoidCommand TVoidCommand; typedef MPRActors::TMouseMoveCommand TMouseMoveCommand; typedef MPRActors::TMouseClickCommand TMouseClickCommand; typedef MPRActors::TMouseDoubleClickCommand TMouseDoubleClickCommand; typedef MPRActors::TExposeCommand TExposeCommand; typedef MPRActors::TConfigureCommand TConfigureCommand; typedef MPRActors::TEnterCommand TEnterCommand; typedef MPRActors::TLeaveCommand TLeaveCommand; enum MPRDirections { MPRDirections_X = 0, MPRDirections_Y = 1, MPRDirections_Z = 2, MPRDirections_W = 3 }; public: vtkTypeMacro( MPRObjects, vtkObject ); cpExtensions_MPRObjects_Renderer( X ); cpExtensions_MPRObjects_Renderer( Y ); cpExtensions_MPRObjects_Renderer( Z ); cpExtensions_MPRObjects_Renderer( W ); public: // Creation static MPRObjects* New( ); // Association void SetRenderWindows( vtkRenderWindow* x, vtkRenderWindow* y, vtkRenderWindow* z, vtkRenderWindow* w ); void SetInputConnection( vtkAlgorithmOutput* aout ); void SetInputImage( vtkImageData* data ); int AddBinaryConnection( vtkAlgorithmOutput* aout, const double& r, const double& g, const double& b ); int AddBinaryImage( vtkImageData* data, const double& r, const double& g, const double& b ); void Show( ); void Hide( ); void Clear( ); vtkImageData* GetInputImage( ); const vtkImageData* GetInputImage( ) const; unsigned int GetNumberOfImages( ) const; void SetInterpolate( bool v ); void InterpolateOn( ); void InterpolateOff( ); double GetMinWindow( ) const; double GetMaxWindow( ) const; double GetMinLevel( ) const; double GetMaxLevel( ) const; double GetWindow( ) const; double GetLevel( ) const; void SetWindow( double w ); void SetLevel( double l ); void SetWindowLevel( double w, double l ); void ResetWindowLevel( ); int GetSliceNumber( const int& axis ) const; int GetSliceNumberMinValue( const int& axis ) const; int GetSliceNumberMaxValue( const int& axis ) const; void SetSliceNumber( const int& axis, const int& slice ); void SetSlice( const int& axis, double* pos ); void Render( const double& t ); void Render( const int& axis, const double& t ); void ResetCamera( const int& axis ); void ResetCameras( ); protected: MPRObjects( ); virtual ~MPRObjects( ); private: // Purposely not implemented MPRObjects( const Self& ); Self& operator=( const Self& ); protected: // Inputs vtkSmartPointer< vtkRenderWindow > m_Windows[ 4 ]; // Internal pipelines vtkSmartPointer< MPRActors > m_MPRActors; vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ]; }; } // ecapseman } // ecapseman #endif // __CPEXTENSIONS__VISUALIZATION__MPROBJECTS__H__ // eof - $RCSfile$