#ifndef __CPPLUGINS__EXTENSIONS__VISUALIZATION__MPRWITHDIFFERENTWINDOWS__H__ #define __CPPLUGINS__EXTENSIONS__VISUALIZATION__MPRWITHDIFFERENTWINDOWS__H__ #include #include #include #include #include #include #include // ------------------------------------------------------------------------- #define cpPlugins_MPRWithDifferentWindows_ObserverMacro( e ) \ inline void Add##e##Observer( vtkCommand* observer ) \ { \ for( int i = 0; i < 3; ++i ) \ if( this->m_Styles[ i ].GetPointer( ) != NULL ) \ this->m_Styles[ i ]->Add##e##Observer( observer ); \ } \ inline void Remove##e##Observer( vtkCommand* observer ) \ { \ for( int i = 0; i < 3; ++i ) \ if( this->m_Styles[ i ].GetPointer( ) != NULL ) \ this->m_Styles[ i ]->Remove##e##Observer( observer ); \ } \ inline void Remove##e##Observers( ) \ { \ for( int i = 0; i < 3; ++i ) \ if( this->m_Styles[ i ].GetPointer( ) != NULL ) \ this->m_Styles[ i ]->Remove##e##Observers( ); \ } namespace cpPlugins { namespace Extensions { namespace Visualization { /** */ class cpPlugins_Extensions_EXPORT MPRWithDifferentWindows { public: typedef cpPlugins::Extensions::Visualization:: MPRActors TMPRActors; typedef cpPlugins::Extensions::Visualization:: ImageInteractorStyle TStyle; public: cpPlugins_MPRWithDifferentWindows_ObserverMacro( DoubleClick ); cpPlugins_MPRWithDifferentWindows_ObserverMacro( Cursor ); cpPlugins_MPRWithDifferentWindows_ObserverMacro( Radius ); public: MPRWithDifferentWindows( vtkRenderWindow* xWin = NULL, vtkRenderWindow* yWin = NULL, vtkRenderWindow* zWin = NULL, vtkRenderWindow* auxWin = NULL ); virtual ~MPRWithDifferentWindows( ); void SetImage( vtkImageData* image ); void SetModeToNavigation( ); void SetModeToDeformation( ); void ResetCamera( const int& id ); void ResetCameras( ); void Render( const int& id ); void RenderAll( ); vtkRenderer* GetRenderer( const int& id ) const; void Add3DActor( vtkProp3D* prop ); protected: // Inputs vtkRenderWindow* m_Windows[ 4 ]; // Internal pipelines vtkSmartPointer< TMPRActors > m_MPRActors; vtkSmartPointer< vtkRenderer > m_Renderers[ 4 ]; vtkSmartPointer< TStyle > m_Styles[ 3 ]; }; } // ecapseman } // ecapseman } // ecapseman #endif // __CPPLUGINS__EXTENSIONS__VISUALIZATION__MPRWITHDIFFERENTWINDOWS__H__ // eof - $RCSfile$