Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkMappingJob Class Reference

QRunnable job that maps (transforms) data using a MatchPoint registration in a background thread. More...

#include <QmitkMappingJob.h>

Inheritance diagram for QmitkMappingJob:
Collaboration diagram for QmitkMappingJob:

Signals

void Error (QString err)
 Emitted when an error occurs during mapping. More...
 
void MapResultIsAvailable (mitk::BaseData::Pointer spMappedData, const QmitkMappingJob *job)
 Emitted when the mapped result data is available. More...
 
void AlgorithmInfo (QString info)
 Emitted for general MatchPoint algorithm event messages during mapping. More...
 

Public Member Functions

 QmitkMappingJob ()
 Default constructor. Initializes with default mapping settings. More...
 
 ~QmitkMappingJob () override
 Destructor. More...
 
void run () override
 Executes the mapping or geometry refinement operation. More...
 
const map::core::RegistrationBase * GetRegistration () const
 Returns the MatchPoint registration extracted from the registration data node. More...
 
- Public Member Functions inherited from QmitkMappingJobSettings
 QmitkMappingJobSettings ()
 Constructs default mapping job settings. More...
 

Public Attributes

mitk::DataNode::Pointer m_spRegNode
 Data node containing the mitk::MAPRegistrationWrapper to use for mapping. More...
 
mitk::BaseData::ConstPointer m_spInputData
 The input data to be mapped (image, point set, or multi-label segmentation). More...
 
mitk::NodeUIDType m_InputDataUID
 UID of the input data node for provenance tracking. More...
 
mitk::BaseGeometry::Pointer m_spRefGeometry
 Optional reference geometry for image mapping. If null, the registration determines the output geometry. More...
 
- Public Attributes inherited from QmitkMappingJobSettings
std::string m_MappedName
 Display name for the mapped result. More...
 
bool m_doGeometryRefinement
 If true, the mapper refines the image geometry instead of performing a full pixel-wise mapping. More...
 
bool m_allowUndefPixels
 If true, undefined pixels (outside the field of view) are allowed and filled with m_paddingValue. If false, the mapping will fail when undefined pixels are encountered. More...
 
double m_paddingValue
 Value assigned to undefined pixels. Only relevant if m_allowUndefPixels is true. More...
 
bool m_allowUnregPixels
 If true, pixels not covered by the registration are allowed and filled with m_errorValue. If false, the mapping will fail when unregistered pixels are encountered. More...
 
double m_errorValue
 Value assigned to unregistered pixels. Only relevant if m_allowUnregPixels is true. More...
 
mitk::ImageMappingInterpolator::Type m_InterpolatorType
 Interpolation method used for image mapping. Only relevant for images when m_doGeometryRefinement is false. More...
 
std::string m_InterpolatorLabel
 Human-readable display name of the selected interpolation method. More...
 

Protected Member Functions

const mitk::Image * GetInputDataAsImage () const
 
const mitk::PointSet * GetInputDataAsPointSet () const
 
void OnMapAlgorithmEvent (::itk::Object *, const itk::EventObject &event)
 

Protected Attributes

mitk::BaseData::Pointer m_spMappedData
 
::itk::MemberCommand< QmitkMappingJob >::Pointer m_spCommand
 
unsigned long m_ObserverID
 

Detailed Description

QRunnable job that maps (transforms) data using a MatchPoint registration in a background thread.

This job applies a registration stored in a mitk::MAPRegistrationWrapper (wrapped in a DataNode) to input data, which can be a mitk::Image, mitk::PointSet, or mitk::MultiLabelSegmentation. The mapping behavior is controlled by the inherited QmitkMappingJobSettings.

When m_doGeometryRefinement is true, the job performs geometry refinement instead of full pixel-wise mapping (only applicable to images).

The job emits MapResultIsAvailable with the transformed data upon success, or Error with a description string upon failure.

See also
QmitkMappingJobSettings, QmitkRegistrationJob, QmitkFramesRegistrationJob

Definition at line 100 of file QmitkMappingJob.h.

Constructor & Destructor Documentation

◆ QmitkMappingJob()

QmitkMappingJob::QmitkMappingJob ( )

Default constructor. Initializes with default mapping settings.

◆ ~QmitkMappingJob()

QmitkMappingJob::~QmitkMappingJob ( )
override

Destructor.

Member Function Documentation

◆ AlgorithmInfo

void QmitkMappingJob::AlgorithmInfo ( QString  info)
signal

Emitted for general MatchPoint algorithm event messages during mapping.

Parameters
[in]infoInformation message string.

◆ Error

void QmitkMappingJob::Error ( QString  err)
signal

Emitted when an error occurs during mapping.

Parameters
[in]errDescription of the error.

◆ GetInputDataAsImage()

const mitk::Image* QmitkMappingJob::GetInputDataAsImage ( ) const
protected

◆ GetInputDataAsPointSet()

const mitk::PointSet* QmitkMappingJob::GetInputDataAsPointSet ( ) const
protected

◆ GetRegistration()

const map::core::RegistrationBase* QmitkMappingJob::GetRegistration ( ) const

Returns the MatchPoint registration extracted from the registration data node.

Returns
Const pointer to the underlying MatchPoint registration.
Precondition
m_spRegNode must contain a valid mitk::MAPRegistrationWrapper.

◆ MapResultIsAvailable

void QmitkMappingJob::MapResultIsAvailable ( mitk::BaseData::Pointer  spMappedData,
const QmitkMappingJob *  job 
)
signal

Emitted when the mapped result data is available.

Parameters
[in]spMappedDataThe transformed/mapped data.
[in]jobPointer to this job instance for context.

◆ OnMapAlgorithmEvent()

void QmitkMappingJob::OnMapAlgorithmEvent ( ::itk::Object *  ,
const itk::EventObject &  event 
)
protected

◆ run()

void QmitkMappingJob::run ( )
override

Executes the mapping or geometry refinement operation.

Depending on m_doGeometryRefinement, either refines the image geometry or maps the input data (image, point set, or multi-label segmentation) using the stored registration. Emits MapResultIsAvailable on success or Error on failure.

Member Data Documentation

◆ m_InputDataUID

mitk::NodeUIDType QmitkMappingJob::m_InputDataUID

UID of the input data node for provenance tracking.

Definition at line 152 of file QmitkMappingJob.h.

◆ m_ObserverID

unsigned long QmitkMappingJob::m_ObserverID
protected

Definition at line 169 of file QmitkMappingJob.h.

◆ m_spCommand

::itk::MemberCommand<QmitkMappingJob>::Pointer QmitkMappingJob::m_spCommand
protected

Definition at line 168 of file QmitkMappingJob.h.

◆ m_spInputData

mitk::BaseData::ConstPointer QmitkMappingJob::m_spInputData

The input data to be mapped (image, point set, or multi-label segmentation).

Definition at line 149 of file QmitkMappingJob.h.

◆ m_spMappedData

mitk::BaseData::Pointer QmitkMappingJob::m_spMappedData
protected

Definition at line 166 of file QmitkMappingJob.h.

◆ m_spRefGeometry

mitk::BaseGeometry::Pointer QmitkMappingJob::m_spRefGeometry

Optional reference geometry for image mapping. If null, the registration determines the output geometry.

Definition at line 155 of file QmitkMappingJob.h.

◆ m_spRegNode

mitk::DataNode::Pointer QmitkMappingJob::m_spRegNode

Data node containing the mitk::MAPRegistrationWrapper to use for mapping.

Definition at line 146 of file QmitkMappingJob.h.


The documentation for this class was generated from the following file: