[Insight-users] Still struggling with implementing grayscale morphological operators

Luis Ibanez luis.ibanez at kitware.com
Wed Jul 29 12:09:53 EDT 2009


Hi Harvey,

For your convenience, we just added an example on the use of
the GrayscaleFunctionDilateImageFilter to:

Insight/Examples/Filtering/GrayscaleFunctionDilateImageFilter.cxx

Please also find it attached to this email.


The code is quite straight forward:

  * read an image
  * instantiate filter
  * create structuring element
  * connect pipeline : reader, filter, writer
  * run


Please give it  try and let us know if you have any questions.


    Thanks


         Luis



---------------------------------------------------------------------------------------
On Tue, Jul 28, 2009 at 6:40 PM, Neal R. Harvey <harve at lanl.gov> wrote:

> I am still struggling to implement grayscale morphological operators.
> The basic functions have been written:
> e.g.
> http://www.itk.org/Doxygen310/html/classitk_1_1GrayscaleFunctionDilateImageFilter.html
> Unfortunately there are no nice papers or tutorials, or even test code to
> provide insight as to exactly
> how to go about using them.
>
> It appears that they use a neighborhood kernel and I haven't been able to
> figure out how to create a
> grayscale kernel. I have gone through the book - the part that describes
> neighborhood iterators, but
> so far that hasn't been a great deal of help. The examples they provide
> don't exactly show how to
> assign "grayscale" values to your kernel neighborhood iterator. The
> examples are for sobel and gaussian
> kernels, where there is code in the background that calculates the values
> for you. You never see the details
> of how it is used. The other examples they show in the book are for binary
> morphology, but that doesn't
> require graylevel values kernels, so also isn't much use.
>
> Basically, I think I need to be able to read in an input image that is to
> be processed and two images that
> define the grayscale structuring element (SE), and output a processed
> image. One of the SE images
> defines the region of support of the SE (i.e. anywhere where the values are
> greater than 0 are in the
> SE's region of support). The other SE image defines the grayscale values in
> the SE. I then have to use
> these two SE images to create a suitable kernel.
>
> Below is the code that I have written so far, in attempting to write my own
> Grayscale Morphological
> Operator based on the examples provided in the book. As you can see, it's
> not working and I am not
> sure how to solve that problem.
>
> If anyone has any suggestions or ideas of how to get this working, or where
> to look to get information
> that could lead in that direction, it would be very much appreciated.
>
> Kindest regards
>
> Harve
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090729/2c4027b3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GrayscaleFunctionDilateImageFilter.cxx
Type: text/x-c++src
Size: 2293 bytes
Desc: not available
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090729/2c4027b3/attachment.cxx>


More information about the Insight-users mailing list