fpa::Image::Algorithm< _TInputImage, _TOutputImage, _TMarksInterface, _TSeedsInterface >::
GetMarks( )
{
- dynamic_cast< TMarks* >(
- this->itk::ProcessObject::GetOutput( this->m_MarksIdx )
+ return(
+ dynamic_cast< TMarks* >(
+ this->itk::ProcessObject::GetOutput( this->m_MarksIdx )
+ )
);
}
fpa::Image::Algorithm< _TInputImage, _TOutputImage, _TMarksInterface, _TSeedsInterface >::
GetMarks( ) const
{
- dynamic_cast< const TMarks* >(
- this->itk::ProcessObject::GetOutput( this->m_MarksIdx )
+ return(
+ dynamic_cast< const TMarks* >(
+ this->itk::ProcessObject::GetOutput( this->m_MarksIdx )
+ )
);
}
{
}
+// -------------------------------------------------------------------------
+template< class _TInputImage, class _TOutputImage, class _TMarksInterface, class _TSeedsInterface >
+typename
+fpa::Image::Algorithm< _TInputImage, _TOutputImage, _TMarksInterface, _TSeedsInterface >::
+TNodes fpa::Image::Algorithm< _TInputImage, _TOutputImage, _TMarksInterface, _TSeedsInterface >::
+_UnifySeeds( )
+{
+ const TInputImage* input = this->GetInput( );
+ typename TInputImage::RegionType region = input->GetRequestedRegion( );
+ TSeeds seeds = this->GetSeeds( );
+ TNodes nodes;
+
+ typename TSeeds::iterator sIt = seeds.begin( );
+ for( ; sIt != seeds.end( ); ++sIt )
+ {
+ TNode node;
+ if( sIt->IsPoint )
+ input->TransformPhysicalPointToIndex( sIt->Point, sIt->Vertex );
+ else
+ input->TransformIndexToPhysicalPoint( sIt->Vertex, sIt->Point );
+ if( region.IsInside( sIt->Vertex ) )
+ {
+ sIt->IsUnified = true;
+ node.Vertex = sIt->Vertex;
+ node.Parent = node.Vertex;
+ node.FrontId = nodes.size( ) + 1;
+ nodes.insert( node );
+ }
+ else
+ sIt->IsUnified = false;
+
+ } // rof
+
+ return( nodes );
+}
+
// -------------------------------------------------------------------------
template< class _TInputImage, class _TOutputImage, class _TMarksInterface, class _TSeedsInterface >
void