AW: [Insight-users] How to measure the smoothness of one curve?
Jiang
jiang at TI.Uni-Trier.DE
Mon Jun 14 10:58:21 EDT 2004
Hi Luis,
Thank you very much for your answer. I have checked the documentation
about FourierSeriesPath and related classes in Doxygen html document,
and some test codes in InsightToolkit-1.4.0/Testing/Code/Common
itkFourierSeriesPathTest.cxx
InsightToolkit-1.4.0/Testing/Code/BasicFilters
itkChainCodeToFourierSeriesPathFilterTest.cxx
Now I have some questions. I hope you can help me and give me some
hints.
1. I have no idea about curve's spectrum in the Fourier domain. Could
you introduce me some literatures about it? Why can it reveal the
smoothness of the curve?
2. I checked the code of itkChainCodeToFourierSeriesPathFilterTest.cxx
and found that this example gets the FourierSeriesPath by inputting
vertices to itk::PolyLineParametricPath, then using
itk::PathToChainCodePathFilter and ChainCodeToFourierSeriesPathFilter to
convert the chain of vertices to FourierSeriesPath. In my case, the
curve is presented by one image. This image is binary value image. For
example, pixel with "1" means that it is one point of the curve. Pixel
with "0" means that it is not the point of the curve. How can I convert
this curve to FourierSeriesPath? I think the example of
itkChainCodeToFourierSeriesPathFilterTest.cxx is not so convenient to my
case.
3. In the example of itkFourierSeriesPathTest.cxx, it computes:"
Evaluating at 0, 0.5, and 1.0:" path->Evaluate();" Evaluating to an
index at 0, 0.5, and 1.0:" path->EvaluateToIndex(); and" Evaluating the
derivative at 0, 0.5, and 1.0:" path->EvaluateDerivative(). I want to
know which one is used for computing the bias of Fourier Spectrum as you
said?
Many thanks to you again!
Jiang
-----Ursprüngliche Nachricht-----
Von: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Gesendet: Mittwoch, 2. Juni 2004 02:34
An: Jiang
Cc: ITK
Betreff: Re: [Insight-users] How to measure the smoothness of one curve?
Hi Jiang,
An elegant way of characterizing the smoothness of a
curve is to analyze its spectrum in the Fourier domain.
To that end you could use the class:
itkFourierSeriesPath
http://www.itk.org/Insight/Doxygen/html/classitk_1_1FourierSeriesPath.ht
ml
and in order to convert your current curve into an
itkFourierSeriesPath, you can use the class
ChainCodeToFourierSeriesPathFilter
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ChainCodeToFourierSe
riesPathFilter.html
A smoothed curve will have High values for the Fourier
coefficients corresponding to low frequencies and Low
values for the high frequency coefficients.
You probably want to compute some generic index such
as the bias of the Fourier spectrum in order to indicate
whether the curve contains a majority of high frequencies
or low frequencies.
This class is designed for working with curves in
N-Dimensional space.
Regards,
Luis
More information about the Insight-users
mailing list