#include "itksys/SystemTools.hxx"
int main(int argc, char* argv[])
{
if( argc < 2 )
{
std::cerr << argv[0] << " InputFileName [NumberOfIterations]" <<std ::endl;
return EXIT_FAILURE;
}
std::string inputFileName = argv[1];
unsigned int numberOfIterations = 2;
if (argc > 2)
{
numberOfIterations = atoi(argv[2]);
}
typedef float InputPixelType;
typedef float OutputPixelType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(inputFileName);
FilterType::Pointer filter = FilterType::New();
filter->SetInput( reader->GetOutput() );
filter->SetThreshold( 255 );
filter->SetNumberOfIterations(numberOfIterations);
SubtractType::Pointer diff = SubtractType::New();
diff->SetInput1(reader->GetOutput());
diff->SetInput2(filter->GetOutput());
reader->GetOutput(),true,
itksys::SystemTools::GetFilenameName(inputFileName));
std::stringstream desc;
desc << "BinaryMinMaxCurvature, iterations = "
<< numberOfIterations;
filter->GetOutput(),
true,
desc.str());
std::stringstream desc2;
desc2 << "Original - BinaryMinMaxCurvatureFlow";
diff->GetOutput(),
true,
desc2.str());
return EXIT_SUCCESS;
}