ITK  4.12.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
itk::DataObjectDecorator< T > Class Template Reference

#include <itkDataObjectDecorator.h>

+ Inheritance diagram for itk::DataObjectDecorator< T >:
+ Collaboration diagram for itk::DataObjectDecorator< T >:

Detailed Description

template<typename T>
class itk::DataObjectDecorator< T >

Decorates any subclass of itkObject with a DataObject API.

DataObjectDecorator decorates an instance of a subclass of itkObject with a DataObject API. This allows any itkObject to be encapsulated into a DataObject that can be passed down the pipeline. To decorate simple types (float, int, std::vector) see SimpleDataObjectDecorator.

The decorator provides two methods Set() and Get() to access the decorated object (referred internally as the component).

Note that when an instance of DataObjectDecorator is created, the component is initialized with its default constructor (in this case a null pointer).

DataObjectDecorator can decorate any subclass of itkObject. Two other decorators are provided. SimpleDataObjectDecorator can encapsulate simple types (float, int, std::vector). AutoPointerDataObjectDecorator will decorate any pointer type (for objects other than subclasses of itkObject) and manage the memory deallocationg of the component.

See Also
SimpleDataObjectDecorator
AutoPointerDataObjectDecorator

Definition at line 66 of file itkDataObjectDecorator.h.

Public Types

typedef T::ConstPointer ComponentConstPointer
 
typedef T::Pointer ComponentPointer
 
typedef T ComponentType
 
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef DataObjectDecorator Self
 
typedef DataObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual ModifiedTimeType GetMTime () const override
 
virtual const char * GetNameOfClass () const
 
virtual void Graft (const DataObject *) override
 
void Graft (const Self *decorator)
 
virtual void Initialize () override
 
virtual void Set (const ComponentType *val)
 
virtual const ComponentTypeGet () const
 
virtual ComponentTypeGetModifiable ()
 
template<typename TOther >
void Graft (const DataObjectDecorator< TOther > *decorator)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 DataObjectDecorator ()
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~DataObjectDecorator ()
 

Private Attributes

ComponentPointer m_Component
 

Member Typedef Documentation

template<typename T >
typedef T::ConstPointer itk::DataObjectDecorator< T >::ComponentConstPointer

Definition at line 78 of file itkDataObjectDecorator.h.

template<typename T >
typedef T::Pointer itk::DataObjectDecorator< T >::ComponentPointer

Definition at line 77 of file itkDataObjectDecorator.h.

template<typename T >
typedef T itk::DataObjectDecorator< T >::ComponentType

Typedef for the component type (object being decorated)

Definition at line 76 of file itkDataObjectDecorator.h.

template<typename T >
typedef SmartPointer< const Self > itk::DataObjectDecorator< T >::ConstPointer

Definition at line 73 of file itkDataObjectDecorator.h.

template<typename T >
typedef SmartPointer< Self > itk::DataObjectDecorator< T >::Pointer

Definition at line 72 of file itkDataObjectDecorator.h.

template<typename T >
typedef DataObjectDecorator itk::DataObjectDecorator< T >::Self

Standard typedefs.

Definition at line 70 of file itkDataObjectDecorator.h.

template<typename T >
typedef DataObject itk::DataObjectDecorator< T >::Superclass

Definition at line 71 of file itkDataObjectDecorator.h.

Constructor & Destructor Documentation

template<typename T >
itk::DataObjectDecorator< T >::DataObjectDecorator ( )
protected
template<typename T >
itk::DataObjectDecorator< T >::~DataObjectDecorator ( )
protected

Member Function Documentation

template<typename T >
virtual::itk::LightObject::Pointer itk::DataObjectDecorator< T >::CreateAnother ( ) const
template<typename T >
virtual const ComponentType* itk::DataObjectDecorator< T >::Get ( ) const
virtual

Get the contained object

template<typename T >
virtual ComponentType* itk::DataObjectDecorator< T >::GetModifiable ( )
virtual

Get the contained object

template<typename T >
virtual ModifiedTimeType itk::DataObjectDecorator< T >::GetMTime ( ) const
overridevirtual

The most recent MTime of this object and the held component

template<typename T >
virtual const char* itk::DataObjectDecorator< T >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

template<typename T >
virtual void itk::DataObjectDecorator< T >::Graft ( const DataObject )
overridevirtual

Graft the content of one decorator onto another.

The DataObject is dynamically_cast to this type, if successful then the component pointer is copies to that both decorators refer to the same object.

template<typename T >
void itk::DataObjectDecorator< T >::Graft ( const Self decorator)
template<typename T >
template<typename TOther >
void itk::DataObjectDecorator< T >::Graft ( const DataObjectDecorator< TOther > *  decorator)
inline

Method to aid in dynamic Graft of polymorphic types.

To this method by default a raw pointer must be used or explicit
template parameter must be provided.

Definition at line 117 of file itkDataObjectDecorator.h.

template<typename T >
virtual void itk::DataObjectDecorator< T >::Initialize ( )
overridevirtual

Restore the data object to its initial state. This means releasing the help component.

template<typename T >
static Pointer itk::DataObjectDecorator< T >::New ( )
static

Method for creation through the object factory.

template<typename T >
virtual void itk::DataObjectDecorator< T >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual
template<typename T >
virtual void itk::DataObjectDecorator< T >::Set ( const ComponentType val)
virtual

Set the contained object

Member Data Documentation

template<typename T >
ComponentPointer itk::DataObjectDecorator< T >::m_Component
private

Definition at line 136 of file itkDataObjectDecorator.h.


The documentation for this class was generated from the following file: