18#ifndef itkAttributeLabelObject_h
19#define itkAttributeLabelObject_h
31template <
typename TLabelObject>
41 return labelObject->GetAttribute();
47 labelObject->SetAttribute(value);
72template <
typename TLabel,
unsigned int VImageDimension,
typename TAttributeValue>
94 static constexpr unsigned int ImageDimension = VImageDimension;
112 const AttributeValueType &
124 template <
typename TSourceLabelObject>
128 itkAssertOrThrowMacro((src !=
nullptr),
"Null Pointer");
129 Superclass::template CopyAttributesFrom<TSourceLabelObject>(src);
131 m_Attribute = src->GetAttribute();
134 template <
typename TSourceLabelObject>
138 itkAssertOrThrowMacro((src !=
nullptr),
"Null Pointer");
139 this->
template CopyLinesFrom<TSourceLabelObject>(src);
140 this->
template CopyAttributesFrom<TSourceLabelObject>(src);
150 Superclass::PrintSelf(os, indent);
152 os << indent <<
"Attribute: " << m_Attribute << std::endl;
A LabelObject with a generic attribute.
void CopyAllFrom(const TSourceLabelObject *src)
TAttributeValue AttributeValueType
typename Superclass::LabelObjectType LabelObjectType
AttributeLabelObject()=default
AttributeValueType GetAttribute()
void PrintSelf(std::ostream &os, Indent indent) const override
void CopyAttributesFrom(const TSourceLabelObject *src)
void SetAttribute(const AttributeValueType &v)
const AttributeValueType & GetAttribute() const
void operator()(LabelObjectType *labelObject, AttributeValueType value)
TLabelObject LabelObjectType
const AttributeValueType operator()(const LabelObjectType *labelObject)
typename LabelObjectType::AttributeValueType AttributeValueType
Control indentation during Print() invocation.
Templated n-dimensional image to store labeled objects.
The base class for the representation of a labeled binary object in an image.
typename LineType::LengthType LengthType
Light weight base class for most itk classes.
Implements a weak reference to an object.
ImageBaseType::IndexType IndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....