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::SimpleDataObjectDecorator< T > Class Template Reference

#include <itkSimpleDataObjectDecorator.h>

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

Detailed Description

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

Decorates any "simple" data type (data types without smart pointers) with a DataObject API.

SimpleDataObjectDecorator decorates an object with a DataObject API. This allows simple objects to be encapsulated into objects that can be passed as down the pipeline. This decorator is intended to be used on native types (float, int, etc.) or any objects not derived from itkObject. To decorate a subclass of itkObject, see DataObjectDecorator.

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

Note that when an instance of SimpleDataObjectDecorator is created, the component is initialized with its default constructor.

SimpleDataObjectDecorator can decorate any simple data type. Two other decorators are provided for decorating pointers. DataObjectDecorator will decorate pointers to subclasses of itkObject (internally storing the pointer in a SmartPointer). AutoPointerDataObjectDecorator will decorate any other pointer and manage the memory deallocationg of the component.

See Also
DataObjectDecorator
AutoPointerDataObjectDecorator

Definition at line 66 of file itkSimpleDataObjectDecorator.h.

Public Types

typedef T ComponentType
 
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef SimpleDataObjectDecorator Self
 
typedef DataObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
virtual void Set (const T &val)
 
virtual T & Get ()
 
virtual const T & Get () const
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

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

Private Attributes

ComponentType m_Component
 
bool m_Initialized
 

Member Typedef Documentation

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

Typedef for the component type (object being decorated)

Definition at line 76 of file itkSimpleDataObjectDecorator.h.

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

Definition at line 73 of file itkSimpleDataObjectDecorator.h.

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

Definition at line 72 of file itkSimpleDataObjectDecorator.h.

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

Standard typedefs.

Definition at line 70 of file itkSimpleDataObjectDecorator.h.

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

Definition at line 71 of file itkSimpleDataObjectDecorator.h.

Constructor & Destructor Documentation

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

Member Function Documentation

template<typename T >
virtual::itk::LightObject::Pointer itk::SimpleDataObjectDecorator< T >::CreateAnother ( ) const
template<typename T >
virtual T& itk::SimpleDataObjectDecorator< T >::Get ( void  )
inlinevirtual

Get the contained object

Definition at line 88 of file itkSimpleDataObjectDecorator.h.

template<typename T >
virtual const T& itk::SimpleDataObjectDecorator< T >::Get ( void  ) const
inlinevirtual

Get the contained object

Definition at line 89 of file itkSimpleDataObjectDecorator.h.

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

Run-time type information (and related methods).

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

Method for creation through the object factory.

Referenced by itk::HistogramThresholdCalculator< THistogram, TOutput >::MakeOutput().

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

Set the contained object

Member Data Documentation

template<typename T >
ComponentType itk::SimpleDataObjectDecorator< T >::m_Component
private

Definition at line 100 of file itkSimpleDataObjectDecorator.h.

template<typename T >
bool itk::SimpleDataObjectDecorator< T >::m_Initialized
private

Definition at line 103 of file itkSimpleDataObjectDecorator.h.


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