// Configure filter
auto filter = this->_CreateITK< _TFilter >( );
filter->SetInput( image );
- filter->SetNeighborhoodFunction( neig );
- filter->SetCostFunction( cost );
- filter->SetCostConversionFunction( conv );
+ if( neig != NULL )
+ filter->SetNeighborhoodFunction( neig );
+ if( cost != NULL )
+ filter->SetCostFunction( cost );
+ if( conv != NULL )
+ filter->SetCostConversionFunction( conv );
filter->SetStopAtOneFront( this->m_Parameters.GetBool( "StopAtOneFront" ) );
// Assign seeds
typename _TInputImage::IndexType idx;
unsigned int dim =
( _TInputImage::ImageDimension < 3 )? _TInputImage::ImageDimension: 3;
- for( unsigned int i = 0; i < seeds->GetNumberOfPoints( ); ++i )
+ for( int i = 0; i < seeds->GetNumberOfPoints( ); ++i )
{
double buf[ 3 ];
seeds->GetPoint( i, buf );