[Insight-users] Open/Close operation just within a mask

Roman Grothausmann roman.grothausmann at helmholtz-berlin.de
Thu Nov 12 10:27:32 EST 2009


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
> 
> 


More information about the Insight-users mailing list