Total members 11893 |It is currently Tue Nov 05, 2024 7:59 am Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

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;


}




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 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     -  
 compute number of files in directory     -  
 Program to compute commission using two methods     -  
 loop to compute the tuition in ten years     -  
 compute maximum and minimum values, also scaling factor.     -  
 Image-Viewer-Image Processing-Filters-Noise-enhancements     -  



Topic Tags

C++ ITK






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com