TMST* fpa::Base::Dijkstra< _TAlgorithm, _TMST >::
GetMinimumSpanningTree( )
{
- dynamic_cast< TMST* >(
- this->itk::ProcessObject::GetOutput( this->m_MSTIdx )
+ return(
+ dynamic_cast< TMST* >(
+ this->itk::ProcessObject::GetOutput( this->m_MSTIdx )
+ )
);
}
TMST* fpa::Base::Dijkstra< _TAlgorithm, _TMST >::
GetMinimumSpanningTree( ) const
{
- dynamic_cast< const TMST* >(
- this->itk::ProcessObject::GetOutput( this->m_MSTIdx )
+ return(
+ dynamic_cast< const TMST* >(
+ this->itk::ProcessObject::GetOutput( this->m_MSTIdx )
+ )
);
}
void fpa::Base::Dijkstra< _TAlgorithm, _TMST >::
_AfterGenerateData( )
{
- typedef typename Superclass::TSeedsInterface::TSeeds::iterator _TIt;
+ this->Superclass::_AfterGenerateData( );
TMST* mst = this->GetMinimumSpanningTree( );
mst->ClearSeeds( );
mst->SetCollisions( this->m_Collisions );
- for( _TIt sIt = this->BeginSeeds( ); sIt != this->EndSeeds( ); ++sIt )
- mst->AddSeed( sIt->Vertex );
- this->Superclass::_AfterGenerateData( );
+ const TSeeds& seeds = this->GetSeeds( );
+ typename TSeeds::const_iterator sIt = seeds.begin( );
+ for( ; sIt != seeds.end( ); ++sIt )
+ {
+ if( sIt->IsUnified )
+ mst->AddSeed( sIt->Vertex );
+
+ } // rof
}
// -------------------------------------------------------------------------
template< class _TAlgorithm, class _TMST >
void fpa::Base::Dijkstra< _TAlgorithm, _TMST >::
-_UpdateOutputValue( const TNode& n )
+_UpdateOutputValue( TNode& n )
{
this->Superclass::_UpdateOutputValue( n );
this->GetMinimumSpanningTree( )->SetParent( n.Vertex, n.Parent );