[Insight-users] morphological openings by a segment

Luis Ibanez luis.ibanez at kitware.com
Wed, 21 Apr 2004 09:36:57 -0400


Hi Yann,

There are examples in the SoftwareGuide:

    http://www.itk.org/ItkSoftwareGuide.pdf

Please look at section 11.4.2. pdf-page 515.
"ShapedNeighborhoodIterator",

Josh Cates put together a nice series of
examples on how to use ITK iterators.

In particular you will find an example
on how to use the ShapedNeighborhoodIterator
in order to do Morphological operations.
(pdf-page 515, paper-page: 490).

The associated code is available at

    Insight/Examples/Iterators/
        ShapedNeighborhoodIterators1.cxx



   Regards,


      Luis


--------------------
Yann GAVET wrote:

> Thank you Luis.
> 
> Im sorry to ask again, I cannot find how to generate a structuring element.
> I guess I should use a Neighborhood and set the pixels in my element to 
> 1, but I cant find any example and help on that.
> 
> Yann.
> 
> Luis Ibanez wrote:
> 
>> Hi Yann,
>>
>> It seems that you suggest to use several different
>> structuring elements, each one associated with a
>> particular direction.
>>
>> If this is the case, computing each openning and the
>> making the union of them seems to be a reasonable
>> way to go.  It won't necessarily be the fastest
>> implementation, but at least will allow you to get
>> a prof of concept.
>>
>>
>>    Regards,
>>
>>
>>        Luis
>>
>>
>> -------------------
>> Yann GAVET wrote:
>>
>>>    Hi all,
>>>
>>> I want to do perform the union of the openings by a segment of a 
>>> given size in several directions (say 48 for example), and I wonder 
>>> how to do it.
>>>
>>> I m thinking of creating all the segments, then computing the 
>>> openings, and doing the binary union of the results.
>>>
>>> Do you think this is the best way to do it?
>>>
>>> regards.
>>> yann
>>
>>
>>
>>
>>
>>