[Insight-developers] Code Review of BinaryMorphologicalOpening/Closing
Gaëtan Lehmann
gaetan.lehmann at jouy.inra.fr
Wed May 11 04:24:08 EDT 2011
Hi Luis,
Le 11 mai 11 à 00:10, Luis Ibanez a écrit :
> 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
>
Great!
> --
>
> 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 ?
>
Please look at the figures in http://insight-journal.org/download/viewpdf/58/2
> and why are not an issue in the Opening filter, where
> on would expect to find a dual implementation of the
> Closening filter ?
>
This is because this is a binary filter, so some optimisations can be
made for the opening.
In grayscale, both closing and opening must have this extra padding to
produce border effect free result.
>
> The two extra Padding and Cropping filters are an onerous
> addition to the pipeline, and don't seem to be justified...
>
Sure they are onerous, but needed in most of cases.
There is an option to disable them in case the user wants more
efficiency, at the cost of the border effects.
Regards,
Gaëtan
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr http://www.itk.org
http://www.mandriva.org http://www.bepo.fr
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110511/2b9720fc/attachment.pgp>
More information about the Insight-developers
mailing list