[Insight-users] ITK 1.6: Segmentation fault
Luis Ibanez
luis.ibanez at kitware.com
Sun, 11 Apr 2004 02:37:47 -0400
Hi Rodrigo,
This is unpleasant but normal.
A) From the practical point of view:
The MagnitudeGradientRecursiveGaussian uses a IIR filter
in order to approximate the effect of convolving with a
Gaussian. This filter is of 4th order which means that it
needs at least four input samples in order to compute its
output. The consequence is that you need to provide images
that are at least 4 pixels in size along every dimension.
B) From the theoretical point of view:
There is no point in attempting to compute the gradient
magnitude of a single slice image in 3D, since along the
Z direction this is the equivalent of convolving a Dirac
delta with the derivative of a gaussian and then multiply
by another Dirac delta.... the result along Z will be a
deceiving zero.
If what you want is to smooth the slice along X and Y, then
you should convert your degenerate 3D image into a 2D image
by using the ExtractImageFilter. Then you can apply the
GradientMagnitude filter in 2D.
You will find examples on the use of the ExtractImageFilter in:
Insight/Examples/IO
Please let us now if you have any further questions.
Thanks
Luis
----------------------
Rodrigo Vivanco wrote:
> Hello,
>
> I'm getting a segmentation fault with the MagnitudeGradiantRecursiveGaussian
> when the input is a single slice 3d image, i.e. (x,y,z)=(256,256,1). The
> MagnitudeGradiant works fine with the test dataset. With more than 1 slice in
> a 3D dataset, the MagnitudeGradiantRecursiveGaussian works as expected.
>
> -rodrigo
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>