Total members 11653 |It is currently Thu Jul 27, 2017 5:43 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;


}





Author:
Mastermind
User avatar Posts: 2707
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     -  
 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

C++ ITK
cron






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team