Hello,

I have encountered problems because the ConditionalInterators are returning by 
reference and not value. Specifically, the following function signature is 
problematic for VectorImages:

const PixelType & Get(void) const;


This signature is different then the more commonly used ImageRegion iterators 
or NeighborhoodIterator. Where it is simply:

PixelType Get() const;

As the later types of iterators are the most commonly used, and I presume they 
appear to have quite a reasonable performance characteristics, I believe that 
is the way to go to make all the iterator interfaces more uniform.

Additionally, the return by reference is not compatible with the VectorImage's 
VariableLengthVector which is used through out SimpleITK. Specifically I am 
currently in the progress of getting the VectorConfidenceConnectedImageFilter 
to work with VectorImages.

I am e-mailing the developers list to see if any one is aware of the history of 
why these iterators have diverged. Or are there other specific concerns.

There is a surprisingly simple patch for this issue in gerrit:
http://review.source.kitware.com/#/c/5295/1

Thanks,
Brad

========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
[email protected]



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to