[Insight-users] Re: Fwd: Re: anisotropic filter - segmentation fault
Luis Ibanez
luis.ibanez@kitware.com
Fri, 06 Dec 2002 17:36:30 -0500
Hi Ghassan,
The reason for the segmentation fault is that you
are actually instantiating an
"AnisotropicDiffusionImageFilter"
http://www.itk.org/Doxygen/html/classitk_1_1AnisotropicDiffusionImageFilter.html
This is the base class for a family of filters
and it is not intended to be instantiated.
You may want to instantiate any of its derived classed:
CurvatureAnisotropicDiffusionImageFilter
http://www.itk.org/Doxygen/html/classitk_1_1CurvatureAnisotropicDiffusionImageFilter.html
GradientAnisotropicDiffusionImageFilter
http://www.itk.org/Doxygen/html/classitk_1_1GradientAnisotropicDiffusionImageFilter.html
VectorCurvatureAnisotropicDiffusionImageFilter
http://www.itk.org/Doxygen/html/classitk_1_1VectorCurvatureAnisotropicDiffusionImageFilter.html
VectorGradientAnisotropicDiffusionImageFilter
http://www.itk.org/Doxygen/html/classitk_1_1VectorGradientAnisotropicDiffusionImageFilter.html
I just tried your code with
itkCurvatureAnisotropicDiffusionImageFilter
and works ok.
Please note that a random image is probably not the best
input for this type of filter since this is an edge preserving
smoothing. The random image is 'edges-everywhere' so the output
will look as random as the input.
You may be in a more interesting case using the BrainWeb
images from the ftp server.
Probably the best advice about iteration, conductance an
timestep is what Josh recommended on a previous email:
http://www.itk.org/pipermail/insight-users/2002-March/000169.html
> For parameters, start with about 10-15 iterations of the filters using
> Conductance parameters of 1.0 and TimeStep of 0.125. You can lower
> the time step value, but values much higher than 0.125 will not
> produce stable solution
Please let us know if you have further questions.
Thanks
Luis
======================================
Ghassan Hamarneh wrote:
> Thanks Luis,
>
> I will try what you suggested.
>
> Strange that you can't access the website! I attached the files for you.
>
> Yes I am getting a segmentation fault:
>
> [itk_anldf]$ ./itk_anldf ../../imgs/img1.mhd new.img 2 2
> Segmentation fault (core dumped)
>
> I tried different iterations and conductance parameters. What range for
> the latter do you recommend?
>
>
> Thank you,
> /Ghassan
>
>
> On Fri, 6 Dec 2002, Ghassan Hamarneh wrote:
>
>