X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2Ffpa%2FBase%2FAlgorithm.hxx;h=35307874ab8a43c732169bb008612b13994ff10e;hb=aaeabf9e79b8db1b97bc3381e95e46c77da4d891;hp=aa1c283a8864a370fa5c47948dd3256abc16783e;hpb=015105c2f44abb80923a59adfb1a01713506744f;p=FrontAlgorithms.git diff --git a/lib/fpa/Base/Algorithm.hxx b/lib/fpa/Base/Algorithm.hxx index aa1c283..3530787 100644 --- a/lib/fpa/Base/Algorithm.hxx +++ b/lib/fpa/Base/Algorithm.hxx @@ -21,42 +21,6 @@ fpa::Base::Algorithm< V, C, R, S, VC, B >::_TNode:: { } -// ------------------------------------------------------------------------- -template< class V, class C, class R, class S, class VC, class B > -typename fpa::Base::Algorithm< V, C, R, S, VC, B >:: -TMinimumSpanningTree* fpa::Base::Algorithm< V, C, R, S, VC, B >:: -GetMinimumSpanningTree( ) -{ - return( - dynamic_cast< TMinimumSpanningTree* >( - this->itk::ProcessObject::GetOutput( 1 ) - ) - ); -} - -// ------------------------------------------------------------------------- -template< class V, class C, class R, class S, class VC, class B > -const typename fpa::Base::Algorithm< V, C, R, S, VC, B >:: -TMinimumSpanningTree* fpa::Base::Algorithm< V, C, R, S, VC, B >:: -GetMinimumSpanningTree( ) const -{ - return( - dynamic_cast< const TMinimumSpanningTree* >( - this->itk::ProcessObject::GetOutput( 1 ) - ) - ); -} - -// ------------------------------------------------------------------------- -template< class V, class C, class R, class S, class VC, class B > -void fpa::Base::Algorithm< V, C, R, S, VC, B >:: -GraftMinimumSpanningTree( itk::DataObject* obj ) -{ - TMinimumSpanningTree* mst = dynamic_cast< TMinimumSpanningTree* >( obj ); - if( mst != NULL ) - this->GraftNthOutput( 1, mst ); -} - // ------------------------------------------------------------------------- template< class V, class C, class R, class S, class VC, class B > void fpa::Base::Algorithm< V, C, R, S, VC, B >:: @@ -125,11 +89,6 @@ Algorithm( ) m_ThrowEvents( false ), m_StopAtOneFront( false ) { - this->m_MinimumSpanningTreeIndex = this->GetNumberOfRequiredOutputs( ); - this->SetNumberOfRequiredOutputs( this->m_MinimumSpanningTreeIndex + 1 ); - this->itk::ProcessObject::SetNthOutput( - this->m_MinimumSpanningTreeIndex, TMinimumSpanningTree::New( ) - ); } // ------------------------------------------------------------------------- @@ -350,6 +309,14 @@ _Node( const TVertex& v ) return( vIt->second ); } +// ------------------------------------------------------------------------- +template< class V, class C, class R, class S, class VC, class B > +void fpa::Base::Algorithm< V, C, R, S, VC, B >:: +_SetResult( const TVertex& v, const _TNode& n ) +{ + // Do nothing at this hierarchy level +} + // ------------------------------------------------------------------------- template< class V, class C, class R, class S, class VC, class B > const typename fpa::Base::Algorithm< V, C, R, S, VC, B >::