#if defined(_MSC_VER)
#pragma warning ( disable : 4786 )
#endif
int main( int argc, char *argv[])
{
if( argc < 7 )
{
std::cerr << "Missing Parameters " << std::endl;
std::cerr << "Usage: " << argv[0];
std::cerr << " inputImage outputImage lowerThreshold upperThreshold "
"seedX seedY [seed2X seed2Y ... ]" << std::endl;
return 1;
}
using InternalPixelType = float;
{
std::cerr <<
"Input image is not a " <<
Dimension <<
" dimensional image as expected!" << std::endl;
return 1;
}
InternalImageType::Pointer itkImage =
dynamic_cast <InternalImageType*
>( image.
GetITKBase() );
if ( itkImage.IsNull() )
{
std::cerr << "Unexpected error converting SimpleITK image to ITK image!" << std::endl;
return 1;
}
BlurFilterType::Pointer blurFilter = BlurFilterType::New();
blurFilter->SetInput( itkImage );
blurFilter->SetNumberOfIterations( 5 );
blurFilter->SetTimeStep( 0.125 );
blurFilter->Update();
segmentationFilter.
SetLower( atof( argv[3] ) );
segmentationFilter.
SetUpper( atof( argv[4] ) );
for (int i = 5; i+1 < argc; i+=2)
{
std::vector<unsigned int> seed = { (unsigned int) atoi(argv[i]), (unsigned int) atoi(argv[i+1] };
std::cout << "Adding a seed at ";
for( unsigned int j = 0; j < seed.size(); ++i )
{
std::cout << seed[j] << " ";
}
std::cout << std::endl;
}
return 0;
}