int
main(int argc, char * argv[])
{
if (argc < 6)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0] << " inputImageFile outputImageFile normalizedOutputImageFile ";
std::cerr << " derivativeOrder direction" << std::endl;
return EXIT_FAILURE;
}
using InputPixelType = float;
using OutputPixelType = float;
reader->SetFileName(argv[1]);
writer->SetFileName(argv[2]);
filter->SetOrder(std::stoi(argv[4]));
filter->SetDirection(std::stoi(argv[5]));
filter->SetInput(reader->GetOutput());
writer->SetInput(filter->GetOutput());
writer->Update();
normalizer->SetInput(filter->GetOutput());
normalizedWriter->SetInput(normalizer->GetOutput());
normalizer->SetOutputMinimum(0);
normalizer->SetOutputMaximum(255);
normalizedWriter->SetFileName(argv[3]);
normalizedWriter->Update();
return EXIT_SUCCESS;
}