go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes
elastix::ComponentDatabase Class Reference

#include <elxComponentDatabase.h>

Detailed Description

The ComponentDatabase class is a class that stores the New() functions of all components.

In elastix the metric/transform/dimension/pixeltype etc. are all selected at runtime. To make this possible, all components (metric/transform etc) have to compiled for different dimension/pixeltype. The elx::ComponentDatabase stores for each instance and each pixeltype/dimension a pointers to a function that creates a component of the specific type.

Each new component (a new metric for example should "make itself known" by calling the elxInstallMacro, which is defined in elxMacro.h .

See also
elxInstallFunctions

Definition at line 52 of file elxComponentDatabase.h.

Inheritance diagram for elastix::ComponentDatabase:
Inheritance graph
[legend]

Public Types

using ComponentDescriptionType = std::string
 
using ConstPointer = itk::SmartPointer< const Self >
 
using CreatorMapEntryType = CreatorMapType::value_type
 
using CreatorMapKeyType = std::pair< ComponentDescriptionType, IndexType >
 
using CreatorMapType = std::map< CreatorMapKeyType, CreatorMapValueType >
 
using CreatorMapValueType = PtrToCreator
 
using ImageDimensionType = unsigned int
 
using ImageTypeDescriptionType = std::pair< PixelTypeDescriptionType, ImageDimensionType >
 
using IndexMapEntryType = IndexMapType::value_type
 
using IndexMapKeyType = std::pair< ImageTypeDescriptionType, ImageTypeDescriptionType >
 
using IndexMapType = std::map< IndexMapKeyType, IndexMapValueType >
 
using IndexMapValueType = IndexType
 
using IndexType = unsigned int
 
using ObjectPointer = itk::Object::Pointer
 
using PixelTypeDescriptionType = std::string
 
using Pointer = itk::SmartPointer< Self >
 
using PtrToCreator = ObjectPointer(*)()
 
using Self = ComponentDatabase
 
using Superclass = itk::Object
 

Public Member Functions

virtual const char * GetClassName () const
 
PtrToCreator GetCreator (const ComponentDescriptionType &name, IndexType i) const
 
IndexType GetIndex (const PixelTypeDescriptionType &fixedPixelType, ImageDimensionType fixedDimension, const PixelTypeDescriptionType &movingPixelType, ImageDimensionType movingDimension) const
 
 ITK_DISALLOW_COPY_AND_MOVE (ComponentDatabase)
 
int SetCreator (const ComponentDescriptionType &name, IndexType i, PtrToCreator creator)
 
int SetIndex (const PixelTypeDescriptionType &fixedPixelType, ImageDimensionType fixedDimension, const PixelTypeDescriptionType &movingPixelType, ImageDimensionType movingDimension, IndexType i)
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 ComponentDatabase ()=default
 
 ~ComponentDatabase () override=default
 

Private Attributes

CreatorMapType CreatorMap
 
IndexMapType IndexMap
 

Member Typedef Documentation

◆ ComponentDescriptionType

Definition at line 76 of file elxComponentDatabase.h.

◆ ConstPointer

using elastix::ComponentDatabase::ConstPointer = itk::SmartPointer<const Self>

Definition at line 61 of file elxComponentDatabase.h.

◆ CreatorMapEntryType

using elastix::ComponentDatabase::CreatorMapEntryType = CreatorMapType::value_type

Definition at line 80 of file elxComponentDatabase.h.

◆ CreatorMapKeyType

Definition at line 77 of file elxComponentDatabase.h.

◆ CreatorMapType

Definition at line 79 of file elxComponentDatabase.h.

◆ CreatorMapValueType

Definition at line 78 of file elxComponentDatabase.h.

◆ ImageDimensionType

Definition at line 88 of file elxComponentDatabase.h.

◆ ImageTypeDescriptionType

Definition at line 89 of file elxComponentDatabase.h.

◆ IndexMapEntryType

using elastix::ComponentDatabase::IndexMapEntryType = IndexMapType::value_type

Definition at line 97 of file elxComponentDatabase.h.

◆ IndexMapKeyType

This pair contains the ImageTypeDescription of the FixedImageType and the MovingImageType.

Definition at line 94 of file elxComponentDatabase.h.

◆ IndexMapType

Definition at line 96 of file elxComponentDatabase.h.

◆ IndexMapValueType

Definition at line 95 of file elxComponentDatabase.h.

◆ IndexType

The Index is the number of the ElastixTypedef<number>::ElastixType.

Definition at line 67 of file elxComponentDatabase.h.

◆ ObjectPointer

using elastix::ComponentDatabase::ObjectPointer = itk::Object::Pointer

Typedefs for the CreatorMap

Definition at line 70 of file elxComponentDatabase.h.

◆ PixelTypeDescriptionType

Typedefs for the IndexMap. The ImageTypeDescription contains the pixeltype (as a string) and the dimension (unsigned int).

Definition at line 87 of file elxComponentDatabase.h.

◆ Pointer

using elastix::ComponentDatabase::Pointer = itk::SmartPointer<Self>

Definition at line 60 of file elxComponentDatabase.h.

◆ PtrToCreator

PtrToCreator is a pointer to a function which outputs an ObjectPointer and has no input arguments.

Definition at line 75 of file elxComponentDatabase.h.

◆ Self

Standard.

Definition at line 58 of file elxComponentDatabase.h.

◆ Superclass

Definition at line 59 of file elxComponentDatabase.h.

Constructor & Destructor Documentation

◆ ComponentDatabase()

elastix::ComponentDatabase::ComponentDatabase ( )
protecteddefault

◆ ~ComponentDatabase()

elastix::ComponentDatabase::~ComponentDatabase ( )
overrideprotecteddefault

Member Function Documentation

◆ GetClassName()

virtual const char * elastix::ComponentDatabase::GetClassName ( ) const
virtual

◆ GetCreator()

PtrToCreator elastix::ComponentDatabase::GetCreator ( const ComponentDescriptionType name,
IndexType  i 
) const

Functions to get an entry in a map

◆ GetIndex()

IndexType elastix::ComponentDatabase::GetIndex ( const PixelTypeDescriptionType fixedPixelType,
ImageDimensionType  fixedDimension,
const PixelTypeDescriptionType movingPixelType,
ImageDimensionType  movingDimension 
) const

◆ ITK_DISALLOW_COPY_AND_MOVE()

elastix::ComponentDatabase::ITK_DISALLOW_COPY_AND_MOVE ( ComponentDatabase  )

◆ New()

static Pointer elastix::ComponentDatabase::New ( )
static

◆ SetCreator()

int elastix::ComponentDatabase::SetCreator ( const ComponentDescriptionType name,
IndexType  i,
PtrToCreator  creator 
)

Functions to set an entry in a map.

◆ SetIndex()

int elastix::ComponentDatabase::SetIndex ( const PixelTypeDescriptionType fixedPixelType,
ImageDimensionType  fixedDimension,
const PixelTypeDescriptionType movingPixelType,
ImageDimensionType  movingDimension,
IndexType  i 
)

Field Documentation

◆ CreatorMap

CreatorMapType elastix::ComponentDatabase::CreatorMap
private

Definition at line 125 of file elxComponentDatabase.h.

◆ IndexMap

IndexMapType elastix::ComponentDatabase::IndexMap
private

Definition at line 126 of file elxComponentDatabase.h.



Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo