go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elastix::MainBase Class Referenceabstract

#include <elxMainBase.h>

Detailed Description

Common (abstract) base class of ElastixMain and TransformixMain.

Definition at line 44 of file elxMainBase.h.

Inheritance diagram for elastix::MainBase:

Public Types

using ArgumentMapType = Configuration::CommandLineArgumentMapType
 
using ComponentDatabasePointer = ComponentDatabase::Pointer
 
using ComponentDescriptionType = ComponentDatabase::ComponentDescriptionType
 
using ConstPointer = itk::SmartPointer<const Self>
 
using DataObjectContainerPointer = ElastixBase::DataObjectContainerPointer
 
using DataObjectContainerType = ElastixBase::DataObjectContainerType
 
using DataObjectPointer = itk::DataObject::Pointer
 
using DBIndexType = ComponentDatabase::IndexType
 
using FlatDirectionCosinesType = ElastixBase::FlatDirectionCosinesType
 
using ImageDimensionType = ComponentDatabase::ImageDimensionType
 
using ObjectContainerPointer = ElastixBase::ObjectContainerPointer
 
using ObjectContainerType = ElastixBase::ObjectContainerType
 
using ObjectPointer = itk::Object::Pointer
 
using ParameterMapType = itk::ParameterMapInterface::ParameterMapType
 
using PixelTypeDescriptionType = ComponentDatabase::PixelTypeDescriptionType
 
using Pointer = itk::SmartPointer<Self>
 
using PtrToCreator = ComponentDatabase::PtrToCreator
 
using Self = MainBase
 
using Superclass = itk::Object
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual DBIndexType GetDBIndex () const
 
ElastixBaseGetElastixBase () const
 
virtual ImageDimensionType GetFixedImageDimension () const
 
virtual PixelTypeDescriptionType GetFixedImagePixelType () const
 
virtual ImageDimensionType GetMovingImageDimension () const
 
virtual PixelTypeDescriptionType GetMovingImagePixelType () const
 
 ITK_DISALLOW_COPY_AND_MOVE (MainBase)
 
 itkGetModifiableObjectMacro (Configuration, Configuration)
 
 itkGetModifiableObjectMacro (Elastix, itk::Object)
 
 itkGetModifiableObjectMacro (MovingImageContainer, DataObjectContainerType)
 
 itkGetModifiableObjectMacro (ResultDeformationFieldContainer, DataObjectContainerType)
 
 itkGetModifiableObjectMacro (ResultImageContainer, DataObjectContainerType)
 
virtual int Run ()=0
 
virtual int Run (const ArgumentMapType &argmap)
 
virtual int Run (const ArgumentMapType &argmap, const ParameterMapType &inputMap)
 
virtual void SetConfiguration (Configuration *_arg)
 
virtual void SetFixedImageDimension (ImageDimensionType _arg)
 
virtual void SetFixedImagePixelType (PixelTypeDescriptionType _arg)
 
virtual void SetMaximumNumberOfThreads () const
 
virtual void SetMovingImageContainer (DataObjectContainerType *_arg)
 
virtual void SetMovingImageDimension (ImageDimensionType _arg)
 
virtual void SetMovingImagePixelType (PixelTypeDescriptionType _arg)
 
virtual void SetProcessPriority () const
 
virtual void SetResultDeformationFieldContainer (DataObjectContainerType *_arg)
 
virtual void SetResultImageContainer (DataObjectContainerType *_arg)
 

Static Public Member Functions

static const ComponentDatabaseGetComponentDatabase ()
 

Protected Member Functions

virtual ObjectPointer CreateComponent (const ComponentDescriptionType &name)
 
virtual ObjectContainerPointer CreateComponents (const ComponentDescriptionType &key, const ComponentDescriptionType &defaultComponentName, int &errorcode, bool mandatoryComponent=true)
 
virtual int InitDBIndex ()=0
 
 MainBase ()
 
 ~MainBase () override=0
 

Protected Attributes

DBIndexType m_DBIndex { 0 }
 
ObjectPointer m_Elastix { nullptr }
 
ImageDimensionType m_FixedImageDimension { 0 }
 
PixelTypeDescriptionType m_FixedImagePixelType {}
 
DataObjectContainerPointer m_MovingImageContainer { nullptr }
 
ImageDimensionType m_MovingImageDimension { 0 }
 
PixelTypeDescriptionType m_MovingImagePixelType {}
 
DataObjectContainerPointer m_ResultDeformationFieldContainer { nullptr }
 
DataObjectContainerPointer m_ResultImageContainer { nullptr }
 
std::vector< Configuration::ConstPointerm_TransformConfigurations {}
 

Private Attributes

Configuration::Pointer m_Configuration { Configuration::New() }
 

Member Typedef Documentation

◆ ArgumentMapType

elastix components.

Definition at line 65 of file elxMainBase.h.

◆ ComponentDatabasePointer

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 75 of file elxMainBase.h.

◆ ComponentDescriptionType

◆ ConstPointer

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

Definition at line 53 of file elxMainBase.h.

◆ DataObjectContainerPointer

◆ DataObjectContainerType

◆ DataObjectPointer

using elastix::MainBase::DataObjectPointer = itk::DataObject::Pointer

Definition at line 62 of file elxMainBase.h.

◆ DBIndexType

◆ FlatDirectionCosinesType

◆ ImageDimensionType

◆ ObjectContainerPointer

◆ ObjectContainerType

◆ ObjectPointer

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

Typedef's. ITK base objects.

Definition at line 61 of file elxMainBase.h.

◆ ParameterMapType

Typedef that is used in the elastix dll version.

Definition at line 83 of file elxMainBase.h.

◆ PixelTypeDescriptionType

◆ Pointer

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

Definition at line 52 of file elxMainBase.h.

◆ PtrToCreator

◆ Self

Standard itk.

Definition at line 50 of file elxMainBase.h.

◆ Superclass

using elastix::MainBase::Superclass = itk::Object

Definition at line 51 of file elxMainBase.h.

Constructor & Destructor Documentation

◆ MainBase()

elastix::MainBase::MainBase ( )
protected

◆ ~MainBase()

elastix::MainBase::~MainBase ( )
overrideprotectedpure virtual

Member Function Documentation

◆ CreateComponent()

virtual ObjectPointer elastix::MainBase::CreateComponent ( const ComponentDescriptionType & name)
protectedvirtual

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

◆ CreateComponents()

virtual ObjectContainerPointer elastix::MainBase::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

◆ GetClassName()

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

Run-time type information (and related methods).

Reimplemented in elastix::ElastixMain, and elastix::TransformixMain.

◆ GetComponentDatabase()

static const ComponentDatabase & elastix::MainBase::GetComponentDatabase ( )
static

Function to get the ComponentDatabase.

◆ GetDBIndex()

virtual DBIndexType elastix::MainBase::GetDBIndex ( ) const
virtual

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

◆ GetElastixBase()

ElastixBase & elastix::MainBase::GetElastixBase ( ) const

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

◆ GetFixedImageDimension()

virtual ImageDimensionType elastix::MainBase::GetFixedImageDimension ( ) const
virtual

◆ GetFixedImagePixelType()

virtual PixelTypeDescriptionType elastix::MainBase::GetFixedImagePixelType ( ) const
virtual

◆ GetMovingImageDimension()

virtual ImageDimensionType elastix::MainBase::GetMovingImageDimension ( ) const
virtual

◆ GetMovingImagePixelType()

virtual PixelTypeDescriptionType elastix::MainBase::GetMovingImagePixelType ( ) const
virtual

◆ InitDBIndex()

virtual int elastix::MainBase::InitDBIndex ( )
protectedpure virtual

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

Implemented in elastix::ElastixMain, and elastix::TransformixMain.

◆ ITK_DISALLOW_COPY_AND_MOVE()

elastix::MainBase::ITK_DISALLOW_COPY_AND_MOVE ( MainBase )

◆ itkGetModifiableObjectMacro() [1/5]

elastix::MainBase::itkGetModifiableObjectMacro ( Configuration ,
Configuration  )

◆ itkGetModifiableObjectMacro() [2/5]

elastix::MainBase::itkGetModifiableObjectMacro ( Elastix ,
itk::Object  )

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

◆ itkGetModifiableObjectMacro() [3/5]

elastix::MainBase::itkGetModifiableObjectMacro ( MovingImageContainer ,
DataObjectContainerType  )

◆ itkGetModifiableObjectMacro() [4/5]

elastix::MainBase::itkGetModifiableObjectMacro ( ResultDeformationFieldContainer ,
DataObjectContainerType  )

◆ itkGetModifiableObjectMacro() [5/5]

elastix::MainBase::itkGetModifiableObjectMacro ( ResultImageContainer ,
DataObjectContainerType  )

◆ Run() [1/3]

virtual int elastix::MainBase::Run ( )
pure 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.

Implemented in elastix::ElastixMain, and elastix::TransformixMain.

◆ Run() [2/3]

virtual int elastix::MainBase::Run ( const ArgumentMapType & argmap)
virtual

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

Reimplemented in elastix::ElastixMain, and elastix::TransformixMain.

◆ Run() [3/3]

virtual int elastix::MainBase::Run ( const ArgumentMapType & argmap,
const ParameterMapType & inputMap )
virtual

◆ SetConfiguration()

virtual void elastix::MainBase::SetConfiguration ( Configuration * _arg)
virtual

Set/Get the configuration object.

◆ SetFixedImageDimension()

virtual void elastix::MainBase::SetFixedImageDimension ( ImageDimensionType _arg)
virtual

◆ SetFixedImagePixelType()

virtual void elastix::MainBase::SetFixedImagePixelType ( PixelTypeDescriptionType _arg)
virtual

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

◆ SetMaximumNumberOfThreads()

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

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

◆ SetMovingImageContainer()

virtual void elastix::MainBase::SetMovingImageContainer ( DataObjectContainerType * _arg)
virtual

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

◆ SetMovingImageDimension()

virtual void elastix::MainBase::SetMovingImageDimension ( ImageDimensionType _arg)
virtual

◆ SetMovingImagePixelType()

virtual void elastix::MainBase::SetMovingImagePixelType ( PixelTypeDescriptionType _arg)
virtual

◆ SetProcessPriority()

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

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

◆ SetResultDeformationFieldContainer()

virtual void elastix::MainBase::SetResultDeformationFieldContainer ( DataObjectContainerType * _arg)
virtual

◆ SetResultImageContainer()

virtual void elastix::MainBase::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).

Field Documentation

◆ m_Configuration

Configuration::Pointer elastix::MainBase::m_Configuration { Configuration::New() }
private

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

Definition at line 228 of file elxMainBase.h.

◆ m_DBIndex

DBIndexType elastix::MainBase::m_DBIndex { 0 }
protected

Definition at line 185 of file elxMainBase.h.

◆ m_Elastix

ObjectPointer elastix::MainBase::m_Elastix { nullptr }
protected

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

Definition at line 174 of file elxMainBase.h.

◆ m_FixedImageDimension

ImageDimensionType elastix::MainBase::m_FixedImageDimension { 0 }
protected

Definition at line 181 of file elxMainBase.h.

◆ m_FixedImagePixelType

PixelTypeDescriptionType elastix::MainBase::m_FixedImagePixelType {}
protected

Description of the ImageTypes.

Definition at line 180 of file elxMainBase.h.

◆ m_MovingImageContainer

DataObjectContainerPointer elastix::MainBase::m_MovingImageContainer { nullptr }
protected

The images and masks.

Definition at line 188 of file elxMainBase.h.

◆ m_MovingImageDimension

ImageDimensionType elastix::MainBase::m_MovingImageDimension { 0 }
protected

Definition at line 183 of file elxMainBase.h.

◆ m_MovingImagePixelType

PixelTypeDescriptionType elastix::MainBase::m_MovingImagePixelType {}
protected

Definition at line 182 of file elxMainBase.h.

◆ m_ResultDeformationFieldContainer

DataObjectContainerPointer elastix::MainBase::m_ResultDeformationFieldContainer { nullptr }
protected

Definition at line 190 of file elxMainBase.h.

◆ m_ResultImageContainer

DataObjectContainerPointer elastix::MainBase::m_ResultImageContainer { nullptr }
protected

Definition at line 189 of file elxMainBase.h.

◆ m_TransformConfigurations

std::vector<Configuration::ConstPointer> elastix::MainBase::m_TransformConfigurations {}
protected

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

Definition at line 177 of file elxMainBase.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo