#include #include #include #include #include #include // ------------------------------------------------------------------------- cpPluginsGenericFilters::PolyLineParametricPathToSimple3DCurve:: PolyLineParametricPathToSimple3DCurve( ) : Superclass( ) { typedef cpPluginsExtensions::PolyLineParametricPath _TPath; typedef cpPluginsExtensions::Simple3DCurve _TCurve; this->_ConfigureInput< _TPath >( "Input", true, false ); this->_ConfigureOutput< _TCurve >( "Output" ); this->m_Parameters.ConfigureAsUint( "NumberOfSamples", 0 ); } // ------------------------------------------------------------------------- cpPluginsGenericFilters::PolyLineParametricPathToSimple3DCurve:: ~PolyLineParametricPathToSimple3DCurve( ) { } // ------------------------------------------------------------------------- void cpPluginsGenericFilters::PolyLineParametricPathToSimple3DCurve:: _GenerateData( ) { typedef cpExtensions::DataStructures::PolyLineParametricPath< 3 > _TPath; typedef cpExtensions::DataStructures::Simple3DCurve< double > _TCurve; typedef cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPath, _TCurve > _TFilter; auto in = this->GetInputData< _TPath >( "Input" ); if( in == NULL ) this->_Error( "Invalid input path." ); auto filter = this->_CreateITK< _TFilter >( ); filter->SetInput( in ); filter->SetNumberOfSamples( this->m_Parameters.GetUint( "NumberOfSamples" ) ); filter->Update( ); this->GetOutput( "Output" )->SetITK( filter->GetOutput( ) ); } // eof - $RCSfile$