69template <
typename TLabelObject>
73 ITK_DISALLOW_COPY_AND_MOVE(
LabelMap);
486#ifndef ITK_MANUAL_INSTANTIATION
487# include "itkLabelMap.hxx"
Base class for all data objects in ITK.
Vector< SpacingValueType, VImageDimension > SpacingType
ImageRegion< VImageDimension > RegionType
Index< VImageDimension > IndexType
Offset< VImageDimension > OffsetType
typename OffsetType::OffsetValueType OffsetValueType
virtual void Graft(const Self *image)
Matrix< SpacePrecisionType, VImageDimension, VImageDimension > DirectionType
Size< VImageDimension > SizeType
Point< PointValueType, VImageDimension > PointType
typename SizeType::SizeValueType SizeValueType
Control indentation during Print() invocation.
A forward iterator over the LabelObjects of a LabelMap.
ConstIterator(const Self *lm)
typename std::map< LabelType, LabelObjectPointerType >::const_iterator InternalIteratorType
const LabelType & GetLabel() const
const LabelObjectType * GetLabelObject() const
ConstIterator & operator++()
InternalIteratorType m_Iterator
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(ConstIterator)
InternalIteratorType m_Begin
InternalIteratorType m_End
bool operator==(const ConstIterator &iter) const
ConstIterator operator++(int)
A forward iterator over the LabelObjects of a LabelMap.
const LabelType & GetLabel() const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Iterator)
bool operator==(const Iterator &iter) const
InternalIteratorType m_End
InternalIteratorType m_Begin
typename std::map< LabelType, LabelObjectPointerType >::iterator InternalIteratorType
InternalIteratorType m_Iterator
LabelObjectType * GetLabelObject()
void SetPixel(const IndexType &idx, const LabelType &iLabel)
Set the pixel value at a given index in the image.
LabelObjectType * GetLabelObject(const LabelType &label)
void Graft(const DataObject *data) override
void RemoveLabel(const LabelType &label)
void RemoveLabelObject(LabelObjectType *labelObject)
void PrintLabelObjects(std::ostream &os) const
typename LabelObjectType::Pointer LabelObjectPointerType
typename LabelObjectType::LabelType LabelType
LabelObjectType * GetNthLabelObject(const SizeValueType &pos)
LabelVectorType GetLabels() const
void RemovePixel(const IndexType &idx, const LabelType &label)
void Initialize() override
static constexpr unsigned int ImageDimension
LabelObjectVectorType GetLabelObjects() const
const LabelType & GetPixel(const IndexType &idx) const
void AddPixel(const LabelObjectContainerIterator &it, const IndexType &idx, const LabelType &label)
std::map< LabelType, LabelObjectPointerType > LabelObjectContainerType
std::vector< LabelObjectPointerType > LabelObjectVectorType
Self::SizeValueType GetNumberOfLabelObjects() const
virtual void Graft(const Self *imgData)
typename LabelObjectContainerType::iterator LabelObjectContainerIterator
void AddLabelObject(LabelObjectType *labelObject)
void AddPixel(const IndexType &idx, const LabelType &label)
void Allocate(bool initialize=false) override
typename LabelObjectContainerType::const_iterator LabelObjectContainerConstIterator
void PushLabelObject(LabelObjectType *labelObject)
const LabelObjectType * GetNthLabelObject(const SizeValueType &pos) const
bool HasLabel(const LabelType label) const
void PrintLabelObjects() const
SmartPointer< const Self > ConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
std::vector< LabelType > LabelVectorType
LabelType m_BackgroundValue
LabelObjectContainerType m_LabelObjectContainer
~LabelMap() override=default
WeakPointer< const Self > ConstWeakPointer
ImageBase< Self::ImageDimension > Superclass
LabelObjectType * GetLabelObject(const IndexType &idx) const
const LabelObjectType * GetLabelObject(const LabelType &label) const
void SetLine(const IndexType &idx, const LengthType &length, const LabelType &label)
void RemovePixel(const LabelObjectContainerIterator &it, const IndexType &idx, bool iEmitModifiedEvent)
SmartPointer< Self > Pointer
Implements transparent reference counting.
Implements a weak reference to an object.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....