28 #ifndef itkMetaDataObject_h
29 #define itkMetaDataObject_h
72 template<
typename MetaDataObjectType >
84 itkFactorylessNewMacro(
Self);
95 virtual const char * GetMetaDataObjectTypeName() const ITK_OVERRIDE;
103 virtual const std::type_info & GetMetaDataObjectTypeInfo() const ITK_OVERRIDE;
110 const MetaDataObjectType & GetMetaDataObjectValue() const;
117 void SetMetaDataObjectValue(const MetaDataObjectType & newValue);
123 virtual
void Print(std::ostream & os) const ITK_OVERRIDE;
127 virtual ~MetaDataObject() ITK_OVERRIDE;
130 ITK_DISALLOW_COPY_AND_ASSIGN(MetaDataObject);
136 MetaDataObjectType m_MetaDataObjectValue;
148 template< typename T >
152 temp->SetMetaDataObjectValue(invalue);
153 Dictionary[key] = temp;
157 template<
typename T >
172 template<
typename T >
175 if ( !Dictionary.
HasKey(key) )
182 if ( TempMetaDataObject == ITK_NULLPTR )
200 #define ITK_NATIVE_TYPE_METADATAPRINT(TYPE_NAME) \
203 ::itk::MetaDataObject< TYPE_NAME > \
204 ::Print(std::ostream & os) const \
206 os << this->m_MetaDataObjectValue << std::endl; \
217 #define ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(TYPE_NAME_PART1, TYPE_NAME_PART2) \
220 itk::MetaDataObject< TYPE_NAME_PART1, TYPE_NAME_PART2 > \
221 ::Print(std::ostream & os) const \
223 this->m_MetaDataObjectValue->Print(os); \
233 #define ITK_IMAGE_TYPE_METADATAPRINT(STORAGE_TYPE) \
234 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 1 >::Pointer) \
235 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 2 >::Pointer) \
236 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 3 >::Pointer) \
237 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 4 >::Pointer) \
238 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 5 >::Pointer) \
239 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 6 >::Pointer) \
240 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 7 >::Pointer) \
241 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 8 >::Pointer) \
243 #ifndef ITK_MANUAL_INSTANTIATION
244 #include "itkMetaDataObject.hxx"
247 #endif //itkMetaDataObject_h
250 #ifndef ITK_TEMPLATE_EXPLICIT_MetaDataObject
259 # if defined( ITKCommon_EXPORTS )
261 # define ITKCommon_EXPORT_EXPLICIT ITK_TEMPLATE_EXPORT
264 # define ITKCommon_EXPORT_EXPLICIT ITKCommon_EXPORT
269 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
270 ITK_GCC_PRAGMA_DIAG_PUSH()
272 ITK_GCC_PRAGMA_DIAG(ignored
"-Wattributes")
299 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP
300 ITK_GCC_PRAGMA_DIAG_POP()
302 ITK_GCC_PRAGMA_DIAG(warning
"-Wattributes")
306 # undef ITKCommon_EXPORT_EXPLICIT
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)