[Insight-users] Urgent: How to compute Fourier Decomposition of signal in ITK?

Luis Ibanez luis.ibanez at kitware.com
Sun Jun 27 14:32:43 EDT 2004


Hi Jiang,


For your convenience a new example has been added to the
toolkit in order to describe how to compute the Fourier
series of a curve.

You will find this new example under:

      Insight/Examples/Numerics/
                 FourierDescriptors1.cxx

This example takes as input a text file where the first
line should have the number of points in your curve, and
the subsequent lines should have the X and Y coordinates
of such points, one point per line.

Once the points are read, their coordinates are used to
construct a complex signal that is passed to the vnl_fft
calculator. This calculator computes the Discrete Fourier
Transform of the input signal and finally the Fourier
coefficient magnitudes are printed out.

You may find useful to read about the basic principles of
Fourier Descriptors as a mechanisms for analyzing the
shape of curves.

You will need to do an update in your CVS checkout in
order to find this new example.

Examples for input files for this program are available
in Insight/Examples/Data.



Please let us know if you have further questions.


    Thanks



       Luis



----------------
Jiang wrote:
> Dear ITK users,
> 
> I want to measure the smoothness of one curve. Mr. Luis Ibanez gave me 
> an idea
> 
> that the smoothness of the curve can be evaluated by analyzing its 
> spectrum in
> 
> the Fourier domain. A smoothed curve will have High values for the Fourier
> 
> coefficients corresponding to low frequencies and Low values for the high
> 
> frequency coefficients. It is very good approach. Thanks Mr. Luis Ibanez 
> very
> 
> much!
> 
> Now I should change my curve mode to ChainCode, then to FourierSeriesPath
> 
> by itk::ChainCodeToFourierSeriesPathFilter. But in the following step, 
> computing the
> 
> decomposition, I don’t know how to handle it.
> 
> I found there are some classes in ITK 1.6, such as
> 
>>./Code/Algorithms/itkFFTComplexConjugateToRealImageFilter.h
> 
>>./Code/Algorithms/itkFFTComplexConjugateToRealImageFilter.txx
> 
>>./Code/Algorithms/itkFFTRealToComplexConjugateImageFilter.h
> 
>>./Code/Algorithms/itkFFTRealToComplexConjugateImageFilter.txx
> 
>>./Code/Algorithms/itkFFTWComplexConjugateToRealImageFilter.h
> 
>>./Code/Algorithms/itkFFTWComplexConjugateToRealImageFilter.txx
> 
>>./Code/Algorithms/itkFFTWRealToComplexConjugateImageFilter.h
> 
>>./Code/Algorithms/itkFFTWRealToComplexConjugateImageFilter.txx
> 
>>./Code/Algorithms/itkVnlFFTComplexConjugateToRealImageFilter.h
> 
>>./Code/Algorithms/itkVnlFFTComplexConjugateToRealImageFilter.txx
> 
>>./Code/Algorithms/itkVnlFFTRealToComplexConjugateImageFilter.h
> 
>>./Code/Algorithms/itkVnlFFTRealToComplexConjugateImageFilter.txx
> 
>  
> 
> However I don’t find either documentation or examples about how to use
> 
> those classes to reach my aim.
> 
> It is very urgent issue in my work. Who can help me and give me an 
> example how
> 
> should I do? Thanks a lot!
> 
>  
> 
>  
> 
> Best regards,
> 
> Chunyan Jiang
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users





More information about the Insight-users mailing list