[Insight-users] RecursiveGaussianImageFilter problems

Luis Ibanez luis.ibanez@kitware.com
Mon, 06 May 2002 20:23:05 -0400


Hi Bjorn,

Its good to know that the pixel type problem was solved !,


About converting the image that you generated
into a potential map:

According to the text in the URL that you indicated, you seem
to be computing the Laplacian of the original image.
(It wasn't clear where  the DiscreteGaussianFilter was used though...)

If what you obtain is the Laplacian of your image, it will have positive 
and
negative values around the edges and will have near zero values in monotonic
regions. So it seems that the only thing missing is to rescale the intensity
values from [min,max] to [-1,1].

You can use the two following filters combined:

itkMinimumMaximumImageFilter
http://www.itk.org/Doxygen/html/classitk_1_1MinimumMaximumImageFilter.html

itkShiftScaleImageFilter
http://www.itk.org/Doxygen/html/classitk_1_1ShiftScaleImageFilter.html

The first will compute the maximum and minimum values in
intensity of your image. The second will allow you to apply pixel-wise
a linear transformation on the intensity of the image.

The itkMinimunMaximumImageFilter is a bit particular in that
the output image is identical to the input image. It actual useful
values are the ones that you get with:

GetMaximum() and GetMinimum().

Using this two values you can update the itkShiftScaleFilter input
parameters in order to set the linear transform that will map the
intensity values to  [-1,1].


This connection will require that you hard code the intensity
transform.  This is due to a temporary limitation in ITK pipeline
mechanism which doen't allow yet to pass data different from
Images and Meshes.   This is being analyzed so hopefully we
will be able soon to pass types like integers, floats, transforms,
points... etc through pipeline connections of the type

        a->GetInput(  b->GetOuput() )



Please let us know if you find any problem by doing this
intensity transformation.


   Thanks


      Luis


=============================================================

Bjorn Hanch Sollie wrote:

>>What is the pixel type that you are using for you ImageType ?
>>
>
>I'm using floats, which is why I didn't understand the palette
>distortion.  As it turned out, it was a cast at a different spot in my
>code that caused the problem.  It is now fixed, and the filter appears
>to work.  Thanks for helping me out!  The quite pleasing result may be
>beholded at:
>
>   <URL:http://www.pvv.org/~bhs/edge.html>
>
>Howver this makes for another problem: The filtered edge image above
>is quite difficult to use as a potential image for the
>FastMarchingImageFilter, which is what I was aiming for in the first
>place.  The potential image needs to be close to 1 at the edges and
>close to 0 in monotonous regions, but with both the high and low
>extremas in intensity occuring near or around the edges in this image,
>it appears to be difficult to convert this image into a potential map.
>Except for this problem, I appear to be quite close to my goal, in the
>sense that the image does contain the edges I've been looking for.
>Does anyone have any suggestions on how I can do this?  (Thresholding
>is simple, but a bit too dangerous I fear...)
>
>-Bjorn
>