// ========================================================================= // @author Leonardo Florez Valencia // @email florez-l@javeriana.edu.co // ========================================================================= #ifndef __fpa__Image__VisualDebugger2D__hxx__ #define __fpa__Image__VisualDebugger2D__hxx__ #include #include // ------------------------------------------------------------------------- template< class _TFilter > void fpa::Image::VisualDebugger2D< _TFilter >:: Render( ) { #ifdef USE_ivq if( this->m_Renderer == NULL || this->m_Interactor == NULL ) return; this->m_Actor->Modified( ); this->m_RenderCount = ( this->m_RenderCount + 1 ) % this->m_NumberOfPixels; if( this->m_RenderCount == 0 ) this->m_Interactor->Render( ); #endif // USE_ivq } // ------------------------------------------------------------------------- template< class _TFilter > void fpa::Image::VisualDebugger2D< _TFilter >:: StartVisualization( ) { #ifdef USE_ivq if( this->m_Renderer == NULL || this->m_Interactor == NULL ) return; this->m_Actor = vtkSmartPointer< TImageActor >::New( ); this->m_Actor->SetInputData( this->m_VTKLabels->GetOutput( ) ); this->m_Actor->Update( ); this->m_Renderer->AddViewProp( this->m_Actor ); this->m_NumberOfPixels = double( this->m_VTKLabels->GetInput( )-> GetRequestedRegion( ).GetNumberOfPixels( ) ) * 0.005; this->m_RenderCount = 0; #endif // USE_ivq } // ------------------------------------------------------------------------- template< class _TFilter > void fpa::Image::VisualDebugger2D< _TFilter >:: EndVisualization( ) { } // ------------------------------------------------------------------------- template< class _TFilter > fpa::Image::VisualDebugger2D< _TFilter >:: VisualDebugger2D( ) : Superclass( ) { } // ------------------------------------------------------------------------- template< class _TFilter > fpa::Image::VisualDebugger2D< _TFilter >:: ~VisualDebugger2D( ) { } #endif // __fpa__Image__VisualDebugger2D__hxx__ // eof - $RCSfile$