#include "itkConfigure.h"
#if !defined(ITK_USE_FFTWF)
#endif
int
main(int argc, char * argv[])
{
if (argc != 3)
{
std::cerr << "Usage: " << argv[0] << " input output" << std::endl;
return EXIT_FAILURE;
}
using OutputPixelType = unsigned short;
using WorkPixelType = float;
ReaderType::Pointer inputreader = ReaderType::New();
WriterType::Pointer writer = WriterType::New();
inputreader->SetFileName(argv[1]);
writer->SetFileName(argv[2]);
inputreader->Update();
FFTFilterType::Pointer fftinput = FFTFilterType::New();
fftinput->SetInput(inputreader->GetOutput());
fftinput->Update();
using ComplexImageType = FFTFilterType::OutputImageType;
invFFTFilterType::Pointer fftoutput = invFFTFilterType::New();
fftoutput->SetInput(
fftinput->GetOutput());
fftoutput->Update();
using RescaleFilterType =
RescaleFilterType::Pointer intensityrescaler = RescaleFilterType::New();
std::cout << fftoutput->GetOutput()->GetLargestPossibleRegion().GetSize()
<< std::endl;
intensityrescaler->SetInput(fftoutput->GetOutput());
intensityrescaler->SetOutputMinimum(0);
intensityrescaler->SetOutputMaximum(65535);
writer->SetInput(intensityrescaler->GetOutput());
writer->Update();
return EXIT_SUCCESS;
}