#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;
}
typedef unsigned short OutputPixelType;
typedef float WorkPixelType;
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();
typedef FFTFilterType::OutputImageType ComplexImageType;
invFFTFilterType::Pointer fftoutput = invFFTFilterType::New();
fftoutput->SetInput(fftinput->GetOutput());
fftoutput->Update();
WorkImageType,
OutputImageType > 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;
}