28 #ifndef itkMetaDataObject_h
29 #define itkMetaDataObject_h
74 template <
typename MetaDataObjectType>
87 itkFactorylessNewMacro(
Self);
99 GetMetaDataObjectTypeName()
const override;
107 const std::type_info &
108 GetMetaDataObjectTypeInfo()
const override;
115 const MetaDataObjectType &
116 GetMetaDataObjectValue()
const;
124 SetMetaDataObjectValue(
const MetaDataObjectType & newValue);
131 Print(std::ostream & os)
const override;
154 template <
typename T>
159 temp->SetMetaDataObjectValue(invalue);
160 Dictionary[key] = temp;
164 template <
typename T>
180 template <
typename T>
184 auto keyIter = Dictionary.
Find(key);
185 if (keyIter == Dictionary.
End())
191 auto const *
const TempMetaDataObject =
dynamic_cast<MetaDataObject<T> const *
>(keyIter->second.GetPointer());
192 if (TempMetaDataObject ==
nullptr)
210 #define ITK_NATIVE_TYPE_METADATAPRINT(TYPE_NAME) \
212 void ::itk::MetaDataObject<TYPE_NAME>::Print(std::ostream & os) const \
214 os << this->m_MetaDataObjectValue << std::endl; \
225 #define ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(TYPE_NAME_PART1, TYPE_NAME_PART2) \
227 void itk::MetaDataObject<TYPE_NAME_PART1, TYPE_NAME_PART2>::Print(std::ostream & os) const \
229 this->m_MetaDataObjectValue->Print(os); \
239 #define ITK_IMAGE_TYPE_METADATAPRINT(STORAGE_TYPE) \
240 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 1>::Pointer) \
241 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 2>::Pointer) \
242 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 3>::Pointer) \
243 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 4>::Pointer) \
244 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 5>::Pointer) \
245 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 6>::Pointer) \
246 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 7>::Pointer) \
247 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image<STORAGE_TYPE, 8>::Pointer)
249 #ifndef ITK_MANUAL_INSTANTIATION
250 # include "itkMetaDataObject.hxx"
253 #endif // itkMetaDataObject_h
256 #ifndef ITK_TEMPLATE_EXPLICIT_MetaDataObject
265 #if defined(ITKCommon_EXPORTS)
267 # define ITKCommon_EXPORT_EXPLICIT ITK_TEMPLATE_EXPORT
270 # define ITKCommon_EXPORT_EXPLICIT ITKCommon_EXPORT
275 ITK_GCC_PRAGMA_DIAG_PUSH()
276 ITK_GCC_PRAGMA_DIAG(ignored
"-Wattributes")
303 ITK_GCC_PRAGMA_DIAG_POP()
306 #undef ITKCommon_EXPORT_EXPLICIT