[Insight-developers] Code Review of BinaryMorphologicalOpening/Closing

Luis Ibanez luis.ibanez at kitware.com
Wed May 11 13:53:20 EDT 2011


Hi Gatean,

2011/5/11 Gaëtan Lehmann <gaetan.lehmann at jouy.inra.fr>:
>
> Please look at the figures in
> http://insight-journal.org/download/viewpdf/58/2
>

mm,
Still doesn't make sense to me.

There seems to be an underlying assumption
that the image is not really binary, but that
instead it contains more than two labels.


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


I'm referring in both cases to the Binary version of the filters.
The implementation of Opening is not the dual of Closening.

Why ?

Are we building on the assumption that the "outside"
of the image is supposed to be at background level ?


> In grayscale, both closing and opening must have this extra padding to
> produce border effect free result.
>

Not talking about grayscale yet...
(we should get there soon)...

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


Why is this option only in the Closing filter
and not in the Opening one ?

They are supposed to be dual operations, isn't it ?

Closening the foreground should produce the
same result as Opening the background.

That is, I should be able to run an Opening operation
by using the Closing filter, and switching the values
of Foreground and Background.

The current implementation of the BinaryMorphology
{Opening,Closing} does not reflect this duality.


     Thanks for any hints,


           Luis


More information about the Insight-developers mailing list