Compute FFT (Fourier Transform) in ITK for a 2d image

Sat Jul 04, 2015 1:29 pm

Compute FFT (Fourier Transform) in ITK for a 2d image

cpp code
typedef float       OutputPixelType;
typedef itk::Image< OutputPixelType, 2 > OutputImageType;
typedef itk::ForwardFFTImageFilter< OutputImageType > FFTType;
typedef FFTType::OutputImageType ComplexImageType;
ComplexImageType::Pointer ClassType::computeFFT(OutputImageType::Pointer image,int padXSize,int padYSize)

OutputImageType::SizeType regionSize =getImageSize(image);
typedef itk::WrapPadImageFilter< OutputImageType, OutputImageType > PadFilterType;
PadFilterType::Pointer padFilter = PadFilterType::New();
padFilter->SetInput( image );
PadFilterType::SizeType padding;
// Input size is [48, 62, 42]. Pad to [48, 64, 48].
padding[0] = padXSize- regionSize[0];
padding[1] = padYSize- regionSize[1];

padFilter->SetPadUpperBound( padding );

FFTType::Pointer forwardFFTFilter = FFTType::New();
forwardFFTFilter->SetInput( padFilter->GetOutput() );
ComplexImageType::Pointer complexImage= forwardFFTFilter->GetOutput() ;
return complexImage;


  Related Posts  to : Compute FFT (Fourier Transform) in ITK for a 2d image
 use of Affine Transform     -  
 Transform Rotate Filter     -  
 force letters to be lowercase text-transform     -  
 compute area of the circle.     -  
 compute binomial coefficients     -  
 loop to compute the tuition in ten years     -  
 compute number of files in directory     -  
 Program to compute commission using two methods     -  
 compute maximum and minimum values, also scaling factor.     -  
 Image-Viewer-Image Processing-Filters-Noise-enhancements     -  

Topic Tags