[Insight-developers] ImageRegionIterator consistency issues

Zachary Pincus zpincus at stanford.edu
Thu Jan 26 05:02:46 EST 2006


Hello again -

Today Gaetan and I have uncovered some minor consistency issues in  
the ImageRegionIterators. One issue I can fix (and will in the next  
few days); one I am not sure of what to do about.

--------
Issue the first:

itkImageRegionConstIterator.h defines a constructor that looks like  
this:
   ImageRegionConstIterator( const ImageIterator<TImage> &it)
   {
     this->ImageIterator<TImage>::operator=(it);
     ...
   }

The only problem is that ImageRegionConstIterator doesn't inherit  
from ImageIterator, so the first line of the constructor doesn't  
compile. Since this iterator inherits from ImageConstIterator, the  
first line should look like this:
     this->ImageConstIterator<TImage>::operator=(it);

This should fix things.

--------
Issue the second:

itkImageRegionIterator.txx defines a constructor that looks like this:

template< typename TImage >
ImageRegionIterator<TImage>
::ImageRegionIterator( const ImageIteratorWithIndex<TImage> &it):
   ImageRegionConstIterator<TImage>(it)
{
}

Unfortunately, ImageRegionConstIterator doesn't define any  
constructors that are compatible with an ImageIteratorWithIndex  
parameter, so this method also fails to compile. I'm not sure what  
the correct approach would be for fixing this issue.

Zach



More information about the Insight-developers mailing list