18 #ifndef itkRLEImageScanlineConstIterator_h
19 #define itkRLEImageScanlineConstIterator_h
33 template<
typename TPixel,
unsigned int VImageDimension,
typename CounterType >
101 this->m_Index0 = this->m_BeginIndex0;
102 this->m_RealIndex = 0;
103 this->m_SegmentRemainder = ( *this->m_RunLengthLine )[this->m_RealIndex].first;
111 this->m_Index0 = this->m_EndIndex0;
112 this->m_RealIndex = this->m_RunLengthLine->size() - 1;
113 this->m_SegmentRemainder = 0;
121 return this->m_Index0 == this->m_EndIndex0;
129 if ( !this->m_BI.IsAtEnd() )
131 this->SetIndexInternal( this->m_BeginIndex0 );
135 this->m_Index0 = this->m_BeginIndex0;
150 itkAssertInDebugAndIgnoreInReleaseMacro( !this->
IsAtEndOfLine() );
152 this->m_SegmentRemainder--;
153 if ( this->m_SegmentRemainder > 0 )
164 this->m_SegmentRemainder = ( *this->m_RunLengthLine )[this->m_RealIndex].first;
175 this->m_SegmentRemainder++;
176 if ( this->m_SegmentRemainder <= ( *this->m_RunLengthLine )[this->m_RealIndex].first )
183 this->m_SegmentRemainder = 1;
189 #endif // itkRLEImageScanlineConstIterator_h
typename TImage::OffsetType OffsetType
typename TImage::InternalPixelType InternalPixelType
typename ImageType::SizeType SizeType
A multi-dimensional iterator templated over image type.
typename TImage::PixelType PixelType
typename ImageType::RegionType RegionType
ImageScanlineConstIterator Self
A multi-dimensional image iterator templated over image type.
Self & operator=(const Self &it)
bool IsAtEndOfLine() const
typename ImageType::PixelType PixelType
A multi-dimensional iterator templated over image type that walks a region of pixels.
typename TImage::IndexType IndexType
typename ImageType::OffsetType OffsetType
void GoToBeginOfLine(void)
typename TImage::SizeType SizeType
ImageScanlineConstIterator()
ImageScanlineConstIterator()
A multi-dimensional iterator templated over image type that walks a region of pixels, scanline by scanline or in the direction of the fastest axis.
typename ImageType::IndexType IndexType
Run-Length Encoded image. It saves memory for label images at the expense of processing times...
ImageScanlineConstIterator(const ImageConstIterator< ImageType > &it)
typename TImage::RegionType RegionType
typename ImageType::InternalPixelType InternalPixelType
ImageScanlineConstIterator(const ImageIterator< ImageType > &it)
ImageScanlineConstIterator(const ImageType *ptr, const RegionType ®ion)
static constexpr unsigned int ImageIteratorDimension