28 #ifndef itkMetaDataObject_h
29 #define itkMetaDataObject_h
72 template<
typename MetaDataObjectType >
84 itkFactorylessNewMacro(
Self);
123 virtual
void Print(std::ostream & os) const ITK_OVERRIDE;
127 virtual ~MetaDataObject();
130 MetaDataObject(const
Self &);
131 void operator=(const Self &);
149 template< typename T >
153 temp->SetMetaDataObjectValue(invalue);
154 Dictionary[key] = temp;
158 template<
typename T >
173 template<
typename T >
176 if ( !Dictionary.
HasKey(key) )
184 if ( TempMetaDataObject == ITK_NULLPTR )
193 #ifndef ITK_TEMPLATE_EXPLICIT_MetaDataObject
196 #if defined( ITKCommon_EXPORTS )
198 #define ITKCommon_EXPORT_EXPLICIT
201 #define ITKCommon_EXPORT_EXPLICIT ITKCommon_EXPORT
225 #undef ITKCommon_EXPORT_EXPLICIT
237 #define ITK_NATIVE_TYPE_METADATAPRINT(TYPE_NAME) \
240 ::itk::MetaDataObject< TYPE_NAME > \
241 ::Print(std::ostream & os) const \
243 os << this->m_MetaDataObjectValue << std::endl; \
254 #define ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(TYPE_NAME_PART1, TYPE_NAME_PART2) \
257 itk::MetaDataObject< TYPE_NAME_PART1, TYPE_NAME_PART2 > \
258 ::Print(std::ostream & os) const \
260 this->m_MetaDataObjectValue->Print(os); \
270 #define ITK_IMAGE_TYPE_METADATAPRINT(STORAGE_TYPE) \
271 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 1 >::Pointer) \
272 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 2 >::Pointer) \
273 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 3 >::Pointer) \
274 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 4 >::Pointer) \
275 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 5 >::Pointer) \
276 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 6 >::Pointer) \
277 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 7 >::Pointer) \
278 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 8 >::Pointer) \
280 #ifndef ITK_MANUAL_INSTANTIATION
281 #include "itkMetaDataObject.hxx"
284 #endif //itkMetaDataObject_h
Light weight base class for most itk classes.
void EncapsulateMetaData(MetaDataDictionary &Dictionary, const std::string &key, const T &invalue)
ObjectType * GetPointer() const
bool ExposeMetaData(const MetaDataDictionary &Dictionary, const std::string key, T &outval)