int
main(int argc, char * argv[])
{
if (argc != 3)
{
std::cerr << "Usage: " << std::endl;
std::cerr << argv[0];
std::cerr << " <InputFileName> <OutputFileName>";
std::cerr << std::endl;
return EXIT_FAILURE;
}
const char * inputFileName = argv[1];
const char * outputFileName = argv[2];
using PixelType = float;
const auto input = itk::ReadImage<RealImageType>(inputFileName);
padFilter->SetInput(input);
padding[0] = 0;
padding[1] = 2;
padding[2] = 6;
padFilter->SetPadUpperBound(padding);
using ComplexImageType = ForwardFFTFilterType::OutputImageType;
forwardFFTFilter->SetInput(padFilter->GetOutput());
complexToModulusFilter->SetInput(forwardFFTFilter->GetOutput());
using OutputPixelType = unsigned short;
windowingFilter->SetInput(complexToModulusFilter->GetOutput());
windowingFilter->SetWindowMinimum(0);
windowingFilter->SetWindowMaximum(20000);
fftShiftFilter->SetInput(windowingFilter->GetOutput());
try
{
}
catch (const itk::ExceptionObject & error)
{
std::cerr << "Error: " << error << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}