X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FImage%2FPolyLineParametricPath.hxx;h=3093a997c60a8fc8fe7873c9416b4e39dd51d95c;hb=81c4e503782b69a433de83ffbe942eb774ac4a3f;hp=4616dcf1e7eddc8e6db88c86cb22c5855206ec0f;hpb=09046275d77a6f1bb9e6a309f22f9510fba13550;p=FrontAlgorithms.git diff --git a/lib/fpa/Image/PolyLineParametricPath.hxx b/lib/fpa/Image/PolyLineParametricPath.hxx index 4616dcf..3093a99 100644 --- a/lib/fpa/Image/PolyLineParametricPath.hxx +++ b/lib/fpa/Image/PolyLineParametricPath.hxx @@ -141,6 +141,29 @@ SetDirection( const TDirection& dir ) } // fi } +// ------------------------------------------------------------------------- +template< unsigned int _VDim > +void fpa::Image::PolyLineParametricPath< _VDim >:: +Graft( itk::DataObject* o ) +{ + this->Superclass::Graft( o ); + Self* other = dynamic_cast< Self* >( o ); + if( other != NULL ) + { + this->m_DefaultInputStepSize = other->m_DefaultInputStepSize; + this->Initialize( ); + for( unsigned long i = 0; i < other->GetSize( ); ++i ) + this->AddVertex( other->GetContinuousVertex( i ) ); + this->m_Spacing = other->m_Spacing; + this->m_Origin = other->m_Origin; + this->m_Direction = other->m_Direction; + this->m_InverseDirection = other->m_InverseDirection; + this->m_IndexToPhysicalPoint = other->m_IndexToPhysicalPoint; + this->m_PhysicalPointToIndex = other->m_PhysicalPointToIndex; + + } // fi +} + // ------------------------------------------------------------------------- template< unsigned int _VDim > fpa::Image::PolyLineParametricPath< _VDim >::