Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::ImageMappingHelper Namespace Reference

Typedefs

typedef ::map::core::RegistrationBase RegistrationType
 
typedef ::mitk::MAPRegistrationWrapper MITKRegistrationType
 
typedef ::mitk::BaseGeometry ResultImageGeometryType
 
typedef ::mitk::Image InputImageType
 
typedef ::mitk::Image ResultImageType
 

Functions

MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer map (const InputImageType *input, const RegistrationType *registration, bool throwOnOutOfInputAreaError=false, const double &paddingValue=0, const ResultImageGeometryType *resultGeometry=nullptr, bool throwOnMappingError=true, const double &errorValue=0, mitk::ImageMappingInterpolator::Type interpolatorType=mitk::ImageMappingInterpolator::Linear)
 
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer map (const InputImageType *input, const MITKRegistrationType *registration, bool throwOnOutOfInputAreaError=false, const double &paddingValue=0, const ResultImageGeometryType *resultGeometry=nullptr, bool throwOnMappingError=true, const double &errorValue=0, mitk::ImageMappingInterpolator::Type interpolatorType=mitk::ImageMappingInterpolator::Linear)
 
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageGeometryType::Pointer GenerateSuperSampledGeometry (const ResultImageGeometryType *inputGeometry, double xScaling, double yScaling, double zScaling)
 
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer refineGeometry (const InputImageType *input, const RegistrationType *registration, bool throwOnError=true)
 
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer refineGeometry (const InputImageType *input, const MITKRegistrationType *registration, bool throwOnError=true)
 
MITKMATCHPOINTREGISTRATION_EXPORT bool canRefineGeometry (const RegistrationType *registration)
 
MITKMATCHPOINTREGISTRATION_EXPORT bool canRefineGeometry (const MITKRegistrationType *registration)
 

Typedef Documentation

◆ InputImageType

◆ MITKRegistrationType

◆ RegistrationType

typedef ::map::core::RegistrationBase mitk::ImageMappingHelper::RegistrationType

Definition at line 43 of file mitkImageMappingHelper.h.

◆ ResultImageGeometryType

◆ ResultImageType

Function Documentation

◆ canRefineGeometry() [1/2]

MITKMATCHPOINTREGISTRATION_EXPORT bool mitk::ImageMappingHelper::canRefineGeometry ( const MITKRegistrationType registration)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ canRefineGeometry() [2/2]

MITKMATCHPOINTREGISTRATION_EXPORT bool mitk::ImageMappingHelper::canRefineGeometry ( const RegistrationType registration)

Method allows to pre checks if a registration could be used with refineGeometry. If this method returns true, the registration can be used to refine the geometry of images.

◆ GenerateSuperSampledGeometry()

MITKMATCHPOINTREGISTRATION_EXPORT ResultImageGeometryType::Pointer mitk::ImageMappingHelper::GenerateSuperSampledGeometry ( const ResultImageGeometryType inputGeometry,
double  xScaling,
double  yScaling,
double  zScaling 
)

◆ map() [1/2]

MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer mitk::ImageMappingHelper::map ( const InputImageType input,
const MITKRegistrationType registration,
bool  throwOnOutOfInputAreaError = false,
const double &  paddingValue = 0,
const ResultImageGeometryType resultGeometry = nullptr,
bool  throwOnMappingError = true,
const double &  errorValue = 0,
mitk::ImageMappingInterpolator::Type  interpolatorType = mitk::ImageMappingInterpolator::Linear 
)

Helper that maps a given input image. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters
inputImage that should be mapped.
registrationPointer to the registration instance that should be used for mapping
throwOnOutOfInputAreaErrorIndicates if mapping should fail with an exception (true), if the input image does not cover the whole requested region to be mapped into the result image.
paddingValueIndicates the value that should be used if an out of input error occurs (and throwOnOutOfInputAreaError is false).
resultGeometryPointer to the Geometry object that specifies the grid of the result image. If not defined the geometry of the input image will be used.
throwOnMappingErrorIndicates if mapping should fail with an exception (true), if the registration does not cover/support the whole requested region for mapping into the result image.
errorValueIndicates the value that should be used if an mapping error occurs (and throwOnMappingError is false).
interpolatorTypeIndicates the type of interpolation strategy that should be used.
Precondition
input must be valid
registration must be valid
Dimensionality of the registration must match with the input imageinput must be valid
Remarks
Depending in the settings of throwOnOutOfInputAreaError and throwOnMappingError it may also throw due to inconsistencies in the mapping process. See parameter description.
Returns
Pointer to the resulting mapped image.h

◆ map() [2/2]

MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer mitk::ImageMappingHelper::map ( const InputImageType input,
const RegistrationType registration,
bool  throwOnOutOfInputAreaError = false,
const double &  paddingValue = 0,
const ResultImageGeometryType resultGeometry = nullptr,
bool  throwOnMappingError = true,
const double &  errorValue = 0,
mitk::ImageMappingInterpolator::Type  interpolatorType = mitk::ImageMappingInterpolator::Linear 
)

Helper that maps a given input image

Parameters
inputImage that should be mapped.
registrationPointer to the registration instance that should be used for mapping
throwOnOutOfInputAreaErrorIndicates if mapping should fail with an exception (true), if the input image does not cover the whole requested region to be mapped into the result image.
paddingValueIndicates the value that should be used if an out of input error occurs (and throwOnOutOfInputAreaError is false).
resultGeometryPointer to the Geometry object that specifies the grid of the result image. If not defined the geometry of the input image will be used.
throwOnMappingErrorIndicates if mapping should fail with an exception (true), if the registration does not cover/support the whole requested region for mapping into the result image.
errorValueIndicates the value that should be used if an mapping error occurs (and throwOnMappingError is false).
interpolatorTypeIndicates the type of interpolation strategy that should be used.
Precondition
input must be valid
registration must be valid
Dimensionality of the registration must match with the input imageinput must be valid
Remarks
Depending in the settings of throwOnOutOfInputAreaError and throwOnMappingError it may also throw due to inconsistencies in the mapping process. See parameter description.
Returns
Pointer to the resulting mapped image.h

◆ refineGeometry() [1/2]

MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer mitk::ImageMappingHelper::refineGeometry ( const InputImageType input,
const MITKRegistrationType registration,
bool  throwOnError = true 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ refineGeometry() [2/2]

MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer mitk::ImageMappingHelper::refineGeometry ( const InputImageType input,
const RegistrationType registration,
bool  throwOnError = true 
)

Method clones the input image and applies the registration by applying it to the Geometry3D of the image. Thus this method only produces a result if the passed registration has an direct mapping kernel that can be converted into an affine matrix transformation.

Precondition
input must point to a valid instance
registration must point to a valid instance
registration must be decomposable into rotation matrix and offset or throwOnError must be false.
Returns
Pointer to the result image with refined geometry. May be null if the result cannot be generated (e.g. the registration cannot be transformed in a affine matrix transformation)