Medical Imaging Interaction Toolkit  2016.11.0
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=NULL, 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=NULL, bool throwOnMappingError=true, const double &errorValue=0, mitk::ImageMappingInterpolator::Type interpolatorType=mitk::ImageMappingInterpolator::Linear)
 
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

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

Definition at line 47 of file mitkImageMappingHelper.h.

Function Documentation

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.

Definition at line 362 of file mitkImageMappingHelper.cpp.

References mitk::MITKRegistrationHelper::getAffineMatrix(), and mitkThrow.

Referenced by canRefineGeometry().

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.

Definition at line 379 of file mitkImageMappingHelper.cpp.

References canRefineGeometry(), mitk::MAPRegistrationWrapper::GetRegistration(), and mitkThrow.

mitk::ImageMappingHelper::ResultImageType::Pointer mitk::ImageMappingHelper::map ( const InputImageType input,
const RegistrationType registration,
bool  throwOnOutOfInputAreaError = false,
const double &  paddingValue = 0,
const ResultImageGeometryType resultGeometry = NULL,
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

Definition at line 226 of file mitkImageMappingHelper.cpp.

References AccessByItk_n, mitk::BaseGeometry::Clone(), doMITKMap(), mitk::Image::GetPixelType(), mitk::BaseData::GetTimeGeometry(), mitk::BaseData::GetTimeSteps(), mitkThrow, mitk::ImageTimeSelector::New(), and mitk::Image::New().

Referenced by mitk::TubeGraphVtkMapper3D::ClipPolyData(), mitk::BValueMapProperty::CreateBValueMap(), QmitkDataManagerView::CreateQtPartControl(), mitk::TimeFramesRegistrationHelper::DoFrameMapping(), mitk::TubeGraphVtkMapper3D::GenerateDataForRenderer(), mitk::RegEvaluationMapper2D::GenerateDataForRenderer(), QmitkNDIConfigurationWidget::GetToolAndTypes(), QmitkPythonSnippets::LoadStringMap(), main(), mitk::PointSetMappingHelper::map(), map(), ReadMitkProjectImageAndMask(), QmitkMappingJob::run(), mitk::BValueMapProperty::SetBValueMap(), itk::DiffusionMultiShellQballReconstructionImageFilter< TReferenceImagePixelType, TGradientImagePixelType, TOdfPixelType, NOrderL, NrOdfDirections >::SetBValueMap(), and mitk::CoreObjectFactory::~CoreObjectFactory().

mitk::ImageMappingHelper::ResultImageType::Pointer mitk::ImageMappingHelper::map ( const InputImageType input,
const MITKRegistrationType registration,
bool  throwOnOutOfInputAreaError = false,
const double &  paddingValue = 0,
const ResultImageGeometryType resultGeometry = NULL,
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

Definition at line 278 of file mitkImageMappingHelper.cpp.

References mitk::MAPRegistrationWrapper::GetRegistration(), map(), and mitkThrow.

mitk::ImageMappingHelper::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)

Definition at line 302 of file mitkImageMappingHelper.cpp.

References mitk::Image::Clone(), mitk::MITKRegistrationHelper::getAffineMatrix(), and mitkThrow.

Referenced by refineGeometry(), and QmitkMappingJob::run().

mitk::ImageMappingHelper::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.

Definition at line 340 of file mitkImageMappingHelper.cpp.

References mitk::MAPRegistrationWrapper::GetRegistration(), mitkThrow, and refineGeometry().