18#ifndef itkImageRegionReverseConstIterator_h
19#define itkImageRegionReverseConstIterator_h
102template <
typename TImage>
152 m_SpanBeginOffset = 0;
162 m_SpanBeginOffset = this->m_BeginOffset;
163 m_SpanEndOffset = this->m_BeginOffset -
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]);
179 m_SpanBeginOffset = this->m_Offset +
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]) -
180 (ind[0] - this->m_Region.GetIndex()[0]);
181 m_SpanEndOffset = m_SpanBeginOffset -
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]);
191 m_SpanBeginOffset = this->m_Offset +
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]) -
192 (ind[0] - this->m_Region.GetIndex()[0]);
193 m_SpanEndOffset = m_SpanBeginOffset -
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]);
203 m_SpanBeginOffset = this->m_Offset +
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]) -
204 (ind[0] - this->m_Region.GetIndex()[0]);
205 m_SpanEndOffset = m_SpanBeginOffset -
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]);
213 Superclass::GoToBegin();
216 m_SpanBeginOffset = this->m_BeginOffset;
217 m_SpanEndOffset = this->m_BeginOffset -
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]);
225 Superclass::GoToEnd();
228 m_SpanEndOffset = this->m_EndOffset;
229 m_SpanBeginOffset = m_SpanEndOffset +
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]);
238 Superclass::SetIndex(ind);
239 m_SpanBeginOffset = this->m_Offset +
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]) -
240 (ind[0] - this->m_Region.GetIndex()[0]);
241 m_SpanEndOffset = m_SpanBeginOffset -
static_cast<OffsetValueType>(this->m_Region.GetSize()[0]);
256 if (--this->m_Offset <= m_SpanEndOffset)
266 this->m_Image->ComputeIndex(
static_cast<OffsetValueType>(this->m_Offset));
277 done = (--ind[0] == startIndex[0] - 1);
278 for (
unsigned int i = 1; done && i < this->ImageIteratorDimension; ++i)
280 done = (ind[i] == startIndex[i]);
288 while ((dim < this->ImageIteratorDimension - 1) && (ind[dim] < startIndex[dim]))
290 ind[dim] = startIndex[dim] +
static_cast<OffsetValueType>(size[dim]) - 1;
294 this->m_Offset = this->m_Image->ComputeOffset(ind);
295 m_SpanBeginOffset = this->m_Offset;
296 m_SpanEndOffset = m_SpanBeginOffset -
static_cast<OffsetValueType>(size[0]);
312 if (++this->m_Offset >= m_SpanBeginOffset)
322 this->m_Image->ComputeIndex(
static_cast<OffsetValueType>(this->m_Offset));
333 done = (++ind[0] == startIndex[0] +
static_cast<OffsetValueType>(size[0]));
334 for (
unsigned int i = 1; done && i < this->ImageIteratorDimension; ++i)
336 done = (ind[i] == startIndex[i] +
static_cast<OffsetValueType>(size[i]) - 1);
344 while ((dim < this->ImageIteratorDimension - 1) &&
345 (ind[dim] > startIndex[dim] +
static_cast<OffsetValueType>(size[dim]) - 1))
347 ind[dim] = startIndex[dim];
351 this->m_Offset = this->m_Image->ComputeOffset(ind);
352 m_SpanBeginOffset = this->m_Offset;
353 m_SpanEndOffset = this->m_Offset -
static_cast<OffsetValueType>(size[0]);
Pixel-wise addition of two images.
A multi-dimensional image iterator templated over image type.
typename TImage::IndexType IndexType
typename TImage::SizeType SizeType
typename TImage::IndexType IndexType
typename TImage::SizeType SizeType
A multi-dimensional iterator templated over image type that walks a region of pixels.
A multi-dimensional image iterator designed to walk a specified image region in reverse.
ImageRegionReverseConstIterator()
ImageRegionReverseConstIterator(const ImageRegionIterator< TImage > &it)
void SetIndex(const IndexType &ind) override
typename PixelContainer::Pointer PixelContainerPointer
ImageRegionReverseConstIterator(const ImageReverseConstIterator< TImage > &it)
ImageRegionReverseConstIterator(const ImageType *ptr, const RegionType ®ion)
ImageRegionReverseConstIterator(const ImageConstIterator< TImage > &it)
Multi-dimensional image iterator.
typename TImage::PixelType PixelType
typename TImage::RegionType RegionType
typename TImage::OffsetType OffsetType
typename TImage::IndexType IndexType
typename TImage::AccessorType AccessorType
const IndexType GetIndex()
typename TImage::PixelContainer PixelContainer
typename TImage::InternalPixelType InternalPixelType
SmartPointer< Self > Pointer
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType