Total members 11638 |It is currently Thu May 25, 2017 6:34 pm Login / Join Codemiles

### Weka

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() );  forwardFFTFilter->Update();  ComplexImageType::Pointer complexImage= forwardFFTFilter->GetOutput() ;  return complexImage; }`

 Tweet
Author:
 Posts: 2707Have thanks: 74 time
 Page 1 of 1 [ 1 post ]

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     -

C++ ITK