int
main(int argc, char * argv[])
{
if (argc < 5)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputRGBImageFile outputRGBImageFile ";
std::cerr << "numberOfIterations timeStep " << std::endl;
return EXIT_FAILURE;
}
using FilterType =
InputImageType>;
FilterType::Pointer filter = FilterType::New();
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]);
filter->SetInput(reader->GetOutput());
const unsigned int numberOfIterations = std::stoi(argv[3]);
const double timeStep = std::stod(argv[4]);
filter->SetNumberOfIterations(numberOfIterations);
filter->SetTimeStep(timeStep);
filter->SetConductanceParameter(1.0);
filter->Update();
CasterType::Pointer caster = CasterType::New();
WriterType::Pointer writer = WriterType::New();
caster->SetInput(filter->GetOutput());
writer->SetInput(caster->GetOutput());
writer->SetFileName(argv[2]);
writer->Update();
return EXIT_SUCCESS;
}