// Configure and obtain inputs
const I* input = this->GetInput( );
const TMinimumSpanningTree* mst = this->GetMinimumSpanningTree( );
+ const TUniqueVertices* bifurcations = this->GetBifurcations( );
TBranches* branches = this->GetBranches( );
TLabelImage* label = this->GetLabelImage( );
label->FillBuffer( 0 );
this->m_NumberOfBranches = actual_label;
// Label bifurcations
- /* TODO: Is this necessary?
- typename TUniqueVertices::const_iterator bifIt =
- this->m_Bifurcations.begin( );
- for( ; bifIt != this->m_Bifurcations.end( ); ++bifIt )
- {
- actual_label++;
- double d = std::sqrt( double( input->GetPixel( *bifIt ) ) );
- _TRegion region = this->_Region( *bifIt, d );
- itk::ImageRegionConstIteratorWithIndex< I > iIt( input, region );
- itk::ImageRegionIteratorWithIndex< TLabelImage > lIt( label, region );
- iIt.GoToBegin( );
- lIt.GoToBegin( );
- for( ; !iIt.IsAtEnd( ); ++iIt, ++lIt )
- {
- // Mask real input image
- if( !( iIt.Get( ) < ( typename I::PixelType )( 0 ) ) )
- lIt.Set( actual_label );
-
- } // rof
-
- } // rof
- */
+ typename TUniqueVertices::ConstIterator bifIt =
+ bifurcations->Begin( );
+ for( ; bifIt != bifurcations->End( ); ++bifIt )
+ {
+ actual_label++;
+ double d = std::sqrt( double( input->GetPixel( *bifIt ) ) );
+ _TRegion region = this->_Region( *bifIt, d * 1.5 );
+ itk::ImageRegionConstIteratorWithIndex< I > iIt( input, region );
+ itk::ImageRegionIteratorWithIndex< TLabelImage > lIt( label, region );
+ iIt.GoToBegin( );
+ lIt.GoToBegin( );
+ for( ; !iIt.IsAtEnd( ); ++iIt, ++lIt )
+ {
+ // Mask real input image
+ if( !( iIt.Get( ) < ( typename I::PixelType )( 0 ) ) )
+ lIt.Set( actual_label );
+
+ } // rof
+
+ } // rof
}
// -------------------------------------------------------------------------