[Insight-developers] Code Review of BinaryMorphologicalOpening/Closing

Bradley Lowekamp blowekamp at mail.nih.gov
Tue May 10 20:58:27 EDT 2011


Luis,

I just looked at these filter closely for simpleITK.

The closing filter grows the mask and only replaces pixel with more foreground pixel. However for the closing filter the mask is shrunk, and the removed masked needs to be replaced with background pixels. So, this make since to me.

Brad

On May 10, 2011, at 6:14 PM, Luis Ibanez wrote:

> Hi Gatean,
> 
> Also,
> The Opening filter uses "Foreground" and "Background"
> member variables, while the Closening filter only uses
> "Foreground".
> 
> Why are not they symmetric implementations ?
> 
> 
>     Thanks
> 
> 
>          Luis
> 
> 
> ---------------------------------------------------
> On Tue, May 10, 2011 at 6:10 PM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>> Hi Gaetan,
>> 
>> I'm reviewing the classes:
>> 
>>    itkBinaryMorphologicalClosingImageFilter
>>    itkBinaryMorphologicalOpeningImageFilter
>> 
>> to move them out of the Review directory
>> according to Xiaoxiao's patch:
>> 
>>    http://review.source.kitware.com/#change,1623
>> 
>> --
>> 
>> Could you comment on why is that the Closening filter
>> is not simply a dual implementation of the Opening filter ?
>> 
>> In particular, the Closening filter has a "m_SafeBorder"
>> boolean variable, and an associated block of code that
>> introduces  two more filters in the pipeline in order todo
>> Padding and Cropping.
>> 
>> What are the border effects that motivate this logic ?
>> 
>> and why are not an issue in the Opening filter, where
>> on would expect to find a dual implementation of the
>> Closening filter ?
>> 
>> 
>> The two extra Padding and Cropping filters are an onerous
>> addition to the pipeline, and don't seem to be justified...
>> 
>> 
>>     Thanks for any hints
>> 
>> 
>>           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://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-developers



More information about the Insight-developers mailing list