X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpExtensions%2FAlgorithms%2FPolyLineParametricPathToSimple3DCurve.cxx;fp=lib%2FcpExtensions%2FAlgorithms%2FPolyLineParametricPathToSimple3DCurve.cxx;h=0000000000000000000000000000000000000000;hb=2e142df11d6f312a2a2b5097b8da73571ed523e8;hp=9eecda129f9085ecd29c9df96094a33dd2d3202f;hpb=61b3659afe961ed248f30e26f9ca8f28fcfafddc;p=cpPlugins.git diff --git a/lib/cpExtensions/Algorithms/PolyLineParametricPathToSimple3DCurve.cxx b/lib/cpExtensions/Algorithms/PolyLineParametricPathToSimple3DCurve.cxx deleted file mode 100644 index 9eecda1..0000000 --- a/lib/cpExtensions/Algorithms/PolyLineParametricPathToSimple3DCurve.cxx +++ /dev/null @@ -1,94 +0,0 @@ -// ------------------------------------------------------------------------- -// @author Leonardo Florez-Valencia (florez-l@javeriana.edu.co) -// ------------------------------------------------------------------------- - -#include - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -_TPolyLine* cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -GetInput( ) -{ - return( dynamic_cast< _TPolyLine* >( this->Superclass::GetInput( 0 ) ) ); -} - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -const _TPolyLine* cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -GetInput( ) const -{ - return( dynamic_cast< const _TPolyLine* >( this->Superclass::GetInput( 0 ) ) ); -} - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -void cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -SetInput( _TPolyLine* pl ) -{ - this->Superclass::SetNthInput( 0, pl ); -} - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -_TCurve* cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -GetOutput( ) -{ - return( dynamic_cast< _TCurve* >( this->Superclass::GetOutput( 0 ) ) ); -} - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -const _TCurve* cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -GetOutput( ) const -{ - return( dynamic_cast< const _TCurve* >( this->Superclass::GetOutput( 0 ) ) ); -} - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -PolyLineParametricPathToSimple3DCurve( ) - : Superclass( ), - m_NumberOfSamples( 0 ) -{ - this->SetNumberOfRequiredInputs( 1 ); - this->SetNumberOfRequiredOutputs( 1 ); - typename _TCurve::Pointer curve = _TCurve::New( ); - this->Superclass::SetNthOutput( 0, curve ); -} - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -~PolyLineParametricPathToSimple3DCurve( ) -{ -} - -// ------------------------------------------------------------------------- -template< class _TPolyLine, class _TCurve > -void cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< _TPolyLine, _TCurve >:: -GenerateData( ) -{ - const _TPolyLine* line = this->GetInput( ); - _TCurve* curve = this->GetOutput( ); - unsigned long N = this->m_NumberOfSamples; - if( N == 0 ) - N = line->GetSize( ); - curve->Clear( ); - - for( unsigned long n = 0; n < N; ++n ) - { - double u = double( n ) / double( N - 1 ); - curve->AddPoint( line->GetSmoothPoint( u ) ); - - } // rof -} - -// ------------------------------------------------------------------------- -#include -#include - -template class cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< cpExtensions::DataStructures::PolyLineParametricPath< 3 >, cpExtensions::DataStructures::Simple3DCurve< float > >; -template class cpExtensions::Algorithms::PolyLineParametricPathToSimple3DCurve< cpExtensions::DataStructures::PolyLineParametricPath< 3 >, cpExtensions::DataStructures::Simple3DCurve< double > >; - -// eof - $RCSfile$