[Insight-developers] ConstShapedNeighborhoodIterator inheritance
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Mon Oct 10 03:40:45 EDT 2005
On Mon, 10 Oct 2005 00:39:37 +0200, Joshua Cates <cates at sci.utah.edu>
wrote:
> Hi Gaetan,
>
> Superclass members are private where they don't make sense in the
> context of a neighborhood of arbitrary shape. There is no guarantee,
> for example, that a ShapedNeighborhood has a center pixel.
Are you sure it don't make sense to access the value of the center pixel,
even if it is not in the neighborhood ?
There is lots of case where it make sense: Every time you need to look at
the neighbors values to set the center pixel value, or everytime you need
to compare the center pixel value and the neighbor value to set the values
of the neighbors.
I have already used 5 iterators (!) only for the flooding part of a
morphological watershed, if the Set/GetCenterPixel() methods are not
available, I'll have to use 2 more iterators...
Gaetan
>
> Josh.
>
>
> On Oct 9, 2005, at 2:10 PM, Gaetan Lehmann wrote:
>
>>
>> Hi,
>>
>> ConstShapedNeighborhoodIterator is a subclass of NeighborhoodIterator.
>> Sadely,
>> all members of the superclass are private:
>>
>> class ITK_EXPORT ConstShapedNeighborhoodIterator
>> : private NeighborhoodIterator<TImage, TBoundaryCondition>
>>
>> It prevent usage of Set/GetCenterPixel() methods, which is really
>> annoying.
>> Is there a good reason to do that ?
>> Is it possible to switch to a public inheritance ?
>>
>> class ITK_EXPORT ConstShapedNeighborhoodIterator
>> : public NeighborhoodIterator<TImage, TBoundaryCondition>
>>
>> Thanks,
>>
>> Gaetan
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk.org
>> http://www.itk.org/mailman/listinfo/insight-developers
>
--
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
More information about the Insight-developers
mailing list