[Insight-users] units of SetNoiseLevel in itkGradientVectorFlowImageFilter

Luis Ibanez luis.ibanez at kitware.com
Sun Feb 15 14:02:52 EST 2009


Hi Amar,

The noise level is used inside this filter in a "heuristic" way.

When looking at the txx file, you will find lines : 31,32

   m_TimeStep = 0.001;
   m_NoiseLevel = 200;

where this two values are initialized in the constructor.

The API of the class allows you to set both the TimeStep and
the NoiseLevel.... but... at the beginning of the GenerateData
method, it will set the TimeStep based on the value of the
NoiseLevel.   See line 56 in GenerateData():

           m_TimeStep = 0.2/m_NoiseLevel;

Which means that the settings of the TimeStep, are irrelevant
in practice.   :-/

This is arguable: a bug, or at least a poor API...

So, let's ignore the TimeStep (given that it is irrelevant), and
focus on the NoiseLevel.


You will see in line 247, the TimeStep being multiplied with the
NoiseLevel, to be stored in a variable "r", which, will always
be equal to 0.2 given what we saw in line 56.

The other location with TimeStep (aka 0.2 / NoiseLevel ) is used
is in line 226 in the UpdatePixels() method.

----

To put it short then, the noise level influences the rate at which
the vector field is averaged with the laplacians of its components.

We have added an example to the directory


          Insight/Code/Filtering

under the name

          GradientVectorFlowImageFilter.cxx

This example is intended to be feed with the output of the
GradientRecursiveGaussianImageFilter example, in the same directory.

A reasonable set of value for the NoiseLevel in this case is 2000.0,
with a number of iterations = 5.


WARNING: These parameters were tunned by using as input the image

      Insight/Testing/Data/Input/HeadMRVolume.mha

which is a MRI image.


You may have to experiment with different values for the particular
case of your images.



    Please let us konw if you have any questions.


        Thanks


            Luis



-----------------------
Amardeep Singh wrote:
> Dear ITK Users
> 
> I am currently working with the "itkGradientVectorFlowImageFilter" and I 
> stumbled across the
> "SetNoiseLevel" function. Can anyone tell me the units of the noise 
> level that is supposed to be set?
>  From the constructor of the filter, I see that a standard value seems 
> to be 200. I do not know the noise level of my
> images. So is 200 a reasonable value? Can I estimate the noise of my 
> images somehow in ITK?
> Thank you very much for any advice.
> 
> Best regards
> Amar
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at: 
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
> 


More information about the Insight-users mailing list