#include <elxElastixBase.h>
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:
(RandomSeed 121212)
The command line arguments used by this class are:
-f: mandatory argument for elastix with the file name of the fixed image.
example: -f fixedImage.mhd
-m: mandatory argument for elastix with the file name of the moving image.
example: -m movingImage.mhd
-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
-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.
-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
-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
-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.
-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".
-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
-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 140 of file elxElastixBase.h.
Data Structures | |
class | MultipleImageLoader |
Public Types | |
using | ComponentDatabasePointer = ComponentDatabase::Pointer |
using | CoordRepType = double |
using | DataObjectContainerPointer = DataObjectContainerType::Pointer |
using | DataObjectContainerType = itk::VectorContainer<unsigned int, DataObjectPointer> |
using | DataObjectPointer = itk::DataObject::Pointer |
using | DBIndexType = ComponentDatabase::IndexType |
using | FileNameContainerPointer = FileNameContainerType::Pointer |
using | FileNameContainerType = itk::VectorContainer<unsigned int, std::string> |
using | FlatDirectionCosinesType = std::vector<double> |
using | ObjectContainerPointer = ObjectContainerType::Pointer |
using | ObjectContainerType = itk::VectorContainer<unsigned int, ObjectPointer> |
using | ObjectPointer = itk::Object::Pointer |
using | ParameterMapType = itk::ParameterMapInterface::ParameterMapType |
using | ResultDeformationFieldType = itk::DataObject |
using | ResultImageType = itk::DataObject |
using | Self = ElastixBase |
using | Superclass = BaseComponent |
Protected Member Functions | |
ElastixBase () | |
~ElastixBase () override=default | |
Protected Member Functions inherited from elastix::BaseComponent | |
BaseComponent ()=default | |
virtual | ~BaseComponent ()=default |
Static Protected Member Functions | |
static DataObjectContainerPointer | GenerateDataObjectContainer (DataObjectPointer dataObject) |
Protected Attributes | |
std::string | m_CurrentTransformParameterFileName |
DBIndexType | m_DBIndex { 0 } |
unsigned int | m_IterationCounter {} |
std::ofstream | m_IterationInfoFile |
itk::TimeProbe | m_IterationTimer {} |
FlatDirectionCosinesType | m_OriginalFixedImageDirection |
itk::TimeProbe | m_ResolutionTimer {} |
itk::TimeProbe | m_Timer0 {} |
ParameterMapType | m_TransformParameterMap |
Additional Inherited Members | |
Static Public Member Functions inherited from elastix::BaseComponent | |
template<typename TBaseComponent > | |
static auto | AsITKBaseType (TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType()) |
static void | InitializeElastixExecutable () |
static bool | IsElastixLibrary () |
Other typedef's.
Definition at line 168 of file elxElastixBase.h.
Type for representation of the transform coordinates.
Definition at line 173 of file elxElastixBase.h.
using elastix::ElastixBase::DataObjectContainerPointer = DataObjectContainerType::Pointer |
Definition at line 157 of file elxElastixBase.h.
using elastix::ElastixBase::DataObjectContainerType = itk::VectorContainer<unsigned int, DataObjectPointer> |
Definition at line 156 of file elxElastixBase.h.
using elastix::ElastixBase::DataObjectPointer = itk::DataObject::Pointer |
Definition at line 153 of file elxElastixBase.h.
Definition at line 169 of file elxElastixBase.h.
using elastix::ElastixBase::FileNameContainerPointer = FileNameContainerType::Pointer |
Definition at line 159 of file elxElastixBase.h.
using elastix::ElastixBase::FileNameContainerType = itk::VectorContainer<unsigned int, std::string> |
Definition at line 158 of file elxElastixBase.h.
using elastix::ElastixBase::FlatDirectionCosinesType = std::vector<double> |
Definition at line 170 of file elxElastixBase.h.
using elastix::ElastixBase::ObjectContainerPointer = ObjectContainerType::Pointer |
Definition at line 155 of file elxElastixBase.h.
using elastix::ElastixBase::ObjectContainerType = itk::VectorContainer<unsigned int, ObjectPointer> |
Definition at line 154 of file elxElastixBase.h.
using elastix::ElastixBase::ObjectPointer = itk::Object::Pointer |
Typedefs used in this class.
Definition at line 152 of file elxElastixBase.h.
Typedef that is used in the elastix dll version.
Definition at line 176 of file elxElastixBase.h.
using elastix::ElastixBase::ResultDeformationFieldType = itk::DataObject |
Result deformation field
Definition at line 165 of file elxElastixBase.h.
using elastix::ElastixBase::ResultImageType = itk::DataObject |
Result image
Definition at line 162 of file elxElastixBase.h.
Standard typedefs etc.
Definition at line 148 of file elxElastixBase.h.
Definition at line 149 of file elxElastixBase.h.
|
protected |
|
overrideprotecteddefault |
|
inline |
Definition at line 381 of file elxElastixBase.h.
Empty ApplyTransform()-function to be overridden.
Implemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.
|
overridevirtual |
Function that is called at the very beginning of ElastixTemplate::Run(). It checks the command line input arguments.
Reimplemented from elastix::BaseComponent.
int elastix::ElastixBase::BeforeAllTransformixBase | ( | ) |
Function that is called at the very beginning of ElastixTemplate::ApplyTransform(). It checks the command line input arguments.
|
pure virtual |
Creates transformation parameters map.
Implemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.
elastix::ElastixBase::elxGetNumberOfMacro | ( | FixedImage | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | FixedImageFileName | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | FixedImagePyramid | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | FixedMask | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | FixedMaskFileName | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | ImageSampler | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | Interpolator | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | Metric | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | MovingImage | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | MovingImageFileName | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | MovingImagePyramid | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | MovingMask | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | MovingMaskFileName | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | Optimizer | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | Registration | ) |
Define some convenience functions: GetNumberOfMetrics() for example.
elastix::ElastixBase::elxGetNumberOfMacro | ( | ResampleInterpolator | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | Resampler | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | ResultDeformationField | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | ResultImage | ) |
elastix::ElastixBase::elxGetNumberOfMacro | ( | Transform | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | Configuration | , |
Configuration | ) |
Set/Get the Configuration Object.
elastix::ElastixBase::elxGetObjectMacro | ( | FinalTransform | , |
itk::Object | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | FixedImageContainer | , |
DataObjectContainerType | ) |
Set/Get the fixed/moving image containers.
elastix::ElastixBase::elxGetObjectMacro | ( | FixedImageFileNameContainer | , |
FileNameContainerType | ) |
Set/Get The Image FileName containers. Normally, these are filled in the BeforeAllBase function.
elastix::ElastixBase::elxGetObjectMacro | ( | FixedImagePyramidContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | FixedMaskContainer | , |
DataObjectContainerType | ) |
Set/Get the fixed/moving mask containers.
elastix::ElastixBase::elxGetObjectMacro | ( | FixedMaskFileNameContainer | , |
FileNameContainerType | ) |
Set/Get The Mask FileName containers. Normally, these are filled in the BeforeAllBase function.
elastix::ElastixBase::elxGetObjectMacro | ( | ImageSamplerContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | InitialTransform | , |
itk::Object | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | InterpolatorContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | MetricContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | MovingImageContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | MovingImageFileNameContainer | , |
FileNameContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | MovingImagePyramidContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | MovingMaskContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | MovingMaskFileNameContainer | , |
FileNameContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | OptimizerContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | RegistrationContainer | , |
ObjectContainerType | ) |
Get the component containers. The component containers store components, such as the metric, in the form of an itk::Object::Pointer.
elastix::ElastixBase::elxGetObjectMacro | ( | ResampleInterpolatorContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | ResamplerContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxGetObjectMacro | ( | ResultDeformationFieldContainer | , |
DataObjectContainerType | ) |
Set/Get the result image container.
elastix::ElastixBase::elxGetObjectMacro | ( | ResultImageContainer | , |
DataObjectContainerType | ) |
Set/Get the result image container.
elastix::ElastixBase::elxGetObjectMacro | ( | TransformContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | Configuration | , |
Configuration | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | FinalTransform | , |
itk::Object | ) |
Set/Get the final transform The type is itk::Object, 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.
elastix::ElastixBase::elxSetObjectMacro | ( | FixedImageContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | FixedImageFileNameContainer | , |
FileNameContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | FixedImagePyramidContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | FixedMaskContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | FixedMaskFileNameContainer | , |
FileNameContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | ImageSamplerContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | InitialTransform | , |
itk::Object | ) |
Set/Get the initial transform The type is itk::Object, but the pointer should actually point to an itk::Transform type (or inherited from that one).
elastix::ElastixBase::elxSetObjectMacro | ( | InterpolatorContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | MetricContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | MovingImageContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | MovingImageFileNameContainer | , |
FileNameContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | MovingImagePyramidContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | MovingMaskContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | MovingMaskFileNameContainer | , |
FileNameContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | OptimizerContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | RegistrationContainer | , |
ObjectContainerType | ) |
Set the component containers. The component containers store components, such as the metric, in the form of an itk::Object::Pointer.
elastix::ElastixBase::elxSetObjectMacro | ( | ResampleInterpolatorContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | ResamplerContainer | , |
ObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | ResultDeformationFieldContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | ResultImageContainer | , |
DataObjectContainerType | ) |
elastix::ElastixBase::elxSetObjectMacro | ( | TransformContainer | , |
ObjectContainerType | ) |
|
staticprotected |
Generates a container that contains the specified data object
|
inline |
Definition at line 187 of file elxElastixBase.h.
|
inline |
Definition at line 369 of file elxElastixBase.h.
|
inline |
Definition at line 375 of file elxElastixBase.h.
vcl_size_t elastix::ElastixBase::GetNumberOfTransformConfigurations | ( | ) | const |
Returns the number of configurations in the vector of transformation configurations.
const FlatDirectionCosinesType & elastix::ElastixBase::GetOriginalFixedImageDirectionFlat | ( | ) | const |
Configuration::ConstPointer elastix::ElastixBase::GetPreviousTransformConfiguration | ( | const Configuration & | configuration | ) | const |
Returns the transformation configuration just before the specified one, or null. Returns null if the specified configuration does not have a previous one in the vector of transformation configurations.
ResultDeformationFieldType * elastix::ElastixBase::GetResultDeformationField | ( | unsigned int | idx = 0 | ) | const |
ResultImageType * elastix::ElastixBase::GetResultImage | ( | const unsigned int | idx = 0 | ) | const |
Configuration::ConstPointer elastix::ElastixBase::GetTransformConfiguration | ( | const vcl_size_t | index | ) | const |
Return configuration from vector of transformation configurations. Library only.
ParameterMapType elastix::ElastixBase::GetTransformParameterMap | ( | ) | const |
Gets transformation parameters map.
bool elastix::ElastixBase::GetUseDirectionCosines | ( | ) | const |
Get whether direction cosines should be taken into account (true) or ignored (false). This depends on the UseDirectionCosines parameter.
elastix::ElastixBase::ITK_DISALLOW_COPY_AND_MOVE | ( | ElastixBase | ) |
|
pure virtual |
Empty Run()-function to be overridden.
Implemented in elastix::ElastixTemplate< TFixedImage, TMovingImage >.
void elastix::ElastixBase::SetDBIndex | ( | DBIndexType | _arg | ) |
Set the database index of the instantiated elastix object.
void elastix::ElastixBase::SetOriginalFixedImageDirectionFlat | ( | const FlatDirectionCosinesType & | arg | ) |
Set/Get the original fixed image direction as a flat array (d11 d21 d31 d21 d22 etc )
void elastix::ElastixBase::SetResultDeformationField | ( | DataObjectPointer | result_deformationfield | ) |
void elastix::ElastixBase::SetResultImage | ( | DataObjectPointer | result_image | ) |
void elastix::ElastixBase::SetTransformConfigurations | ( | const std::vector< Configuration::ConstPointer > & | configurations | ) |
Set configuration vector. Library only.
|
private |
Definition at line 486 of file elxElastixBase.h.
|
protected |
Store the CurrentTransformParameterFileName.
Definition at line 400 of file elxElastixBase.h.
|
protected |
Definition at line 390 of file elxElastixBase.h.
|
private |
Definition at line 527 of file elxElastixBase.h.
|
private |
The Image and Mask containers. These are stored as pointers to itk::DataObject.
Definition at line 508 of file elxElastixBase.h.
|
private |
The image and mask FileNameContainers.
Definition at line 520 of file elxElastixBase.h.
|
private |
The component containers. These containers contain SmartPointer's to itk::Object.
Definition at line 496 of file elxElastixBase.h.
|
private |
Definition at line 510 of file elxElastixBase.h.
|
private |
Definition at line 522 of file elxElastixBase.h.
|
private |
Definition at line 499 of file elxElastixBase.h.
|
private |
The initial and final transform.
Definition at line 526 of file elxElastixBase.h.
|
private |
Definition at line 498 of file elxElastixBase.h.
|
protected |
Count the number of iterations.
Definition at line 403 of file elxElastixBase.h.
|
private |
Definition at line 491 of file elxElastixBase.h.
|
protected |
Definition at line 408 of file elxElastixBase.h.
|
protected |
Definition at line 396 of file elxElastixBase.h.
|
private |
Definition at line 500 of file elxElastixBase.h.
|
private |
Definition at line 509 of file elxElastixBase.h.
|
private |
Definition at line 521 of file elxElastixBase.h.
|
private |
Definition at line 497 of file elxElastixBase.h.
|
private |
Definition at line 511 of file elxElastixBase.h.
|
private |
Definition at line 523 of file elxElastixBase.h.
|
private |
Definition at line 501 of file elxElastixBase.h.
|
protected |
Definition at line 392 of file elxElastixBase.h.
|
private |
Definition at line 502 of file elxElastixBase.h.
|
private |
Definition at line 504 of file elxElastixBase.h.
|
private |
Definition at line 503 of file elxElastixBase.h.
|
protected |
Definition at line 397 of file elxElastixBase.h.
|
private |
The result deformation field container. These are stored as pointers to itk::DataObject.
Definition at line 517 of file elxElastixBase.h.
|
private |
The result image container. These are stored as pointers to itk::DataObject.
Definition at line 514 of file elxElastixBase.h.
|
protected |
Timers.
Definition at line 395 of file elxElastixBase.h.
|
private |
A vector of configuration objects, needed when transformix is used as library.
Definition at line 489 of file elxElastixBase.h.
|
private |
Definition at line 505 of file elxElastixBase.h.
|
protected |
Stores transformation parameters map.
Definition at line 406 of file elxElastixBase.h.
|
private |
Use or ignore direction cosines. From Elastix 4.3 to 4.7: Ignore direction cosines by default, for backward compatability. From Elastix 4.8: set it to true by default.
Definition at line 532 of file elxElastixBase.h.
Generated on 2024-07-17 for elastix by 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) |