|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
69 template <
typename TLabelObject>
73 ITK_DISALLOW_COPY_AND_MOVE(
LabelMap);
100 static constexpr
unsigned int ImageDimension = LabelObjectType::ImageDimension;
140 Initialize()
override;
144 Allocate(
bool initialize =
false)
override;
147 Graft(
const Self * imgData);
157 GetLabelObject(
const LabelType & label)
const;
235 GetLabelObject(
const IndexType & idx)
const;
273 GetNumberOfLabelObjects()
const;
285 GetLabelObjects()
const;
290 itkGetConstMacro(BackgroundValue,
LabelType);
299 PrintLabelObjects(std::ostream & os)
const;
304 this->PrintLabelObjects(std::cerr);
325 m_Begin = lm->m_LabelObjectContainer.begin();
326 m_End = lm->m_LabelObjectContainer.end();
327 m_Iterator = m_Begin;
349 return m_Iterator->second;
355 return m_Iterator->first;
382 return !(*
this == iter);
388 m_Iterator = m_Begin;
394 return m_Iterator == m_End;
416 m_Begin = lm->m_LabelObjectContainer.begin();
417 m_End = lm->m_LabelObjectContainer.end();
418 m_Iterator = m_Begin;
440 return m_Iterator->second;
446 return m_Iterator->first;
473 return !(*
this == iter);
479 m_Iterator = m_Begin;
485 return m_Iterator == m_End;
501 PrintSelf(std::ostream & os,
Indent indent)
const override;
504 using Superclass::Graft;
523 #ifndef ITK_MANUAL_INSTANTIATION
524 # include "itkLabelMap.hxx"
typename LabelObjectType::Pointer LabelObjectPointerType
A forward iterator over the LabelObjects of a LabelMap.
typename Superclass::SizeValueType SizeValueType
ImageBaseType::DirectionType DirectionType
bool operator==(const ConstIterator &iter) const
bool operator!=(const ConstIterator &iter) const
InternalIteratorType m_Begin
const LabelType & GetLabel() const
bool operator!=(const Iterator &iter) const
std::vector< LabelObjectPointerType > LabelObjectVectorType
typename LabelObjectType::LabelType LabelType
Base class for templated image classes.
A forward iterator over the LabelObjects of a LabelMap.
ImageBaseType::PointType PointType
typename Superclass::OffsetType OffsetType
ImageBaseType::SizeType SizeType
InternalIteratorType m_End
InternalIteratorType m_Begin
Control indentation during Print() invocation.
typename Superclass::SpacingType SpacingType
typename LabelObjectContainerType::const_iterator LabelObjectContainerConstIterator
LabelType m_BackgroundValue
ConstIterator operator++(int)
Templated n-dimensional image to store labeled objects.
typename Superclass::RegionType RegionType
typename LabelObjectContainerType::iterator LabelObjectContainerIterator
ImageBaseType::IndexType IndexType
typename Superclass::DirectionType DirectionType
InternalIteratorType m_End
ConstIterator(const ConstIterator &iter)
ConstIterator & operator++()
std::map< LabelType, LabelObjectPointerType > LabelObjectContainerType
typename std::map< LabelType, LabelObjectPointerType >::const_iterator InternalIteratorType
ImageBaseType::RegionType RegionType
void PrintLabelObjects() const
const LabelType & GetLabel() const
Iterator & operator=(const Iterator &iter)
std::vector< LabelType > LabelVectorType
TLabelObject LabelObjectType
typename Superclass::PointType PointType
typename Superclass::SizeType SizeType
InternalIteratorType m_Iterator
typename std::map< LabelType, LabelObjectPointerType >::iterator InternalIteratorType
const LabelObjectType * GetLabelObject() const
Implements a weak reference to an object.
Iterator(const Iterator &iter)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ConstIterator(const Self *lm)
signed long OffsetValueType
LabelObjectContainerType m_LabelObjectContainer
InternalIteratorType m_Iterator
Base class for most ITK classes.
ConstIterator & operator=(const ConstIterator &iter)
bool operator==(const Iterator &iter) const
typename Superclass::OffsetValueType OffsetValueType
typename Superclass::IndexType IndexType
unsigned long SizeValueType
LabelObjectType * GetLabelObject()
Base class for all data objects in ITK.