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 | Protected Attributes | Static Protected Attributes | Private Member Functions
elastix::ElastixMain Class Reference

#include <elxElastixMain.h>

Detailed Description

A class with all functionality to configure elastix.

The ElastixMain initializes the MyConfiguration class with the parameters and commandline arguments. After this, the class loads and creates all components and sets them in ElastixTemplate.

Parameters:

FixedImageDimension: the dimension of the fixed image.
example: (FixedImageDimension 2)

MovingImageDimension: the dimension of the fixed image.
example: (MovingImageDimension 2)

FixedInternalImagePixelType: the pixel type of the internal fixed image representation. The fixed image is automatically converted to this type.
example: (FixedInternalImagePixelType "float")
Default/recommended: "float"

MovingInternalImagePixelType: the pixel type of the internal moving image representation. The moving image is automatically converted to this type.
example: (MovingInternalImagePixelType "float")
Default/recommended: "float"

Transform Parameters:

FixedImageDimension: the dimension of the fixed image.
example: (FixedImageDimension 2)

MovingImageDimension: the dimension of the fixed image.
example: (MovingImageDimension 2)

FixedInternalImagePixelType: the pixel type of the internal fixed image representation. The fixed image is automatically converted to this type.
example: (FixedInternalImagePixelType "float")
Default/recommended: "float"

MovingInternalImagePixelType: the pixel type of the internal moving image representation. The moving image is automatically converted to this type.
example: (MovingInternalImagePixelType "float")
Default/recommended: "float"

Definition at line 98 of file elxElastixMain.h.

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

Public Types

typedef ConfigurationType::CommandLineArgumentMapType ArgumentMapType
 
typedef ComponentDatabaseType::Pointer ComponentDatabasePointer
 
typedef ComponentDatabase ComponentDatabaseType
 
typedef ComponentDatabaseType::ComponentDescriptionType ComponentDescriptionType
 
typedef ComponentLoaderType::Pointer ComponentLoaderPointer
 
typedef ComponentLoader ComponentLoaderType
 
typedef ConfigurationType::Pointer ConfigurationPointer
 
typedef ElastixBase::ConfigurationType ConfigurationType
 
typedef itk::SmartPointer< const SelfConstPointer
 
typedef ElastixBase::DataObjectContainerPointer DataObjectContainerPointer
 
typedef ElastixBase::DataObjectContainerType DataObjectContainerType
 
typedef DataObjectType::Pointer DataObjectPointer
 
typedef itk::DataObject DataObjectType
 
typedef ComponentDatabaseType::IndexType DBIndexType
 
typedef ElastixBase ElastixBaseType
 
typedef ElastixBase::FlatDirectionCosinesType FlatDirectionCosinesType
 
typedef ComponentDatabaseType::ImageDimensionType ImageDimensionType
 
typedef ElastixBase::ObjectContainerPointer ObjectContainerPointer
 
typedef ElastixBase::ObjectContainerType ObjectContainerType
 
typedef ObjectType::Pointer ObjectPointer
 
typedef itk::Object ObjectType
 
typedef itk::ParameterMapInterface::ParameterMapType ParameterMapType
 
typedef ComponentDatabaseType::PixelTypeDescriptionType PixelTypeDescriptionType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ComponentDatabaseType::PtrToCreator PtrToCreator
 
typedef ElastixMain Self
 
typedef itk::Object Superclass
 

Public Member Functions

virtual void EnterCommandLineArguments (ArgumentMapType &argmap)
 
virtual void EnterCommandLineArguments (ArgumentMapType &argmap, ParameterMapType &inputMap)
 
virtual void EnterCommandLineArguments (ArgumentMapType &argmap, std::vector< ParameterMapType > &inputMaps)
 
virtual const char * GetClassName () const
 
virtual ConfigurationTypeGetConfiguration ()
 
virtual DBIndexType GetDBIndex () const
 
virtual ObjectTypeGetElastix ()
 
virtual ElastixBaseTypeGetElastixBase (void) const
 
unsigned int GetElastixLevel (void)
 
virtual ObjectTypeGetFinalTransform ()
 
virtual DataObjectContainerTypeGetFixedImageContainer ()
 
virtual ImageDimensionType GetFixedImageDimension ()
 
virtual PixelTypeDescriptionType GetFixedImagePixelType ()
 
virtual DataObjectContainerTypeGetFixedMaskContainer ()
 
virtual ObjectTypeGetInitialTransform ()
 
virtual DataObjectContainerTypeGetMovingImageContainer ()
 
virtual ImageDimensionType GetMovingImageDimension ()
 
virtual PixelTypeDescriptionType GetMovingImagePixelType ()
 
virtual DataObjectContainerTypeGetMovingMaskContainer ()
 
virtual const FlatDirectionCosinesTypeGetOriginalFixedImageDirectionFlat (void) const
 
virtual DataObjectContainerTypeGetResultImageContainer ()
 
unsigned int GetTotalNumberOfElastixLevels (void)
 
virtual ParameterMapType GetTransformParametersMap (void) const
 
virtual int Run (void)
 
virtual int Run (ArgumentMapType &argmap)
 
virtual int Run (ArgumentMapType &argmap, ParameterMapType &inputMap)
 
virtual void SetConfiguration (ConfigurationType *_arg)
 
void SetElastixLevel (unsigned int level)
 
virtual void SetFixedImageContainer (DataObjectContainerType *_arg)
 
virtual void SetFixedImageDimension (ImageDimensionType _arg)
 
virtual void SetFixedImagePixelType (PixelTypeDescriptionType _arg)
 
virtual void SetFixedMaskContainer (DataObjectContainerType *_arg)
 
virtual void SetInitialTransform (ObjectType *_arg)
 
virtual void SetMaximumNumberOfThreads (void) const
 
virtual void SetMovingImageContainer (DataObjectContainerType *_arg)
 
virtual void SetMovingImageDimension (ImageDimensionType _arg)
 
virtual void SetMovingImagePixelType (PixelTypeDescriptionType _arg)
 
virtual void SetMovingMaskContainer (DataObjectContainerType *_arg)
 
virtual void SetOriginalFixedImageDirectionFlat (const FlatDirectionCosinesType &arg)
 
virtual void SetProcessPriority (void) const
 
virtual void SetResultImageContainer (DataObjectContainerType *_arg)
 
void SetTotalNumberOfElastixLevels (unsigned int levels)
 

Static Public Member Functions

static ComponentDatabaseGetComponentDatabase (void)
 
static Pointer New ()
 
static void SetComponentDatabase (ComponentDatabase *arg)
 
static void UnloadComponents (void)
 

Protected Member Functions

virtual ObjectPointer CreateComponent (const ComponentDescriptionType &name)
 
virtual ObjectContainerPointer CreateComponents (const ComponentDescriptionType &key, const ComponentDescriptionType &defaultComponentName, int &errorcode, bool mandatoryComponent=true)
 
 ElastixMain ()
 
void GetImageInformationFromFile (const std::string &filename, ImageDimensionType &imageDimension) const
 
virtual int InitDBIndex (void)
 
virtual int LoadComponents (void)
 
virtual ~ElastixMain ()
 

Protected Attributes

ConfigurationPointer m_Configuration
 
std::vector< ConfigurationPointerm_Configurations
 
DBIndexType m_DBIndex
 
ObjectPointer m_Elastix
 
ObjectPointer m_FinalTransform
 
DataObjectContainerPointer m_FixedImageContainer
 
ImageDimensionType m_FixedImageDimension
 
PixelTypeDescriptionType m_FixedImagePixelType
 
DataObjectContainerPointer m_FixedMaskContainer
 
ObjectPointer m_InitialTransform
 
DataObjectContainerPointer m_MovingImageContainer
 
ImageDimensionType m_MovingImageDimension
 
PixelTypeDescriptionType m_MovingImagePixelType
 
DataObjectContainerPointer m_MovingMaskContainer
 
FlatDirectionCosinesType m_OriginalFixedImageDirection
 
DataObjectContainerPointer m_ResultImageContainer
 
ParameterMapType m_TransformParametersMap
 

Static Protected Attributes

static ComponentDatabasePointer s_CDB
 
static ComponentLoaderPointer s_ComponentLoader
 

Private Member Functions

 ElastixMain (const Self &)
 
void operator= (const Self &)
 

Member Typedef Documentation

Definition at line 125 of file elxElastixMain.h.

Definition at line 137 of file elxElastixMain.h.

Typedefs for the database that holds pointers to New() functions. Those functions are used to instantiate components, such as the metric etc.

Definition at line 136 of file elxElastixMain.h.

Definition at line 139 of file elxElastixMain.h.

Definition at line 146 of file elxElastixMain.h.

Typedef for class that populates a ComponentDatabase.

Definition at line 145 of file elxElastixMain.h.

Definition at line 126 of file elxElastixMain.h.

Definition at line 124 of file elxElastixMain.h.

typedef itk::SmartPointer< const Self > elastix::ElastixMain::ConstPointer

Definition at line 106 of file elxElastixMain.h.

Definition at line 130 of file elxElastixMain.h.

Definition at line 128 of file elxElastixMain.h.

typedef DataObjectType::Pointer elastix::ElastixMain::DataObjectPointer

Definition at line 120 of file elxElastixMain.h.

typedef itk::DataObject elastix::ElastixMain::DataObjectType

Definition at line 119 of file elxElastixMain.h.

Definition at line 142 of file elxElastixMain.h.

elastix components.

Definition at line 123 of file elxElastixMain.h.

Definition at line 131 of file elxElastixMain.h.

Definition at line 141 of file elxElastixMain.h.

Definition at line 129 of file elxElastixMain.h.

Definition at line 127 of file elxElastixMain.h.

typedef ObjectType::Pointer elastix::ElastixMain::ObjectPointer

Definition at line 118 of file elxElastixMain.h.

typedef itk::Object elastix::ElastixMain::ObjectType

Typedef's. ITK base objects.

Definition at line 112 of file elxElastixMain.h.

Typedef that is used in the elastix dll version.

Definition at line 149 of file elxElastixMain.h.

Definition at line 140 of file elxElastixMain.h.

typedef itk::SmartPointer< Self > elastix::ElastixMain::Pointer

Definition at line 105 of file elxElastixMain.h.

typedef ComponentDatabaseType::PtrToCreator elastix::ElastixMain::PtrToCreator

Definition at line 138 of file elxElastixMain.h.

Standard itk.

Definition at line 103 of file elxElastixMain.h.

typedef itk::Object elastix::ElastixMain::Superclass

Definition at line 104 of file elxElastixMain.h.

Constructor & Destructor Documentation

elastix::ElastixMain::ElastixMain ( )
protected
virtual elastix::ElastixMain::~ElastixMain ( )
protectedvirtual
elastix::ElastixMain::ElastixMain ( const Self )
private

Member Function Documentation

virtual ObjectPointer elastix::ElastixMain::CreateComponent ( const ComponentDescriptionType name)
protectedvirtual

Create a component. Make sure InitDBIndex has been called before. The input is a string, e.g. "MattesMutualInformation".

virtual ObjectContainerPointer elastix::ElastixMain::CreateComponents ( const ComponentDescriptionType key,
const ComponentDescriptionType defaultComponentName,
int errorcode,
bool  mandatoryComponent = true 
)
protectedvirtual

Create components. Reads from the configuration object (using the provided key) the names of the components to create and store their instantiations in the provided ObjectContainer. The errorcode remains what it was if no error occurred. Otherwise it's set to 1. The 'key' is the entry inspected in the parameter file A component named 'defaultComponentName' is used when the key is not found in the parameter file. If "" is used, no default is assumed, and an error is given when the component was not specified. If the flag mandatoryComponent is set to false, no error is given, because the component may not be needed anyway.

NB: this function should never be called with: ( !mandatoryComponent && defaultComponentName != "" ) == true

virtual void elastix::ElastixMain::EnterCommandLineArguments ( ArgumentMapType argmap)
virtual

Enter the command line parameters, which were given by the user, if elastix.exe is used to do a registration. The Configuration object will be initialized in this way.

virtual void elastix::ElastixMain::EnterCommandLineArguments ( ArgumentMapType argmap,
ParameterMapType inputMap 
)
virtual
virtual void elastix::ElastixMain::EnterCommandLineArguments ( ArgumentMapType argmap,
std::vector< ParameterMapType > &  inputMaps 
)
virtual
virtual const char* elastix::ElastixMain::GetClassName ( ) const
virtual

Run-time type information (and related methods).

Reimplemented in elastix::TransformixMain.

static ComponentDatabase* elastix::ElastixMain::GetComponentDatabase ( void  )
inlinestatic

Functions to get/set the ComponentDatabase.

Definition at line 276 of file elxElastixMain.h.

virtual ConfigurationType* elastix::ElastixMain::GetConfiguration ( )
virtual
virtual DBIndexType elastix::ElastixMain::GetDBIndex ( ) const
virtual

Returns the Index that is used in elx::ComponentDatabase.

virtual ObjectType* elastix::ElastixMain::GetElastix ( )
virtual

Functions to get pointers to the elastix components. The components are returned as Object::Pointer. Before calling this functions, call run().

virtual ElastixBaseType* elastix::ElastixMain::GetElastixBase ( void  ) const
virtual

Convenience function that returns the elastix component as a pointer to an ElastixBaseType. Use only after having called run()!

unsigned int elastix::ElastixMain::GetElastixLevel ( void  )
virtual ObjectType* elastix::ElastixMain::GetFinalTransform ( )
virtual

Get the final transform (the result of running elastix). You may pass this as an InitialTransform in an other instantiation of ElastixMain. Only valid after calling Run()!

virtual DataObjectContainerType* elastix::ElastixMain::GetFixedImageContainer ( )
virtual
virtual ImageDimensionType elastix::ElastixMain::GetFixedImageDimension ( )
virtual
virtual PixelTypeDescriptionType elastix::ElastixMain::GetFixedImagePixelType ( )
virtual
virtual DataObjectContainerType* elastix::ElastixMain::GetFixedMaskContainer ( )
virtual
void elastix::ElastixMain::GetImageInformationFromFile ( const std::string &  filename,
ImageDimensionType imageDimension 
) const
protected

Helper function to obtain information from images on disk.

virtual ObjectType* elastix::ElastixMain::GetInitialTransform ( )
virtual
virtual DataObjectContainerType* elastix::ElastixMain::GetMovingImageContainer ( )
virtual
virtual ImageDimensionType elastix::ElastixMain::GetMovingImageDimension ( )
virtual
virtual PixelTypeDescriptionType elastix::ElastixMain::GetMovingImagePixelType ( )
virtual
virtual DataObjectContainerType* elastix::ElastixMain::GetMovingMaskContainer ( )
virtual
virtual const FlatDirectionCosinesType& elastix::ElastixMain::GetOriginalFixedImageDirectionFlat ( void  ) const
virtual
virtual DataObjectContainerType* elastix::ElastixMain::GetResultImageContainer ( )
virtual
unsigned int elastix::ElastixMain::GetTotalNumberOfElastixLevels ( void  )
virtual ParameterMapType elastix::ElastixMain::GetTransformParametersMap ( void  ) const
virtual

GetTransformParametersMap

virtual int elastix::ElastixMain::InitDBIndex ( void  )
protectedvirtual

InitDBIndex sets m_DBIndex by asking the ImageTypes from the Configuration object and obtaining the corresponding DB index from the ComponentDatabase.

Reimplemented in elastix::TransformixMain.

virtual int elastix::ElastixMain::LoadComponents ( void  )
protectedvirtual
static Pointer elastix::ElastixMain::New ( )
static

Method for creation through the object factory.

void elastix::ElastixMain::operator= ( const Self )
private
virtual int elastix::ElastixMain::Run ( void  )
virtual

Start the registration run() without command line parameters; it assumes that EnterCommandLineParameters has been invoked already, or that m_Configuration is initialized in a different way.

Reimplemented in elastix::TransformixMain.

virtual int elastix::ElastixMain::Run ( ArgumentMapType argmap)
virtual

Start the registration this version of 'run' first calls this->EnterCommandLineParameters(argc,argv) and then calls run().

Reimplemented in elastix::TransformixMain.

virtual int elastix::ElastixMain::Run ( ArgumentMapType argmap,
ParameterMapType inputMap 
)
virtual

Reimplemented in elastix::TransformixMain.

static void elastix::ElastixMain::SetComponentDatabase ( ComponentDatabase arg)
inlinestatic

Definition at line 282 of file elxElastixMain.h.

virtual void elastix::ElastixMain::SetConfiguration ( ConfigurationType _arg)
virtual

Set/Get the configuration object.

void elastix::ElastixMain::SetElastixLevel ( unsigned int  level)

Get and Set the elastix level.

virtual void elastix::ElastixMain::SetFixedImageContainer ( DataObjectContainerType _arg)
virtual

Set/Get functions for the fixed and moving images (if these are not used, elastix tries to read them from disk, according to the command line parameters).

virtual void elastix::ElastixMain::SetFixedImageDimension ( ImageDimensionType  _arg)
virtual
virtual void elastix::ElastixMain::SetFixedImagePixelType ( PixelTypeDescriptionType  _arg)
virtual

Set/Get functions for the description of the image type.

virtual void elastix::ElastixMain::SetFixedMaskContainer ( DataObjectContainerType _arg)
virtual

Set/Get functions for the fixed and moving masks (if these are not used, elastix tries to read them from disk, according to the command line parameters).

virtual void elastix::ElastixMain::SetInitialTransform ( ObjectType _arg)
virtual

Set/Get the initial transform the type is ObjectType, but the pointer should actually point to an itk::Transform type (or inherited from that one).

virtual void elastix::ElastixMain::SetMaximumNumberOfThreads ( void  ) const
virtual

Set maximum number of threads, which is read from the command line arguments. Syntax: -threads <int>

virtual void elastix::ElastixMain::SetMovingImageContainer ( DataObjectContainerType _arg)
virtual
virtual void elastix::ElastixMain::SetMovingImageDimension ( ImageDimensionType  _arg)
virtual
virtual void elastix::ElastixMain::SetMovingImagePixelType ( PixelTypeDescriptionType  _arg)
virtual
virtual void elastix::ElastixMain::SetMovingMaskContainer ( DataObjectContainerType _arg)
virtual
virtual void elastix::ElastixMain::SetOriginalFixedImageDirectionFlat ( const FlatDirectionCosinesType arg)
virtual

Set/Get the original fixed image direction as a flat array (d11 d21 d31 d21 d22 etc )

virtual void elastix::ElastixMain::SetProcessPriority ( void  ) const
virtual

Set process priority, which is read from the command line arguments. Syntax: -priority <high, belownormal>

virtual void elastix::ElastixMain::SetResultImageContainer ( DataObjectContainerType _arg)
virtual

Set/Get functions for the result images (if these are not used, elastix tries to read them from disk, according to the command line parameters).

void elastix::ElastixMain::SetTotalNumberOfElastixLevels ( unsigned int  levels)

Get and Set the total number of elastix levels.

static void elastix::ElastixMain::UnloadComponents ( void  )
static

Field Documentation

ConfigurationPointer elastix::ElastixMain::m_Configuration
protected

The configuration object, containing the parameters and command-line arguments.

Definition at line 307 of file elxElastixMain.h.

std::vector< ConfigurationPointer > elastix::ElastixMain::m_Configurations
protected

A vector of configuration objects, needed when transformix is used as library.

Definition at line 310 of file elxElastixMain.h.

DBIndexType elastix::ElastixMain::m_DBIndex
protected

Definition at line 318 of file elxElastixMain.h.

ObjectPointer elastix::ElastixMain::m_Elastix
protected

A pointer to elastix as an itk::object. In run() this pointer will be assigned to an ElastixTemplate<>.

Definition at line 304 of file elxElastixMain.h.

ObjectPointer elastix::ElastixMain::m_FinalTransform
protected

A transform that is the result of registration.

Definition at line 328 of file elxElastixMain.h.

DataObjectContainerPointer elastix::ElastixMain::m_FixedImageContainer
protected

The images and masks.

Definition at line 321 of file elxElastixMain.h.

ImageDimensionType elastix::ElastixMain::m_FixedImageDimension
protected

Definition at line 314 of file elxElastixMain.h.

PixelTypeDescriptionType elastix::ElastixMain::m_FixedImagePixelType
protected

Description of the ImageTypes.

Definition at line 313 of file elxElastixMain.h.

DataObjectContainerPointer elastix::ElastixMain::m_FixedMaskContainer
protected

Definition at line 323 of file elxElastixMain.h.

ObjectPointer elastix::ElastixMain::m_InitialTransform
protected

The initial transform.

Definition at line 331 of file elxElastixMain.h.

DataObjectContainerPointer elastix::ElastixMain::m_MovingImageContainer
protected

Definition at line 322 of file elxElastixMain.h.

ImageDimensionType elastix::ElastixMain::m_MovingImageDimension
protected

Definition at line 316 of file elxElastixMain.h.

PixelTypeDescriptionType elastix::ElastixMain::m_MovingImagePixelType
protected

Definition at line 315 of file elxElastixMain.h.

DataObjectContainerPointer elastix::ElastixMain::m_MovingMaskContainer
protected

Definition at line 324 of file elxElastixMain.h.

FlatDirectionCosinesType elastix::ElastixMain::m_OriginalFixedImageDirection
protected

Definition at line 337 of file elxElastixMain.h.

DataObjectContainerPointer elastix::ElastixMain::m_ResultImageContainer
protected

Definition at line 325 of file elxElastixMain.h.

ParameterMapType elastix::ElastixMain::m_TransformParametersMap
protected

Transformation parameters map containing parameters that is the result of registration.

Definition at line 335 of file elxElastixMain.h.

ComponentDatabasePointer elastix::ElastixMain::s_CDB
staticprotected

Definition at line 339 of file elxElastixMain.h.

ComponentLoaderPointer elastix::ElastixMain::s_ComponentLoader
staticprotected

Definition at line 340 of file elxElastixMain.h.



Generated on 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo