- if( image->TransformPhysicalPointToIndex( pnt, idx ) )
- filter->AddSeed( idx, 0 );
+ typename _TMST::PointType pnt;
+ typename _TMST::IndexType idx;
+ unsigned int dim =
+ ( _TMST::ImageDimension < 3 )? _TMST::ImageDimension: 3;
+ for( unsigned int i = 0; i < 2; ++i )
+ {
+ double buf[ 3 ];
+ points->GetPoint( i, buf );
+ pnt.Fill( 0 );
+ for( unsigned int d = 0; d < dim; ++d )
+ pnt[ d ] = buf[ d ];
+ if( mst->TransformPhysicalPointToIndex( pnt, idx ) )
+ seeds.push_back( idx );