#include #include #include // ------------------------------------------------------------------------- void cpPluginsExtensions::PolyLineParametricPath:: SetITK( itk::LightObject* o ) { this->Superclass::SetITK( o ); cpPlugins_Demangle_PolyLineParametricPath_All_1( o, _ITK_2_VTK ) { this->m_VTK = NULL; this->m_ITKvVTK = NULL; } } // ------------------------------------------------------------------------- void cpPluginsExtensions::PolyLineParametricPath:: SetVTK( vtkObjectBase* o ) { // Do nothing this->m_ITK = NULL; this->m_VTK = NULL; this->m_ITKvVTK = NULL; } // ------------------------------------------------------------------------- cpPluginsExtensions::PolyLineParametricPath:: PolyLineParametricPath( ) : Superclass( ) { } // ------------------------------------------------------------------------- cpPluginsExtensions::PolyLineParametricPath:: ~PolyLineParametricPath( ) { } // ------------------------------------------------------------------------- template< class _TPolyLine > void cpPluginsExtensions::PolyLineParametricPath:: _ITK_2_VTK( _TPolyLine* pl ) { typedef cpExtensions::Visualization::PolyLineParametricPathToPolyData< _TPolyLine > _TFilter; _TFilter* f = dynamic_cast< _TFilter* >( this->m_ITKvVTK.GetPointer( ) ); if( f == NULL ) { _TFilter* nf = _TFilter::New( ); this->m_ITKvVTK = nf; f = nf; } // fi f->SetInput( pl ); f->Update( ); // Keep object track this->m_ITK = pl; this->m_VTK = f->GetOutput( ); } // eof - $RCSfile$