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 );
+
+ TSeeds seeds = this->GetSeeds( );
+ typename TSeeds::const_iterator sIt = seeds.begin( );
+ for( ; sIt != seeds.end( ); ++sIt )
+ {
+ if( sIt->IsUnified )
+ mst->AddSeed( sIt->Vertex );
+
+ } // rof
}
// -------------------------------------------------------------------------