28 #ifndef __itkMetaDataObject_h
29 #define __itkMetaDataObject_h
73 template<
class MetaDataObjectType >
85 itkFactorylessNewMacro(
Self);
120 virtual const char * GetMetaDataObjectTypeName(
void)
const;
129 virtual const std::type_info & GetMetaDataObjectTypeInfo(
void)
const;
136 const MetaDataObjectType & GetMetaDataObjectValue(
void)
const;
143 void SetMetaDataObjectValue(
const MetaDataObjectType & NewValue);
149 virtual void Print(std::ostream & os)
const;
175 temp->SetMetaDataObjectValue(invalue);
176 Dictionary[key] = temp;
198 if ( !Dictionary.
HasKey(key) )
205 if ( strcmp(
typeid( T ).name(), baseObjectSmartPointer->GetMetaDataObjectTypeName() ) != 0 )
212 outval = TempMetaDataObject->GetMetaDataObjectValue();
257 #define NATIVE_TYPE_METADATAPRINT(TYPE_NAME) \
260 itk::MetaDataObject< TYPE_NAME > \
261 ::Print(std::ostream & os) const \
263 os << this->m_MetaDataObjectValue << std::endl; \
267 itk::MetaDataObject< const TYPE_NAME > \
268 ::Print(std::ostream & os) const \
270 os << this->m_MetaDataObjectValue << std::endl; \
282 #define ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(TYPE_NAME_PART1, TYPE_NAME_PART2) \
285 itk::MetaDataObject< TYPE_NAME_PART1, TYPE_NAME_PART2 > \
286 ::Print(std::ostream & os) const \
288 this->m_MetaDataObjectValue->Print(os); \
292 itk::MetaDataObject< const TYPE_NAME_PART1, TYPE_NAME_PART2 > \
293 ::Print(std::ostream & os) const \
295 this->m_MetaDataObjectValue->Print(os); \
306 #define ITK_IMAGE_TYPE_METADATAPRINT(STORAGE_TYPE) \
307 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 1 >::Pointer) \
308 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 2 >::Pointer) \
309 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 3 >::Pointer) \
310 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 4 >::Pointer) \
311 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 5 >::Pointer) \
312 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 6 >::Pointer) \
313 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 7 >::Pointer) \
314 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 8 >::Pointer) \
317 #define ITK_TEMPLATE_MetaDataObject(_, EXPORT, TypeX, TypeY) \
320 _( 1 ( class EXPORT MetaDataObject< ITK_TEMPLATE_1 TypeX > ) ) \
321 namespace Templates \
323 typedef MetaDataObject< ITK_TEMPLATE_1 TypeX > \
324 MetaDataObject##TypeY; \
328 #if ITK_TEMPLATE_EXPLICIT
329 #include "Templates/itkMetaDataObject+-.h"
333 #include "itkMetaDataObject.hxx"
336 #endif //itkMetaDataObject_h