[Insight-users] Re: Usage of GradientAnisotropicDiffusion Image filter

Luis Ibanez luis.ibanez at kitware.com
Sat Nov 20 19:32:46 EST 2004


Hi Vijay,

When using AnisotropicDiffusion filters, the maximum value of
the time step that is still numerically stable is described
in the Doxygen documentation:

http://www.itk.org/Insight/Doxygen/html/classitk_1_1AnisotropicDiffusionFunction.html
http://www.itk.org/Insight/Doxygen/html/classitk_1_1AnisotropicDiffusionImageFilter.html


It is described as :

                      ( 1/2 )^ N


Where N is the dimensionality of the image.

This is therefore

                     0.250 for 2D
                     0.125 for 3D

Of course, you should be *below* that limit. For example

                     0.240 for 2D
                     0.120 for 3D

You may want to eliminate the posibility that something
is wrong in the pasage of the image when it is returned
from the function.  Please save the output image from
the function before returning and double check if it is
really identical to the input image.


You may want to experiment with the values of this filter
by using the command line example available in


      Insight/Examples/Filtering/
         GradientAnisotropicDiffusionImageFilter.cxx

This program expects as command line arguments the input
image, the filename for saving the output image, the
number of iteration, the time step and the conductance.

By using this example you should be able to figure out
good values for the degree of smoothing that you want
for your image.



You may also want to experiment with the ITK plugin
for VolView that wraps this same anisotropic filters.
You can download the free version of VolView from


     http://www.kitware.com/products/volview.html




There is also a built-it GradientAnisotropic diffusion
filter (actually several of them) in the first stage
of the demo application:

        InsightApplications/
                RegionGrowingSegmentation


You may use this GUI application to experiment with the
parameters of the smoothing filter.



  Please let us know if you have further questions,


       Thanks


          Luis



----------------------
Vijay Prashanth wrote:
> Hi Luis,
...
> Now the for question regarding GradientAnisotropicDiffusion Image filter:
> 
> I used the filter operations as below
> 
> {        typedef GradientAnisotropicDiffusionImageFilter<ScalarImageType,
> ScalarImageType> DiffusionFilterType;
>           DiffusionFilterType::Pointer diffusion =
> DiffusionFilterType::New();    
>                    
>           diffusion->SetInput(pImage);                    
> 
>           diffusion->SetNumberOfIterations(numberOfIterations);
> diffusion->SetTimeStep(timeStep);
>          diffusion->SetConductanceParameter(conductance);                
>                     
>          diffusion->Update();
>         diffusion->Register();
> 
>          return (diffusion->GetOutput()); // returning as a void*
>   }  
> 
> I am using a iteration number of 5 , timestep = 0.125, conductance = 1.0.
>  
> First, the timestep is set to a minimum stable of  0.125 inside the base
> class, so when I tried to give a high value it gave a warning message. Is
> this timestep value OK for 3d images also?.
> Next how is this time step value used?.
>  
> And finally the output image the filter was producing was the same as the
> input image. 
> Why is this happening even when I tried for higher iteration value.
>  
> Could provide a solution how to obtain the processed output image(with
> reduced noise and smoothened features) using this filter.
> Also Could you give some link to sample test images for the testing of the
> smoothening filters.
>  
> Thanks & Regards,
> Vijay.
> 
>  
> 





More information about the Insight-users mailing list