#ifndef __FPA__VTK__IMAGE3DOBSERVER__H__ #define __FPA__VTK__IMAGE3DOBSERVER__H__ #include #include #include #include #include #include #include namespace fpa { namespace VTK { /** */ template< class F, class R > class Image3DObserver : public itk::Command { public: typedef Image3DObserver Self; typedef itk::Command Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer< const Self > ConstPointer; typedef F TFilter; typedef R TRenderWindow; typedef itk::Image< long, 3 > TMarks; public: itkNewMacro( Self ); itkTypeMacro( Image3DObserver, itkCommand ); itkGetConstMacro( RenderPercentage, double ); itkSetMacro( RenderPercentage, double ); public: void SetRenderWindow( R* rw ); void Execute( itk::Object* c, const itk::EventObject& e ) { this->Execute( ( const itk::Object* )( c ), e ); } void Execute( const itk::Object* c, const itk::EventObject& e ); protected: Image3DObserver( ); virtual ~Image3DObserver( ) { } private: Image3DObserver( const Self& ); // Not impl. void operator=( const Self& ); // Not impl. protected: R* m_RenderWindow; unsigned long m_Count; unsigned long m_RenderCount; double m_RenderPercentage; TMarks::Pointer m_Marks; vtkSmartPointer< vtkPolyData > m_Data; vtkSmartPointer< vtkPolyDataMapper > m_Mapper; vtkSmartPointer< vtkActor > m_Actor; }; } // ecapseman } // ecapseman #include #endif // __FPA__VTK__IMAGE3DOBSERVER__H__ // eof - $RCSfile$