 |
ITK
5.4.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;
114 using typename Superclass::OffsetType;
128 using typename Superclass::SpacingType;
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;
384 m_Iterator = m_Begin;
390 return m_Iterator == m_End;
412 m_Begin = lm->m_LabelObjectContainer.begin();
413 m_End = lm->m_LabelObjectContainer.end();
414 m_Iterator = m_Begin;
436 return m_Iterator->second;
442 return m_Iterator->first;
466 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(
Iterator);
471 m_Iterator = m_Begin;
477 return m_Iterator == m_End;
493 PrintSelf(std::ostream & os,
Indent indent)
const override;
496 using Superclass::Graft;
508 AddPixel(
const LabelObjectContainerIterator & it,
const IndexType & idx,
const LabelType & label);
511 RemovePixel(
const LabelObjectContainerIterator & it,
const IndexType & idx,
bool iEmitModifiedEvent);
515 #ifndef ITK_MANUAL_INSTANTIATION
516 # include "itkLabelMap.hxx"
SmartPointer< Self > Pointer
typename LabelObjectType::Pointer LabelObjectPointerType
A forward iterator over the LabelObjects of a LabelMap.
ImageBaseType::DirectionType DirectionType
bool operator==(const ConstIterator &iter) const
InternalIteratorType m_Begin
const LabelType & GetLabel() const
std::vector< LabelObjectPointerType > LabelObjectVectorType
typename LabelObjectType::LabelType LabelType
Base class for templated image classes.
A forward iterator over the LabelObjects of a LabelMap.
typename SizeType::SizeValueType SizeValueType
ImageBaseType::PointType PointType
ImageBaseType::SizeType SizeType
InternalIteratorType m_End
InternalIteratorType m_Begin
Control indentation during Print() invocation.
typename LabelObjectContainerType::const_iterator LabelObjectContainerConstIterator
ConstIterator operator++(int)
Templated n-dimensional image to store labeled objects.
typename LabelObjectContainerType::iterator LabelObjectContainerIterator
ImageBaseType::IndexType IndexType
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
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)
InternalIteratorType m_Iterator
Base class for most ITK classes.
ConstIterator & operator=(const ConstIterator &iter)
bool operator==(const Iterator &iter) const
unsigned long SizeValueType
LabelObjectType * GetLabelObject()
Base class for all data objects in ITK.