18 #ifndef itkLabelObject_h
19 #define itkLabelObject_h
63 template<
typename TLabel,
unsigned int VImageDimension >
83 static constexpr
unsigned int ImageDimension = VImageDimension;
95 static AttributeType GetAttributeFromName(
const std::string & s);
97 static std::string GetNameFromAttribute(
const AttributeType & a);
110 bool HasIndex(
const IndexType & idx)
const;
123 bool RemoveIndex(
const IndexType & idx );
133 void AddLine(
const LineType & line);
165 template<
typename TSourceLabelObject >
166 void CopyLinesFrom(
const TSourceLabelObject *src);
169 template<
typename TSourceLabelObject >
170 void CopyAttributesFrom(
const TSourceLabelObject *src);
173 template<
typename TSourceLabelObject >
174 void CopyAllFrom(
const TSourceLabelObject *src);
196 m_Begin = lo->m_LineContainer.begin();
197 m_End = lo->m_LineContainer.end();
198 m_Iterator = m_Begin;
241 return !( *
this == iter );
246 m_Iterator = m_Begin;
251 return m_Iterator == m_End;
280 m_Begin = lo->m_LineContainer.begin();
281 m_End = lo->m_LineContainer.end();
310 if( m_Index[0] >= m_Iterator->GetIndex()[0] + (
OffsetValueType)m_Iterator->GetLength() )
333 return !( *
this == iter );
338 m_Iterator = m_Begin;
345 return m_Iterator == m_End;
355 while( m_Iterator != m_End && m_Iterator->GetLength() == 0 )
359 if( m_Iterator != m_End )
361 m_Index = m_Iterator->GetIndex();
373 void PrintSelf(std::ostream & os,
Indent indent)
const override;
383 #ifndef ITK_MANUAL_INSTANTIATION
384 #include "itkLabelObject.hxx"
Light weight base class for most itk classes.
bool operator==(const ConstLineIterator &iter) const
ConstLineIterator(const Self *lo)
InternalIteratorType m_End
unsigned long SizeValueType
unsigned int AttributeType
ConstIndexIterator & operator++()
bool operator==(const ConstIndexIterator &iter) const
bool operator!=(const ConstIndexIterator &iter) const
InternalIteratorType m_Begin
Implements a weak reference to an object.
ConstLineIterator & operator++()
const IndexType & GetIndex() const
LineContainerType m_LineContainer
typename std::deque< LineType > LineContainerType
itk::SizeValueType SizeValueType
const LineType & GetLine() const
typename LineContainerType::const_iterator InternalIteratorType
Represent a n-dimensional size (bounds) of a n-dimensional image.
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image...
ConstIndexIterator & operator=(const ConstIndexIterator &iter)
typename std::deque< LineType > LineContainerType
ConstIndexIterator(const Self *lo)
typename LineType::LengthType LengthType
ConstLineIterator operator++(int)
ConstIndexIterator(const ConstIndexIterator &iter)
ConstIndexIterator operator++(int)
bool operator!=(const ConstLineIterator &iter) const
The base class for the representation of an labeled binary object in an image.
InternalIteratorType m_Iterator
ConstLineIterator(const ConstLineIterator &iter)
InternalIteratorType m_Iterator
Control indentation during Print() invocation.
InternalIteratorType m_End
typename LineContainerType::const_iterator InternalIteratorType
signed long OffsetValueType
InternalIteratorType m_Begin
typename std::deque< LineType > LineContainerType
A forward iterator over the lines of a LabelObject.
ConstLineIterator & operator=(const ConstLineIterator &iter)