[Insight-users] GradientRecursiveGaussianImageFilter bug?

Luis Ibanez luis.ibanez at kitware.com
Thu Oct 7 16:51:15 EDT 2004


Hi Neilson,

The GradientRecursiveGaussianImageFilter requires your image
to have *at least* of 4 pixels along every dimension.

The reason is that it internally computes IIR filters of 4th
order and therefore it requires minimum 4 input values in order
to compute an output.

If you pass a 2D image inside a 3D one, (e.g. a Degenerate image)
it is to expect that *ANY* 3D filter based on neighborhoods will
fail because they will be looking for data outside of the plane
of your slice.

If what you have is a 2D image, then you should run the filter
instantiated in 2D.

The current version of this filter is actually throwing an
exception when you attempt to run it on an input image that has
less than 4 pixels along any dimension.


If you are doing this in order to register a point set versus
a set of 2D slices, note that the slices *DO NOT* provide any
information along the direction orthogonal to their plane.
Therefore, the Gradients that you compute from slices *must* be
2D gradients that you then place in a 3D space by using the position
of the plane in 3D space.  If you imagine a scene with the image
slices and their associated vectors, the vectors will be in 3D
but they will be parallel to the slice plane.


Please let us know if you have further questions.


    Thanks


       Luis



------------------------------
N.E. Mackenzie Mackay wrote:

> Howdy,
> 
>     I am currently trying to run the 
> GradientRecursiveGaussianImageFilter on an image and am having some 
> troubles.  I am using the GradientRecursiveGaussianImageFilter filter 
> example code provided in the itk version 1.6.0 version and have made no 
> changes.
> 
>     My problem is I cannot run the filter on a specific kind of 3 
> dimensional image.  The image is actually a 2 dimensional image that I 
> have simply read in as a 3 dimensional one.  When I run the filter I 
> keep getting an abnormal termination error.  I have narrowed it down to 
> being in itkRecursiveSeparableImageFilter on line 178 approxamatly.
> 
>     s2[i-1] = RealType(...)
> 
> I couldn't go further then that because I didn't know how.  I was 
> wondering if anyone could give me some pointers on how to overcome this 
> problem.
> 
> The real reason I am looking into this is this same function is called 
> in the itkPointSetToImageRegistrationMethod and I need to over come it 
> before I can proceed.
> 
> Thank you,
> Neilson
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
> 
> 






More information about the Insight-users mailing list