[Insight-users] Morphology - pattern matching

Michael Baltaxe mbaltaxe at gmail.com
Tue Apr 1 15:07:26 EDT 2008


Hi all,

I want to perform a morphological operation in which I want to remove all
the pixels that match a pattern in a kernel.

For example, if my image is

0 0 0 0 0 0
0 1 1 1 1 0
0 1 1 1 1 0
0 1 1 1 1 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0

and my kernel is:

1 1
1 1

I want the output to be

0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 1 0 0 0
0 0 0 0 0 0

Is there something in ITK that performs this operation? I found the
NormalizedCorrelationImageFilter, but I am not sure how to use it, could
someone give me some hints on this filter if it the one I should be using?

Thanks a lot,

Michael.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080401/2f8754bb/attachment.htm>


More information about the Insight-users mailing list