Open/Close operation just within a mask

View: New views
5 Messages — Rating Filter:   Alert me  

Open/Close operation just within a mask

by Roman Grothausmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Mailing list members,


I'm new to ITK and am wondering if there is a possibility that would
allow me to apply open/close only within a mask. Such that the actual
image is only opened/closed in the regions where the masking image is
not zero.
Or would there be a way to open/close only when there a three segments
(background and two other) contained inside the kernel?

Any help is very much appreciated
Roman


--
Roman Grothausmann

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Bereich Funktionale Materialien
Institut für angewandte Materialforschung
Hahn-Meitner-Platz 1
D-14109 Berlin

Tel.: +49-(0)30-8062-2816
Fax.: +49-(0)30-8062-3059

Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher
Forschungszentren e.V.
Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph,
Stellvertretende Vorsitzende: Dr. Jutta Koch-Unterseher,
Geschäftsführer: Prof. Dr. Anke Kaysser-Pyzalla, Prof. Dr. h.c. Wolfgang
Eberhardt, Dr. Ulrich Breuer  Sitz Berlin, AG Charlottenburg, 89 HRB 5583



_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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

Re: Open/Close operation just within a mask

by Luis Ibanez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Roman,

You may want to try the filters:

ReconstructionByDilationImageFilter
http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ReconstructionByDilationImageFilter.html

ReconstructionByErosionFilter
http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ReconstructionByErosionImageFilter.html


That were contributed by Gatean Lehmann.

Please let us know if that's what you are looking for,


      Thanks


            Luis


---------------------------------------------------------
On Wed, Oct 28, 2009 at 4:43 AM, Roman Grothausmann
<roman.grothausmann@...> wrote:

> Dear Mailing list members,
>
>
> I'm new to ITK and am wondering if there is a possibility that would allow
> me to apply open/close only within a mask. Such that the actual image is
> only opened/closed in the regions where the masking image is not zero.
> Or would there be a way to open/close only when there a three segments
> (background and two other) contained inside the kernel?
>
> Any help is very much appreciated
> Roman
>
>
> --
> Roman Grothausmann
>
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
> Bereich Funktionale Materialien
> Institut für angewandte Materialforschung
> Hahn-Meitner-Platz 1
> D-14109 Berlin
>
> Tel.: +49-(0)30-8062-2816
> Fax.: +49-(0)30-8062-3059
>
> Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren
> e.V.
> Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph,
> Stellvertretende Vorsitzende: Dr. Jutta Koch-Unterseher, Geschäftsführer:
> Prof. Dr. Anke Kaysser-Pyzalla, Prof. Dr. h.c. Wolfgang Eberhardt, Dr.
> Ulrich Breuer  Sitz Berlin, AG Charlottenburg, 89 HRB 5583
>
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.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
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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

Re: Open/Close operation just within a mask

by Roman Grothausmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Luis Ibanez wrote:

> Hi Roman,
>
> You may want to try the filters:
>
> ReconstructionByDilationImageFilter
> http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ReconstructionByDilationImageFilter.html
>
> ReconstructionByErosionFilter
> http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ReconstructionByErosionImageFilter.html
>
>
> That were contributed by Gatean Lehmann.
>
> Please let us know if that's what you are looking for,
>

I'm looking for a "binary morphology open" that is only performed within
the areas of the marker image. If I get the description of
ReconstructionByDilation right then this is not what I need.
Is DilationByRecontruction (as mentioned in
http://www.itk.org/Doxygen/html/classitk_1_1OpeningByReconstructionImageFilter.html)
the same as ReconstructionByDilation?

Thanks a lot for Your help
Roman
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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

Re: Open/Close operation just within a mask

by Luis Ibanez :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Roman,

0) The term "DilationByRecontruction" in
http://www.itk.org/Doxygen/html/classitk_1_1OpeningByReconstructionImageFilter.html

     seems to be a typo, since we don't have such
     an operation.

1) It seems that we have misinterpreted your need
    here.


Let me suggest then the following:

a) Take the input image and the mask,
     pass them to the MaskImageFilter,
b)  pass the output of the MaskImageFilter
     to the Opening filter,
c)  Take the original input image and the
     mask and pass them to the Negated
     Mask filter
d)  Finally make an OR of the output of
     the opening filter and the negated mask
     filter.

Yes... this takes a lot more memory and
processing time, but at least seems to be
the actual process that you want to accomplish.


     Regards,


            Luis


---------------------------------------------------------------
On Wed, Nov 4, 2009 at 8:40 AM, Roman Grothausmann
<roman.grothausmann@...> wrote:

> Luis Ibanez wrote:
>>
>> Hi Roman,
>>
>> You may want to try the filters:
>>
>> ReconstructionByDilationImageFilter
>>
>> http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ReconstructionByDilationImageFilter.html
>>
>> ReconstructionByErosionFilter
>>
>> http://public.kitware.com/Insight/Doxygen/html/classitk_1_1ReconstructionByErosionImageFilter.html
>>
>>
>> That were contributed by Gatean Lehmann.
>>
>> Please let us know if that's what you are looking for,
>>
>
> I'm looking for a "binary morphology open" that is only performed within the
> areas of the marker image. If I get the description of
> ReconstructionByDilation right then this is not what I need.
> Is DilationByRecontruction (as mentioned in
> http://www.itk.org/Doxygen/html/classitk_1_1OpeningByReconstructionImageFilter.html)
> the same as ReconstructionByDilation?
>
> Thanks a lot for Your help
> Roman
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.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
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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

Re: Open/Close operation just within a mask

by Roman Grothausmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear Luis,


Thanks a lot for Your answers. I thought about such a procedure but I
think this is still different to what I need since the opening filter
will see the newly created borders from the masking. So when I combine
the results again there'll be thin disconnections in my binary image
where the border of the mask lay, won't there?
So I guess I should write my own opening filter that performs erosion
and dilation on the unmodified original image only where the mask is 1.
Does that make sense or am I overlooking some problem there?

Thanks for all the help
Roman


Luis Ibanez wrote:

> a) Take the input image and the mask,
>      pass them to the MaskImageFilter,
> b)  pass the output of the MaskImageFilter
>      to the Opening filter,
> c)  Take the original input image and the
>      mask and pass them to the Negated
>      Mask filter
> d)  Finally make an OR of the output of
>      the opening filter and the negated mask
>      filter.
>
> Yes... this takes a lot more memory and
> processing time, but at least seems to be
> the actual process that you want to accomplish.
>
>
>      Regards,
>
>
>             Luis
>
>
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.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