21 #ifndef otbAttributesMapLabelObjectWithClassLabel_h
22 #define otbAttributesMapLabelObjectWithClassLabel_h
53 template <
class TLabel,
unsigned int VImageDimension,
class TAttributesValue,
class TClassLabel>
71 itkStaticConstMacro(ImageDimension,
unsigned int, VImageDimension);
80 m_HasClassLabel =
true;
89 itkExceptionMacro(<<
"LabelObject has no class label!");
98 return m_HasClassLabel;
104 m_ClassLabel = itk::NumericTraits<ClassLabelType>::Zero;
105 m_HasClassLabel =
false;
110 Superclass::CopyAttributesFrom(lo);
113 const Self* src =
dynamic_cast<const Self*
>(lo);
119 m_ClassLabel = src->m_ClassLabel;
120 m_HasClassLabel = src->m_HasClassLabel;
135 void PrintSelf(std::ostream& os, itk::Indent indent)
const override
137 Superclass::PrintSelf(os, indent);
140 os << indent <<
"Class Label: " << m_ClassLabel << std::endl;
144 os << indent <<
"No class label available." << std::endl;
151 void operator=(
const Self&) =
delete;