69 template<
typename TLabelObject >
97 itkStaticConstMacro(ImageDimension,
unsigned int, LabelObjectType::ImageDimension);
136 virtual void Initialize() ITK_OVERRIDE;
139 virtual
void Allocate(
bool initialize = false) ITK_OVERRIDE;
141 virtual
void Graft(const
Self *imgData);
157 bool HasLabel(const
LabelType label) const;
240 void RemoveLabel(const
LabelType & label);
265 itkGetConstMacro(BackgroundValue,
LabelType);
266 itkSetMacro(BackgroundValue, LabelType);
273 void PrintLabelObjects(std::ostream & os) const;
275 void PrintLabelObjects()
const
277 this->PrintLabelObjects(std::cerr);
297 m_Begin = lm->m_LabelObjectContainer.begin();
298 m_End = lm->m_LabelObjectContainer.end();
299 m_Iterator = m_Begin;
319 return m_Iterator->second;
324 return m_Iterator->first;
347 return !( *
this == iter );
352 m_Iterator = m_Begin;
357 return m_Iterator == m_End;
379 m_Begin = lm->m_LabelObjectContainer.begin();
380 m_End = lm->m_LabelObjectContainer.end();
381 m_Iterator = m_Begin;
401 return m_Iterator->second;
406 return m_Iterator->first;
429 return !( *
this == iter );
434 m_Iterator = m_Begin;
439 return m_Iterator == m_End;
454 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
455 virtual void Graft(
const DataObject *data) ITK_OVERRIDE;
456 using Superclass::Graft;
464 typedef typename LabelObjectContainerType::const_iterator
476 bool iEmitModifiedEvent );
480 #ifndef ITK_MANUAL_INSTANTIATION
481 #include "itkLabelMap.hxx"
Superclass::OffsetValueType OffsetValueType
InternalIteratorType m_Iterator
Superclass::SizeType SizeType
Superclass::OffsetType OffsetType
TLabelObject LabelObjectType
ConstIterator(const Self *lm)
InternalIteratorType m_Iterator
Iterator(const Iterator &iter)
signed long OffsetValueType
Superclass::DirectionType DirectionType
LabelObjectType * GetLabelObject()
SmartPointer< Self > Pointer
LabelObjectContainerType::iterator LabelObjectContainerIterator
WeakPointer< const Self > ConstWeakPointer
bool operator==(const Iterator &iter) const
Implements a weak reference to an object.
unsigned long SizeValueType
LabelObjectContainerType m_LabelObjectContainer
bool operator!=(const ConstIterator &iter) const
const LabelType & GetLabel() const
SmartPointer< const Self > ConstPointer
InternalIteratorType m_End
ConstIterator & operator=(const ConstIterator &iter)
ImageBaseType::DirectionType DirectionType
std::map< LabelType, LabelObjectPointerType >::iterator InternalIteratorType
LabelObjectType::Pointer LabelObjectPointerType
Superclass::SizeValueType SizeValueType
LabelType m_BackgroundValue
std::map< LabelType, LabelObjectPointerType > LabelObjectContainerType
Superclass::PointType PointType
bool operator!=(const Iterator &iter) const
ImageBaseType::PointType PointType
const LabelType & GetLabel() const
const LabelObjectType * GetLabelObject() const
virtual ~LabelMap() override
std::vector< LabelType > LabelVectorType
std::vector< LabelObjectPointerType > LabelObjectVectorType
Iterator & operator=(const Iterator &iter)
std::map< LabelType, LabelObjectPointerType >::const_iterator InternalIteratorType
ConstIterator operator++(int)
A forward iterator over the LabelObjects of a LabelMap.
InternalIteratorType m_Begin
Superclass::RegionType RegionType
Superclass::SpacingType SpacingType
Base class for templated image classes.
LabelObjectContainerType::const_iterator LabelObjectContainerConstIterator
LabelObjectType::LabelType LabelType
Superclass::IndexType IndexType
Control indentation during Print() invocation.
InternalIteratorType m_Begin
Templated n-dimensional image to store labeled objects.
ConstIterator & operator++()
ImageBaseType::SizeType SizeType
InternalIteratorType m_End
A forward iterator over the LabelObjects of a LabelMap.
Base class for all data objects in ITK.
bool operator==(const ConstIterator &iter) const
ConstIterator(const ConstIterator &iter)
ImageBase< TLabelObject::ImageDimension > Superclass
ImageBaseType::IndexType IndexType