int
main(int argc, char * argv[])
{
if (argc != 4)
{
std::cerr << "Usage: " << argv[0];
std::cerr << " <InputFileName> <OutputFileName> <AxisToFlip>";
std::cerr << std::endl;
return EXIT_FAILURE;
}
using PixelType = unsigned char;
const auto input = itk::ReadImage<ImageType>(argv[1]);
flipFilter->SetInput(input);
FlipImageFilterType::FlipAxesArrayType flipAxes;
if (std::stoi(argv[3]) == 0)
{
flipAxes[0] = true;
flipAxes[1] = false;
}
else
{
flipAxes[0] = false;
flipAxes[1] = true;
}
flipFilter->SetFlipAxes(flipAxes);
try
{
}
{
std::cerr << "Error: " << error << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}