static void CreateImage(FloatImageType* const image);
int main(int argc, char*argv[])
{
FloatImageType::Pointer image;
if(argc < 2)
{
image = FloatImageType::New();
CreateImage(image);
}
else
{
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]);
reader->Update();
image = reader->GetOutput();
}
FFTType::Pointer fftFilter = FFTType::New();
fftFilter->SetInput(image);
fftFilter->Update();
IFFTType::Pointer ifftFilter = IFFTType::New();
ifftFilter->SetInput(fftFilter->GetOutput());
ifftFilter->Update();
CastFilterType::Pointer castFilter = CastFilterType::New();
castFilter->SetInput(ifftFilter->GetOutput());
castFilter->Update();
WriterType::Pointer writer = WriterType::New();
writer->SetFileName("ifft.png");
writer->SetInput(castFilter->GetOutput());
writer->Update();
return EXIT_SUCCESS;
}
void CreateImage(FloatImageType* const image)
{
image->SetRegions(region);
image->Allocate();
{
{
FloatImageType::IndexType pixelIndex = {{r,c}};
image->SetPixel(pixelIndex, 100);
}
}
}