[Insight-users] Gradient Anisotropic Diffusion

Mathieu Malaterre Mathieu.Malaterre@creatis.insa-lyon.fr
Thu, 20 Feb 2003 15:18:18 +0100


Luis,

1) Option A:
I put the result of my images in:

http://www.creatis.insa-lyon.fr/~malaterre/vtk/Confidence-multiplier2-0.png
http://www.creatis.insa-lyon.fr/~malaterre/vtk/Confidence-multiplier2-05.png
http://www.creatis.insa-lyon.fr/~malaterre/vtk/Confidence-multiplier2-1.png

These image where obtain while setting the multiplier to 2.0 , 2.05 and 
2.1. The vessel is really too small in Confidence-multiplier2-0.png, but 
I can't get any further.

By the way in my pipeline I rescale (RescaleIntensityImageFilter) to 0 
255... hoping it won't bias the end of the pipeline ?


2) GradientAnisotropicDiffusionImageFilter

   I just can't live without my console. That's why I tried a grep in:

Insight/Code/BasicFilters:

$ grep -r m_TimeStep *
itkAnisotropicDiffusionFunction.h:    { m_TimeStep = t; }
itkAnisotropicDiffusionFunction.h:    { return m_TimeStep; }
itkAnisotropicDiffusionFunction.h:      m_TimeStep                 = 
0.125f;  // default value
itkAnisotropicDiffusionFunction.h:      os << indent << "TimeStep: " << 
m_TimeStep << std::endl;
itkAnisotropicDiffusionFunction.h:  TimeStepType    m_TimeStep;
itkAnisotropicDiffusionImageFilter.h:      m_TimeStep = 0.125f;
itkAnisotropicDiffusionImageFilter.h:      os << indent << "TimeStep: " 
<< m_TimeStep << std::endl;
itkAnisotropicDiffusionImageFilter.h:  TimeStepType     m_TimeStep;

That's right you set/get it, but no operation are done with it ??


That's why I am still convince that the time step parameter is not used.
Furthermore could you please try something like:

GradientAnisotropicDiffusionImageFilter image.png image1.png 15 .25 15
GradientAnisotropicDiffusionImageFilter image.png image2.png 15 1 15
GradientAnisotropicDiffusionImageFilter image.png image3.png 15 5 15
GradientAnisotropicDiffusionImageFilter image.png image4.png 15 25 15

and then
$ diff image1.png image2.png
$ diff image1.png image3.png
$ diff image1.png image4.png


(I also tried with number of iterations = 5, but the files are all 
exactly the same according to diff)
...so why are all these image exactly the same ?



Thanks again for your time,
mathieu

Luis Ibanez wrote:
> 
> 
> Hi Mathieu,
> 
> 
> 1) Before you give up completely with option (A),...
>    Did you tried running the Confidence connected
>    filter ontop of this gradient magnitude image ?
> 
>    The contour doesn't have to be perfectly closed,
>    a low border could be enough... depending on the
>    noise level of the input image.  Just keep in mind
>    that what your eyes see is not necessarily what
>    the ConfidenceConnected filter sees.
> 
>    (BTW, using a viewer with intensity window capabilities
>     may be a good idea, since you can better explore
>     the real values on the image).
> 
> 2) About the GradientAnisotropicDiffusionImageFilter:
> 
>    The reason why you don't find any mention to the
>    "TimeStep" in the header of this filter is that this
>    is defined in its base class, the
> 
>         itk::AnisotropicDiffusionImageFilter.
> 
>    Instead of browsing the headers you may want to
>    use the documentation generated by Doxygen. If you
>    want to browse code from the headers, may be you
>    should consider using "SourceNavigator" which is the
>    right tool for doing so. It works nicely with ITK
>    and VTK. You can download it for free from RedHat.
>    (a Google search will point you to the right place).
> 
> 
>    Before applying this filter to your own image,
>    please play with the example in
> 
>    Insight/Examples/Filtering/
> 
>      GradientAnisotropicDiffusionImageFilter.cxx
> 
>    using the images in Insight/Examples/Data.
> 
>    This is the code that was used for generating
>    the illustrations in the SoftwareGuide.
> 
>    Once you are familiar with the parameters,
>    got a cup of coffee and get ready to process
>    your image.
> 
>    Note that we use very few iterations in these
>    filters, however, since this is a diffusion
>    process, the more iterations you apply, the
>    smoother the image will become. There is a
>    trade-off between smoothing and computing
>    time which becomes more relevant in 3D.
>    Iteration in the order of 20 to 50 are reasonable
>    from the diffusion point of view, but probably
>    will result in long computation times.
> 
> 
> 
> Please let us know if you find any difficulties.
> 
> 
> 
>    Thanks
> 
> 
>      Luis
> 
> 
> 
> -----------------------------------------
> Mathieu Malaterre wrote:
> 
>> Hi all, Hi Luis,
>>
>>   As you suggested in:
>> http://www.itk.org/pipermail/insight-users/2003-February/002580.html
>>
>>
>> I tried first option (A). But I couldn't find no good paramaters to 
>> have a closed surface.
>>
>> See for differents sigma value :
>> http://www.creatis.insa-lyon.fr/~malaterre/vtk/vessel_sigma5.png
>> and
>> http://www.creatis.insa-lyon.fr/~malaterre/vtk/vessel_sigma10.png
>>
>> So I tried option (B). I tried first an edge preserving filter which 
>> is to say GradientAnisotropicDiffusionImageFilter. I browse the 
>> ItkSoftwareGuid.pdf and on p96, chap 5. (Filtering) you wrote:
>>
>> [Typical values for the time step are 0.25 in 2D images and 0.125 in 
>> 3D images.]
>>
>> But if you browse now the source code of this filter there is no 
>> mention to TimeStep ?
>> What did I misunderstood ? What are the real parameters that affect 
>> this filter ?
>>
>>
>> thanks,
>> mathieu
>>
>>
>>
> 
> 
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
> 


-- 
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/