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();
130 MetaDataObject(const Self &) ITK_DELETE_FUNCTION;
131 void operator=(const Self &) ITK_DELETE_FUNCTION;
137 MetaDataObjectType m_MetaDataObjectValue;
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 )
202 #define ITK_NATIVE_TYPE_METADATAPRINT(TYPE_NAME) \ 205 ::itk::MetaDataObject< TYPE_NAME > \ 206 ::Print(std::ostream & os) const \ 208 os << this->m_MetaDataObjectValue << std::endl; \ 219 #define ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(TYPE_NAME_PART1, TYPE_NAME_PART2) \ 222 itk::MetaDataObject< TYPE_NAME_PART1, TYPE_NAME_PART2 > \ 223 ::Print(std::ostream & os) const \ 225 this->m_MetaDataObjectValue->Print(os); \ 235 #define ITK_IMAGE_TYPE_METADATAPRINT(STORAGE_TYPE) \ 236 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 1 >::Pointer) \ 237 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 2 >::Pointer) \ 238 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 3 >::Pointer) \ 239 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 4 >::Pointer) \ 240 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 5 >::Pointer) \ 241 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 6 >::Pointer) \ 242 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 7 >::Pointer) \ 243 ITK_OBJECT_TYPE_METADATAPRINT_1COMMA(itk::Image< STORAGE_TYPE, 8 >::Pointer) \ 245 #ifndef ITK_MANUAL_INSTANTIATION 246 #include "itkMetaDataObject.hxx" 249 #endif //itkMetaDataObject_h 252 #ifndef ITK_TEMPLATE_EXPLICIT_MetaDataObject 261 # if defined( ITKCommon_EXPORTS ) 263 # define ITKCommon_EXPORT_EXPLICIT 266 # define ITKCommon_EXPORT_EXPLICIT ITKCommon_EXPORT 271 #ifdef ITK_HAS_GCC_PRAGMA_DIAG_PUSHPOP 272 ITK_GCC_PRAGMA_DIAG_PUSH()
274 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 void EncapsulateMetaData(MetaDataDictionary &Dictionary, const std::string &key, const T &invalue)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
ObjectType * GetPointer() const
bool ExposeMetaData(const MetaDataDictionary &Dictionary, const std::string key, T &outval)