18#ifndef itkLabelObject_h
19#define itkLabelObject_h
64template <
typename TLabel,
unsigned int VImageDimension>
85 static constexpr unsigned int ImageDimension = VImageDimension;
183 template <
typename TSourceLabelObject>
188 template <
typename TSourceLabelObject>
193 template <
typename TSourceLabelObject>
219 m_Begin = lo->m_LineContainer.begin();
220 m_End = lo->m_LineContainer.end();
221 m_Iterator = m_Begin;
272 m_Iterator = m_Begin;
278 return m_Iterator == m_End;
307 m_Begin = lo->m_LineContainer.begin();
308 m_End = lo->m_LineContainer.end();
340 if (m_Index[0] >= m_Iterator->GetIndex()[0] + (
OffsetValueType)m_Iterator->GetLength())
368 m_Iterator = m_Begin;
376 return m_Iterator == m_End;
386 while (m_Iterator != m_End && m_Iterator->GetLength() == 0)
390 if (m_Iterator != m_End)
392 m_Index = m_Iterator->GetIndex();
415#ifndef ITK_MANUAL_INSTANTIATION
416# include "itkLabelObject.hxx"
Control indentation during Print() invocation.
InternalIteratorType m_End
ConstIndexIterator operator++(int)
typename LineContainerType::const_iterator InternalIteratorType
typename std::deque< LineType > LineContainerType
const IndexType & GetIndex() const
InternalIteratorType m_Begin
ConstIndexIterator(const Self *lo)
ConstIndexIterator(const ConstIndexIterator &iter)
ConstIndexIterator & operator++()
bool operator==(const ConstIndexIterator &iter) const
InternalIteratorType m_Iterator
ConstIndexIterator & operator=(const ConstIndexIterator &iter)
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstIndexIterator)
A forward iterator over the lines of a LabelObject.
typename LineContainerType::const_iterator InternalIteratorType
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstLineIterator)
ConstLineIterator(const ConstLineIterator &iter)
const LineType & GetLine() const
ConstLineIterator()=default
InternalIteratorType m_End
ConstLineIterator & operator++()
ConstLineIterator & operator=(const ConstLineIterator &iter)
InternalIteratorType m_Iterator
ConstLineIterator(const Self *lo)
InternalIteratorType m_Begin
bool operator==(const ConstLineIterator &iter) const
typename std::deque< LineType > LineContainerType
ConstLineIterator operator++(int)
The base class for the representation of a labeled binary object in an image.
bool HasIndex(const IndexType &idx) const
static AttributeType GetAttributeFromName(const std::string &s)
itk::SizeValueType SizeValueType
typename std::deque< LineType > LineContainerType
void Shift(OffsetType offset)
void CopyAllFrom(const TSourceLabelObject *src)
void SetLabel(const LabelType &label)
void AddIndex(const IndexType &idx)
bool RemoveIndex(const IndexType &idx)
const LineType & GetLine(SizeValueType i) const
IndexType GetIndex(SizeValueType offset) const
void PrintSelf(std::ostream &os, Indent indent) const override
const LabelType & GetLabel() const
void AddLine(const LineType &line)
unsigned int AttributeType
SizeValueType Size() const
static std::string GetNameFromAttribute(const AttributeType &a)
void CopyLinesFrom(const TSourceLabelObject *src)
void CopyAttributesFrom(const TSourceLabelObject *src)
typename LineType::LengthType LengthType
SizeValueType GetNumberOfLines() const
void AddLine(const IndexType &idx, const LengthType &length)
LineType & GetLine(SizeValueType i)
Light weight base class for most itk classes.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.