ITK
5.2.0
Insight Toolkit
|
#include <itkMetaDataObject.h>
Public Types | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = MetaDataObject |
using | Superclass = MetaDataObjectBase |
Public Types inherited from itk::MetaDataObjectBase | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = MetaDataObjectBase |
using | Superclass = LightObject |
Public Types inherited from itk::LightObject | |
using | ConstPointer = SmartPointer< const Self > |
using | Pointer = SmartPointer< Self > |
using | Self = LightObject |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother () const |
const std::type_info & | GetMetaDataObjectTypeInfo () const override |
const char * | GetMetaDataObjectTypeName () const override |
const MetaDataObjectType & | GetMetaDataObjectValue () const |
virtual const char * | GetNameOfClass () const |
void | Print (std::ostream &os) const override |
void | SetMetaDataObjectValue (const MetaDataObjectType &newValue) |
Public Member Functions inherited from itk::LightObject | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
virtual void | Register () const |
virtual void | SetReferenceCount (int) |
virtual void | UnRegister () const noexcept |
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Member Functions | |
MetaDataObject ()=default | |
~MetaDataObject () override=default | |
Protected Member Functions inherited from itk::MetaDataObjectBase | |
MetaDataObjectBase () | |
~MetaDataObjectBase () override | |
Protected Member Functions inherited from itk::LightObject | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintSelf (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
MetaDataObjectType | m_MetaDataObjectValue |
Additional Inherited Members | |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount |
Allows arbitrary data types to be stored as MetaDataObjectBase types, and to be stored in a MetaDataDictionary.
The MetaDataObject class is a templated class that is a specialization of the MetaDataObjectBase type. This class allows arbitrary data types to be stored as MetaDataObjectBase types, and to be stored in a MetaDataDictionary.
Any class or built in type that has valid copy constructor and operator= can be wrapped directly with this simple template type.
Classes or built in types that do not have valid copy constructors or operator= implemented will have to implement those functions by deriving from MetaDataObject<MetaDataObjectType> and redefining the copy constructor and initializing constructor and the Get/Set functions to work around those deficiencies.
The behavior of the MetaDataObject<Type>::Print() function has many plausible application dependent implementations. The default implementation prints the string "[UNKNOWN PRINT CHARACTERISTICS]" that works for all possible MetaDataObject types.
The application developer may overload the default implementation to provide a specialized Print() characteristics to produce results desirable for their application. A set of very crude Macros {NATIVE_TYPE_METADATAPRINT, ITK_OBJECT_TYPE_METADATAPRINT_1COMMA, ITK_IMAGE_TYPE_METADATAPRINT } are provided to facilitate a very simple implementation, and as an example.
Definition at line 75 of file itkMetaDataObject.h.
using itk::MetaDataObject< MetaDataObjectType >::ConstPointer = SmartPointer<const Self> |
Definition at line 84 of file itkMetaDataObject.h.
using itk::MetaDataObject< MetaDataObjectType >::Pointer = SmartPointer<Self> |
Definition at line 83 of file itkMetaDataObject.h.
using itk::MetaDataObject< MetaDataObjectType >::Self = MetaDataObject |
Smart pointer type alias support
Definition at line 81 of file itkMetaDataObject.h.
using itk::MetaDataObject< MetaDataObjectType >::Superclass = MetaDataObjectBase |
Definition at line 82 of file itkMetaDataObject.h.
|
protecteddefault |
|
overrideprotecteddefault |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
|
overridevirtual |
The definition of this function is necessary to fulfill the interface of the MetaDataObjectBase
Reimplemented from itk::MetaDataObjectBase.
|
overridevirtual |
The definition of this function is necessary to fulfill the interface of the MetaDataObjectBase
Reimplemented from itk::MetaDataObjectBase.
const MetaDataObjectType& itk::MetaDataObject< MetaDataObjectType >::GetMetaDataObjectValue | ( | ) | const |
Function to return the stored value of type MetaDataObjectType.
Referenced by itk::ExposeMetaData().
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::MetaDataObjectBase.
|
static |
Method for creation through the object factory.
Referenced by itk::EncapsulateMetaData().
|
overridevirtual |
Defines the default behavior for printing out this element
os | An output stream |
Reimplemented from itk::MetaDataObjectBase.
void itk::MetaDataObject< MetaDataObjectType >::SetMetaDataObjectValue | ( | const MetaDataObjectType & | newValue | ) |
Function to set the stored value of type MetaDataObjectType.
newValue | A constant reference to at MetaDataObjectType. |
|
private |
A variable to store this derived type.
Definition at line 142 of file itkMetaDataObject.h.