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

#include <elxElastixBase.h>

Inheritance diagram for elastix::ElastixBase:
Inheritance graph
[legend]
Collaboration diagram for elastix::ElastixBase:
Collaboration graph
[legend]

Data Structures

class  MultipleImageLoader

Public Types

typedef
ComponentDatabaseType::Pointer 
ComponentDatabasePointer
typedef ComponentDatabase ComponentDatabaseType
typedef ConfigurationType::Pointer ConfigurationPointer
typedef Configuration ConfigurationType
typedef
DataObjectContainerType::Pointer 
DataObjectContainerPointer
typedef itk::VectorContainer
< unsigned int,
DataObjectPointer
DataObjectContainerType
typedef DataObjectType::Pointer DataObjectPointer
typedef itk::DataObject DataObjectType
typedef
ComponentDatabaseType::IndexType 
DBIndexType
typedef
FileNameContainerType::Pointer 
FileNameContainerPointer
typedef itk::VectorContainer
< unsigned int, std::string > 
FileNameContainerType
typedef std::vector< doubleFlatDirectionCosinesType
typedef Object ITKBaseType
typedef
ObjectContainerType::Pointer 
ObjectContainerPointer
typedef itk::VectorContainer
< unsigned int, ObjectPointer
ObjectContainerType
typedef ObjectType::Pointer ObjectPointer
typedef itk::Object ObjectType
typedef ElastixBase Self
typedef BaseComponent Superclass

Public Member Functions

virtual void AfterRegistrationBase (void)
virtual int ApplyTransform (void)=0
virtual int BeforeAllBase (void)
virtual int BeforeAllTransformixBase (void)
virtual void BeforeRegistrationBase (void)
 elxGetNumberOfMacro (Registration)
 elxGetNumberOfMacro (FixedImagePyramid)
 elxGetNumberOfMacro (MovingImagePyramid)
 elxGetNumberOfMacro (Interpolator)
 elxGetNumberOfMacro (ImageSampler)
 elxGetNumberOfMacro (Metric)
 elxGetNumberOfMacro (Optimizer)
 elxGetNumberOfMacro (Resampler)
 elxGetNumberOfMacro (ResampleInterpolator)
 elxGetNumberOfMacro (Transform)
 elxGetNumberOfMacro (FixedImage)
 elxGetNumberOfMacro (MovingImage)
 elxGetNumberOfMacro (FixedImageFileName)
 elxGetNumberOfMacro (MovingImageFileName)
 elxGetNumberOfMacro (FixedMask)
 elxGetNumberOfMacro (MovingMask)
 elxGetNumberOfMacro (FixedMaskFileName)
 elxGetNumberOfMacro (MovingMaskFileName)
 elxGetObjectMacro (Configuration, ConfigurationType)
 elxGetObjectMacro (ComponentDatabase, ComponentDatabaseType)
 elxGetObjectMacro (RegistrationContainer, ObjectContainerType)
 elxGetObjectMacro (FixedImagePyramidContainer, ObjectContainerType)
 elxGetObjectMacro (MovingImagePyramidContainer, ObjectContainerType)
 elxGetObjectMacro (InterpolatorContainer, ObjectContainerType)
 elxGetObjectMacro (ImageSamplerContainer, ObjectContainerType)
 elxGetObjectMacro (MetricContainer, ObjectContainerType)
 elxGetObjectMacro (OptimizerContainer, ObjectContainerType)
 elxGetObjectMacro (ResamplerContainer, ObjectContainerType)
 elxGetObjectMacro (ResampleInterpolatorContainer, ObjectContainerType)
 elxGetObjectMacro (TransformContainer, ObjectContainerType)
 elxGetObjectMacro (FixedImageContainer, DataObjectContainerType)
 elxGetObjectMacro (MovingImageContainer, DataObjectContainerType)
 elxGetObjectMacro (FixedMaskContainer, DataObjectContainerType)
 elxGetObjectMacro (MovingMaskContainer, DataObjectContainerType)
 elxGetObjectMacro (FixedImageFileNameContainer, FileNameContainerType)
 elxGetObjectMacro (MovingImageFileNameContainer, FileNameContainerType)
 elxGetObjectMacro (FixedMaskFileNameContainer, FileNameContainerType)
 elxGetObjectMacro (MovingMaskFileNameContainer, FileNameContainerType)
 elxGetObjectMacro (InitialTransform, ObjectType)
 elxGetObjectMacro (FinalTransform, ObjectType)
 elxSetObjectMacro (Configuration, ConfigurationType)
 elxSetObjectMacro (ComponentDatabase, ComponentDatabaseType)
 elxSetObjectMacro (RegistrationContainer, ObjectContainerType)
 elxSetObjectMacro (FixedImagePyramidContainer, ObjectContainerType)
 elxSetObjectMacro (MovingImagePyramidContainer, ObjectContainerType)
 elxSetObjectMacro (InterpolatorContainer, ObjectContainerType)
 elxSetObjectMacro (ImageSamplerContainer, ObjectContainerType)
 elxSetObjectMacro (MetricContainer, ObjectContainerType)
 elxSetObjectMacro (OptimizerContainer, ObjectContainerType)
 elxSetObjectMacro (ResamplerContainer, ObjectContainerType)
 elxSetObjectMacro (ResampleInterpolatorContainer, ObjectContainerType)
 elxSetObjectMacro (TransformContainer, ObjectContainerType)
 elxSetObjectMacro (FixedImageContainer, DataObjectContainerType)
 elxSetObjectMacro (MovingImageContainer, DataObjectContainerType)
 elxSetObjectMacro (FixedMaskContainer, DataObjectContainerType)
 elxSetObjectMacro (MovingMaskContainer, DataObjectContainerType)
 elxSetObjectMacro (FixedImageFileNameContainer, FileNameContainerType)
 elxSetObjectMacro (MovingImageFileNameContainer, FileNameContainerType)
 elxSetObjectMacro (FixedMaskFileNameContainer, FileNameContainerType)
 elxSetObjectMacro (MovingMaskFileNameContainer, FileNameContainerType)
 elxSetObjectMacro (InitialTransform, ObjectType)
 elxSetObjectMacro (FinalTransform, ObjectType)
virtual ITKBaseTypeGetAsITKBaseType (void)
virtual DBIndexType GetDBIndex (void)
virtual int GetDefaultOutputPrecision (void) const
virtual const
FlatDirectionCosinesType
GetOriginalFixedImageDirectionFlat (void) const
virtual bool GetUseDirectionCosines (void) const
virtual int Run (void)=0
virtual void SetDBIndex (DBIndexType _arg)
virtual void SetOriginalFixedImageDirectionFlat (const FlatDirectionCosinesType &arg)

Protected Member Functions

 ElastixBase ()
virtual ~ElastixBase ()

Protected Attributes

ComponentDatabasePointer m_ComponentDatabase
ConfigurationPointer m_Configuration
DBIndexType m_DBIndex
FlatDirectionCosinesType m_OriginalFixedImageDirection

Private Member Functions

 ElastixBase (const Self &)
FileNameContainerPointer GenerateFileNameContainer (const std::string &optionkey, int &errorcode, bool printerrors, bool printinfo) const
void operator= (const Self &)

Private Attributes

int m_DefaultOutputPrecision
ObjectPointer m_FinalTransform
DataObjectContainerPointer m_FixedImageContainer
FileNameContainerPointer m_FixedImageFileNameContainer
ObjectContainerPointer m_FixedImagePyramidContainer
DataObjectContainerPointer m_FixedMaskContainer
FileNameContainerPointer m_FixedMaskFileNameContainer
ObjectContainerPointer m_ImageSamplerContainer
ObjectPointer m_InitialTransform
ObjectContainerPointer m_InterpolatorContainer
xl::xoutrow_type m_IterationInfo
ObjectContainerPointer m_MetricContainer
DataObjectContainerPointer m_MovingImageContainer
FileNameContainerPointer m_MovingImageFileNameContainer
ObjectContainerPointer m_MovingImagePyramidContainer
DataObjectContainerPointer m_MovingMaskContainer
FileNameContainerPointer m_MovingMaskFileNameContainer
ObjectContainerPointer m_OptimizerContainer
ObjectContainerPointer m_RegistrationContainer
ObjectContainerPointer m_ResampleInterpolatorContainer
ObjectContainerPointer m_ResamplerContainer
ObjectContainerPointer m_TransformContainer
bool m_UseDirectionCosines

Detailed Description

This class creates an interface for elastix.

The ElastixBase class creates an interface for elastix. This is specified in ElastixTemplate, where all functions are defined. Functionality that does not depend on the pixel type and the dimension of the images to be registered, is defined in this class.

The parameters used by this class are:

Parameters:
RandomSeed: Sets a global seed for the random generator.
example: (RandomSeed 121212)
It must be a positive integer number. Default: 121212.
Parameters:
DefaultOutputPrecision: Set the default precision of floating values in the output. Most importantly, it affects the output precision of the parameters in the transform parameter file.
example: (DefaultOutputPrecision 6)
Default value: 6.

The command line arguments used by this class are:

Command line arguments:
-f: mandatory argument for elastix with the file name of the fixed image.
example: -f fixedImage.mhd
Command line arguments:
-m: mandatory argument for elastix with the file name of the moving image.
example: -m movingImage.mhd
Command line arguments:
-out: mandatory argument for both elastix and transformix with the name of the directory that is going to contain everything that elastix or tranformix returns as output.
example: -out outputdirectory
Command line arguments:
-p: mandatory argument for elastix with the name of the parameter file.
example: -p parameters.txt
Multiple parameter files are allowed. It means that multiple registrations are runned in sequence, with the output of some registration as input to the next.
Command line arguments:
-fMask: Optional argument for elastix with the file name of a mask for the fixed image. The mask image should contain of zeros and ones, zeros indicating pixels that are not used for the registration.
example: -fMask fixedmask.mhd
Command line arguments:
-mMask: Optional argument for elastix with the file name of a mask for the moving image. The mask image should contain of zeros and ones, zeros indicating pixels that are not used for the registration.
example: -mMask movingmask.mhd
Command line arguments:
-tp: mandatory argument for transformix with the name of the transform parameter file.
example: -tp TransformParameters.txt
In one such a transform parameter file a reference can be used to another transform parameter file, which is then used as an initial transform.
Command line arguments:
-priority: optional argument for both elastix and transformix to specify the priority setting of this process. Choose one from {belownormal, high}.
example: -priority high
This argument is only valid for running under Windows. For Linux, run elastix with "nice".
Command line arguments:
-threads: optional argument for both elastix and transformix to specify the maximum number of threads used by this process. Default: no maximum.
example: -threads 2
Command line arguments:
-in: optional argument for transformix with the file name of an input image.
example: -in inputImage.mhd
If this option is skipped, a deformation field of the transform will be generated.

Definition at line 141 of file elxElastixBase.h.


Member Typedef Documentation

Definition at line 168 of file elxElastixBase.h.

Other typedef's.

Definition at line 167 of file elxElastixBase.h.

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 151 of file elxElastixBase.h.

Typedefs used in this class.

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 150 of file elxElastixBase.h.

typedef DataObjectContainerType::Pointer elastix::ElastixBase::DataObjectContainerPointer

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 161 of file elxElastixBase.h.

typedef itk::VectorContainer< unsigned int, DataObjectPointer> elastix::ElastixBase::DataObjectContainerType

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 160 of file elxElastixBase.h.

typedef DataObjectType::Pointer elastix::ElastixBase::DataObjectPointer

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 155 of file elxElastixBase.h.

typedef itk::DataObject elastix::ElastixBase::DataObjectType

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 154 of file elxElastixBase.h.

Definition at line 169 of file elxElastixBase.h.

typedef FileNameContainerType::Pointer elastix::ElastixBase::FileNameContainerPointer

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 164 of file elxElastixBase.h.

typedef itk::VectorContainer< unsigned int, std::string > elastix::ElastixBase::FileNameContainerType

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 163 of file elxElastixBase.h.

Definition at line 170 of file elxElastixBase.h.

The itk class that ElastixTemplate is expected to inherit from Of course ElastixTemplate also inherits from this class (ElastixBase).

Definition at line 175 of file elxElastixBase.h.

typedef ObjectContainerType::Pointer elastix::ElastixBase::ObjectContainerPointer

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 158 of file elxElastixBase.h.

typedef itk::VectorContainer< unsigned int, ObjectPointer> elastix::ElastixBase::ObjectContainerType

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 157 of file elxElastixBase.h.

typedef ObjectType::Pointer elastix::ElastixBase::ObjectPointer

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 153 of file elxElastixBase.h.

typedef itk::Object elastix::ElastixBase::ObjectType

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 152 of file elxElastixBase.h.

Standard typedefs etc.

Reimplemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

Definition at line 146 of file elxElastixBase.h.

Definition at line 147 of file elxElastixBase.h.


Constructor & Destructor Documentation

virtual elastix::ElastixBase::~ElastixBase ( ) [inline, protected, virtual]

Definition at line 341 of file elxElastixBase.h.

elastix::ElastixBase::ElastixBase ( const Self ) [private]

Member Function Documentation

virtual void elastix::ElastixBase::AfterRegistrationBase ( void  ) [virtual]

Reimplemented from elastix::BaseComponent.

virtual int elastix::ElastixBase::ApplyTransform ( void  ) [pure virtual]

Empty ApplyTransform()-function to be overridden.

Implemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

virtual int elastix::ElastixBase::BeforeAllBase ( void  ) [virtual]

Function that is called at the very beginning of ElastixTemplate::Run(). It checks the command line input arguments.

Reimplemented from elastix::BaseComponent.

Function that is called at the very beginning of ElastixTemplate::ApplyTransform(). It checks the command line input arguments.

virtual void elastix::ElastixBase::BeforeRegistrationBase ( void  ) [virtual]

Functions called before and after registration. They install/uninstall the xout["iteration"] field.

Reimplemented from elastix::BaseComponent.

Define some convenience functions: GetNumberOfMetrics() for example.

elastix::ElastixBase::elxGetNumberOfMacro ( ResampleInterpolator  )
elastix::ElastixBase::elxGetNumberOfMacro ( MovingImageFileName  )

Set/Get the Configuration Object.

Functions to get/set the ComponentDatabase The component database contains pointers to functions that create components.

Get the component containers. The component containers store components, such as the metric, in the form of an itk::Object::Pointer.

elastix::ElastixBase::elxGetObjectMacro ( FixedImagePyramidContainer  ,
ObjectContainerType   
)
elastix::ElastixBase::elxGetObjectMacro ( MovingImagePyramidContainer  ,
ObjectContainerType   
)
elastix::ElastixBase::elxGetObjectMacro ( ResampleInterpolatorContainer  ,
ObjectContainerType   
)

Set/Get the fixed/moving image containers.

Set/Get the fixed/moving mask containers.

elastix::ElastixBase::elxGetObjectMacro ( FixedImageFileNameContainer  ,
FileNameContainerType   
)

Set/Get The Image FileName containers. Normally, these are filled in the BeforeAllBase function.

elastix::ElastixBase::elxGetObjectMacro ( MovingImageFileNameContainer  ,
FileNameContainerType   
)
elastix::ElastixBase::elxGetObjectMacro ( FixedMaskFileNameContainer  ,
FileNameContainerType   
)

Set/Get The Mask FileName containers. Normally, these are filled in the BeforeAllBase function.

elastix::ElastixBase::elxGetObjectMacro ( MovingMaskFileNameContainer  ,
FileNameContainerType   
)
elastix::ElastixBase::elxGetObjectMacro ( InitialTransform  ,
ObjectType   
)

Set the component containers. The component containers store components, such as the metric, in the form of an itk::Object::Pointer.

elastix::ElastixBase::elxSetObjectMacro ( FixedImagePyramidContainer  ,
ObjectContainerType   
)
elastix::ElastixBase::elxSetObjectMacro ( MovingImagePyramidContainer  ,
ObjectContainerType   
)
elastix::ElastixBase::elxSetObjectMacro ( ResampleInterpolatorContainer  ,
ObjectContainerType   
)
elastix::ElastixBase::elxSetObjectMacro ( FixedImageFileNameContainer  ,
FileNameContainerType   
)
elastix::ElastixBase::elxSetObjectMacro ( MovingImageFileNameContainer  ,
FileNameContainerType   
)
elastix::ElastixBase::elxSetObjectMacro ( FixedMaskFileNameContainer  ,
FileNameContainerType   
)
elastix::ElastixBase::elxSetObjectMacro ( MovingMaskFileNameContainer  ,
FileNameContainerType   
)
elastix::ElastixBase::elxSetObjectMacro ( InitialTransform  ,
ObjectType   
)

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).

Set/Get the final transform The type is ObjectType, but the pointer should actually point to an itk::Transform type (or inherited from that one). You can use this to set it as an initial transform in another ElastixBase instantiation.

FileNameContainerPointer elastix::ElastixBase::GenerateFileNameContainer ( const std::string &  optionkey,
int errorcode,
bool  printerrors,
bool  printinfo 
) const [private]

Read a series of command line options that satisfy the following syntax: {-f,-f0} <filename0> [-f1 <filename1> [ -f2 <filename2> ... ] ]

This function is used by BeforeAllBase, and is not meant be used at other locations. The errorcode remains the input value if no errors occur. It is set to errorcode | 1 if the option was not given.

virtual ITKBaseType* elastix::ElastixBase::GetAsITKBaseType ( void  ) [inline, virtual]

Cast to ITKBaseType.

Definition at line 178 of file elxElastixBase.h.

virtual DBIndexType elastix::ElastixBase::GetDBIndex ( void  ) [inline, virtual]

Definition at line 189 of file elxElastixBase.h.

virtual int elastix::ElastixBase::GetDefaultOutputPrecision ( void  ) const [inline, virtual]

Get the default precision of xout. (The value assumed when no DefaultOutputPrecision is given in the parameter file.

Definition at line 321 of file elxElastixBase.h.

virtual bool elastix::ElastixBase::GetUseDirectionCosines ( void  ) const [virtual]

Get whether direction cosines should be taken into account (true) or ignored (false). This depends on the UseDirectionCosines parameter.

void elastix::ElastixBase::operator= ( const Self ) [private]
virtual int elastix::ElastixBase::Run ( void  ) [pure virtual]

Empty Run()-function to be overridden.

Implemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.

virtual void elastix::ElastixBase::SetDBIndex ( DBIndexType  _arg) [virtual]

Set the database index of the instantiated elastix object.

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


Field Documentation

Definition at line 345 of file elxElastixBase.h.

Definition at line 341 of file elxElastixBase.h.

Definition at line 344 of file elxElastixBase.h.

Definition at line 436 of file elxElastixBase.h.

Definition at line 466 of file elxElastixBase.h.

The Image and Mask containers. These are stored as pointers to itk::DataObject.

Definition at line 453 of file elxElastixBase.h.

The image and mask FileNameContainers.

Definition at line 459 of file elxElastixBase.h.

The component containers. These containers contain SmartPointer's to itk::Object.

Definition at line 441 of file elxElastixBase.h.

Definition at line 455 of file elxElastixBase.h.

Definition at line 461 of file elxElastixBase.h.

Definition at line 444 of file elxElastixBase.h.

The initial and final transform.

Definition at line 465 of file elxElastixBase.h.

Definition at line 443 of file elxElastixBase.h.

Definition at line 434 of file elxElastixBase.h.

Definition at line 445 of file elxElastixBase.h.

Definition at line 454 of file elxElastixBase.h.

Definition at line 460 of file elxElastixBase.h.

Definition at line 442 of file elxElastixBase.h.

Definition at line 456 of file elxElastixBase.h.

Definition at line 462 of file elxElastixBase.h.

Definition at line 446 of file elxElastixBase.h.

Definition at line 347 of file elxElastixBase.h.

Definition at line 447 of file elxElastixBase.h.

Definition at line 449 of file elxElastixBase.h.

Definition at line 448 of file elxElastixBase.h.

Definition at line 450 of file elxElastixBase.h.

Use or ignore direction cosines.

Definition at line 469 of file elxElastixBase.h.



Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo