18 #ifndef itkAttributeLabelObject_h
19 #define itkAttributeLabelObject_h
30 template<
typename TLabelObject >
39 return labelObject->GetAttribute();
44 labelObject->SetAttribute( value );
69 template <
typename TLabel,
unsigned int VImageDimension,
typename TAttributeValue >
118 template<
typename TSourceLabelObject >
121 itkAssertOrThrowMacro ( ( src !=
nullptr ),
"Null Pointer" );
122 Superclass::template CopyAttributesFrom<TSourceLabelObject>( src );
127 template<
typename TSourceLabelObject >
130 itkAssertOrThrowMacro ( ( src !=
nullptr ),
"Null Pointer" );
131 this->
template CopyLinesFrom<TSourceLabelObject>( src );
132 this->
template CopyAttributesFrom<TSourceLabelObject>( src );
146 os << indent <<
"Attribute: " <<
m_Attribute << std::endl;
void operator()(LabelObjectType *labelObject, AttributeValueType value)
void CopyAttributesFrom(const TSourceLabelObject *src)
Light weight base class for most itk classes.
LabelObjectLine< VImageDimension > LineType
typename Superclass::IndexType IndexType
A LabelObject with a generic attribute.
Index< VImageDimension > IndexType
typename LabelObjectType::AttributeValueType AttributeValueType
Implements a weak reference to an object.
void PrintSelf(std::ostream &os, Indent indent) const override
void SetAttribute(const AttributeValueType &v)
void PrintSelf(std::ostream &os, Indent indent) const override
const AttributeValueType & GetAttribute() const
TLabelObject LabelObjectType
typename Superclass::LengthType LengthType
const AttributeValueType operator()(const LabelObjectType *labelObject)
typename Superclass::LabelObjectType LabelObjectType
typename LineType::LengthType LengthType
TAttributeValue AttributeValueType
AttributeValueType m_Attribute
The base class for the representation of an labeled binary object in an image.
Control indentation during Print() invocation.
static constexpr unsigned int ImageDimension
AttributeValueType GetAttribute()
Templated n-dimensional image to store labeled objects.
void CopyAllFrom(const TSourceLabelObject *src)
typename Superclass::LineType LineType