[ITK-dev] Deprecated Begin/End in iterators?

Williams, Norman K norman-k-williams at uiowa.edu
Fri Jul 11 10:14:11 EDT 2014


I ran into this when doing an explicit instantiation of ImageRegionIterator.

Explicit instantiation will elaborate every method in a class, not just the ones that are called, so ImageRegionIterator::Begin (which is deprecated) is implemented by calling Superclass::Begin (which is also deprecated) which throws a compiler warning about the method being deprecated.

My first impulse was to change the implementation to call the non-deprecated Superclass::GoToBegin,  but that’s kind of silly — it’s probably not worth the effort to push through Gerrit.

The real question is this: Why are Begin and End deprecated in the Image Region iterators, and not in all the other classes?  There are a lot of classes that have Begin/End and not GoToBegin and GoToEnd:

ConstShapedNeighborhoodIterator
ConstSliceIterator
EquivalencyTable
FixedArray
FixedArray
ImageConstIterator
ImageConstIteratorWithIndex
ImageConstIteratorWithOnlyIndex
ImageIterator
ImageRegionConstIterator
ImageRegionIterator
ImageRegionReverseConstIterator
ImageRegionReverseIterator
ImageReverseConstIterator
IndexedContainerInterface
IndexedContainerInterface
MapContainer
MapContainer
MetaDataDictionary
MetaDataDictionary
Neighborhood
Neighborhood
NeighborhoodIterator
ObjectStore
Point
ShapedNeighborhoodIterator
SliceIterator
SparseFieldLayer
SparseFieldLayer
SpecialCoordinatesImage
ThreadedIteratorRangePartitioner
VectorContainer
VectorContainer
NarrowBand
NarrowBand
MultivariateLegendrePolynomial
MultivariateLegendrePolynomial
Histogram
Histogram
ImageToListSampleAdaptor
ImageToListSampleAdaptor
ImageToNeighborhoodSampleAdaptor
ImageToNeighborhoodSampleAdaptor
JointDomainImageToListSampleAdaptor
JointDomainImageToListSampleAdaptor
ListSample
ListSample
MembershipSample
MembershipSample
PointSetToListSampleAdaptor
PointSetToListSampleAdaptor
Subsample
Subsample
VectorContainerToListSampleAdaptor
VectorContainerToListSampleAdaptor
LevelSetContainerBase
LevelSetContainerBase
LevelSetEquationContainer
LevelSetEquationContainer
LevelSetEquationTermContainer
LevelSetEquationTermContainer
OneWayEquivalencyTable
WatershedSegmentTable
WatershedSegmentTable
WatershedSegmentTree
WatershedSegmentTree



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-developers/attachments/20140711/a40981ca/attachment.html>


More information about the Insight-developers mailing list