[Insight-developers] ImageRegionConstIterator operator*

Yarden Livnat yarden at cs . utah . edu
Wed, 25 Jun 2003 09:30:29 -0600


Luis,

Iterators should follow a certain conventions such as providing
++, and * (dereferencing) operators. It's true that as long as one
work only within the realm of ITK get() is fine, it is not a standard
way. Once you start working with external code you start to appreciate
consistency. For example, we can not use ITK iterator for SCIRun code
which assume it can dereference an iterator (as in STL) in order to get
to the object. Of cause one can (and we did) derive a new iterator from
the ITK iterator and added the operator*() which in turn calls .get() 
but
it will be cleaner in general if the dereferencing will be part of ITK 
iterators.

does it make sense ?

	Yarden

On Wednesday, June 25, 2003, at 09:15  AM, Luis Ibanez wrote:

>
> Hi Darby,
>
> Is there any reason for not using the
> current "Get()" method in your code ?
>
>
>   Luis
>
>
> ------------------------
> Darby J Van Uitert wrote:
>> Can I add the operator* to the ImageRegionConstIterator class?
>> 	-darby j
>> ---------------------------
>> Darby J Van Uitert
>> SCI Institute
>> University of Utah
>> Email: darbyb at cs . utah . edu
>> Phone: 801.585.1869
>> ---------------------------
>> _______________________________________________
>> Insight-developers mailing list
>> Insight-developers at itk . org
>> http://www . itk . org/mailman/listinfo/insight-developers
>
>
>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk . org
> http://www . itk . org/mailman/listinfo/insight-developers
>