Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkFramesRegistrationJob Class Reference

QRunnable job that performs frame-by-frame registration of a 4D image in a background thread. More...

#include <QmitkFramesRegistrationJob.h>

Inheritance diagram for QmitkFramesRegistrationJob:
Collaboration diagram for QmitkFramesRegistrationJob:

Signals

void Finished ()
 Emitted when the job has completed (regardless of success or failure). More...
 
void Error (QString err)
 Emitted when an error occurs during registration. More...
 
void ResultIsAvailable (mitk::Image::Pointer spResult, const QmitkFramesRegistrationJob *pJob)
 Emitted when the registered result image is available. More...
 
void AlgorithmIterated (QString info, bool hasIterationCount, unsigned long currentIteration)
 Emitted when the algorithm completes an iteration. More...
 
void LevelChanged (QString info, bool hasLevelCount, unsigned long currentLevel)
 Emitted when the algorithm changes its multi-resolution level. More...
 
void AlgorithmStatusChanged (QString info)
 Emitted when the algorithm status changes (e.g., initializing, starting, stopping). More...
 
void AlgorithmInfo (QString info)
 Emitted for general algorithm information messages. More...
 
void FrameProcessed (double progress)
 Emitted during frame processing with overall progress. More...
 
void FrameRegistered (double progress)
 Emitted when a single frame has been registered. More...
 
void FrameMapped (double progress)
 Emitted when a single frame has been mapped. More...
 

Public Member Functions

 QmitkFramesRegistrationJob (map::algorithm::RegistrationAlgorithmBase *pAlgorithm)
 Constructs the frames registration job with the given algorithm. More...
 
 ~QmitkFramesRegistrationJob () override
 Destructor. Removes the algorithm event observer. More...
 
void run () override
 Executes the frame-by-frame registration and mapping. More...
 
const map::algorithm::RegistrationAlgorithmBase * GetLoadedAlgorithm () const
 Returns the registration algorithm used by this job. More...
 
- Public Member Functions inherited from QmitkMappingJobSettings
 QmitkMappingJobSettings ()
 Constructs default mapping job settings. More...
 

Public Attributes

mitk::BaseData::ConstPointer m_spTargetData
 The 4D target image data to be registered frame-by-frame. More...
 
mitk::Image::ConstPointer m_spTargetMask
 Optional mask image applied to the target during registration. More...
 
mitk::TimeFramesRegistrationHelper::IgnoreListType m_IgnoreList
 List of time frame indices to exclude from registration. More...
 
mitk::NodeUIDType m_TargetDataUID
 UID of the target data node for provenance tracking. More...
 
mitk::NodeUIDType m_TargetMaskDataUID
 UID of the target mask data node for provenance tracking. 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...
 

Detailed Description

QRunnable job that performs frame-by-frame registration of a 4D image in a background thread.

This job registers individual time frames of a 4D image using a MatchPoint registration algorithm and maps the registered frames back into a single result image. It is typically used by GUI plugins to keep the UI responsive while the potentially long-running registration and mapping operations proceed in a QThreadPool.

The job inherits mapping settings from QmitkMappingJobSettings (interpolation, padding, error handling) and observes algorithm events to relay progress and status information via Qt signals.

See also
QmitkRegistrationJob, QmitkMappingJob, QmitkMappingJobSettings

Definition at line 56 of file QmitkFramesRegistrationJob.h.

Constructor & Destructor Documentation

◆ QmitkFramesRegistrationJob()

QmitkFramesRegistrationJob::QmitkFramesRegistrationJob ( map::algorithm::RegistrationAlgorithmBase *  pAlgorithm)

Constructs the frames registration job with the given algorithm.

Registers an ITK observer on the algorithm to receive algorithm events.

Parameters
[in]pAlgorithmPointer to the MatchPoint registration algorithm to use. The job takes shared ownership via a smart pointer.
Precondition
pAlgorithm must not be nullptr.

◆ ~QmitkFramesRegistrationJob()

QmitkFramesRegistrationJob::~QmitkFramesRegistrationJob ( )
override

Destructor. Removes the algorithm event observer.

Member Function Documentation

◆ AlgorithmInfo

void QmitkFramesRegistrationJob::AlgorithmInfo ( QString  info)
signal

Emitted for general algorithm information messages.

Parameters
[in]infoInformation message string.

◆ AlgorithmIterated

void QmitkFramesRegistrationJob::AlgorithmIterated ( QString  info,
bool  hasIterationCount,
unsigned long  currentIteration 
)
signal

Emitted when the algorithm completes an iteration.

Parameters
[in]infoDescriptive text about the iteration.
[in]hasIterationCountTrue if the algorithm provides an iteration count.
[in]currentIterationThe current iteration number (valid only if hasIterationCount is true).

◆ AlgorithmStatusChanged

void QmitkFramesRegistrationJob::AlgorithmStatusChanged ( QString  info)
signal

Emitted when the algorithm status changes (e.g., initializing, starting, stopping).

Parameters
[in]infoStatus description string.

◆ Error

void QmitkFramesRegistrationJob::Error ( QString  err)
signal

Emitted when an error occurs during registration.

Parameters
[in]errDescription of the error.

◆ Finished

void QmitkFramesRegistrationJob::Finished ( )
signal

Emitted when the job has completed (regardless of success or failure).

◆ FrameMapped

void QmitkFramesRegistrationJob::FrameMapped ( double  progress)
signal

Emitted when a single frame has been mapped.

Parameters
[in]progressProgress value in the range [0, 1].

◆ FrameProcessed

void QmitkFramesRegistrationJob::FrameProcessed ( double  progress)
signal

Emitted during frame processing with overall progress.

Parameters
[in]progressProgress value in the range [0, 1].

◆ FrameRegistered

void QmitkFramesRegistrationJob::FrameRegistered ( double  progress)
signal

Emitted when a single frame has been registered.

Parameters
[in]progressProgress value in the range [0, 1].

◆ GetLoadedAlgorithm()

const map::algorithm::RegistrationAlgorithmBase* QmitkFramesRegistrationJob::GetLoadedAlgorithm ( ) const

Returns the registration algorithm used by this job.

Returns
Const pointer to the loaded MatchPoint registration algorithm.

◆ LevelChanged

void QmitkFramesRegistrationJob::LevelChanged ( QString  info,
bool  hasLevelCount,
unsigned long  currentLevel 
)
signal

Emitted when the algorithm changes its multi-resolution level.

Parameters
[in]infoDescriptive text about the level change.
[in]hasLevelCountTrue if the algorithm provides a level count.
[in]currentLevelThe current level number (valid only if hasLevelCount is true).

◆ ResultIsAvailable

void QmitkFramesRegistrationJob::ResultIsAvailable ( mitk::Image::Pointer  spResult,
const QmitkFramesRegistrationJob *  pJob 
)
signal

Emitted when the registered result image is available.

Parameters
[in]spResultThe resulting registered 4D image.
[in]pJobPointer to this job instance for context.

◆ run()

void QmitkFramesRegistrationJob::run ( )
override

Executes the frame-by-frame registration and mapping.

Uses mitk::TimeFramesRegistrationHelper to iterate over all time frames (except those in the ignore list), register each frame, and map it according to the configured mapping settings. Emits ResultIsAvailable on success, or Error on failure. Always emits Finished when done.

Member Data Documentation

◆ m_IgnoreList

mitk::TimeFramesRegistrationHelper::IgnoreListType QmitkFramesRegistrationJob::m_IgnoreList

List of time frame indices to exclude from registration.

Definition at line 162 of file QmitkFramesRegistrationJob.h.

◆ m_spTargetData

mitk::BaseData::ConstPointer QmitkFramesRegistrationJob::m_spTargetData

The 4D target image data to be registered frame-by-frame.

Definition at line 156 of file QmitkFramesRegistrationJob.h.

◆ m_spTargetMask

mitk::Image::ConstPointer QmitkFramesRegistrationJob::m_spTargetMask

Optional mask image applied to the target during registration.

Definition at line 159 of file QmitkFramesRegistrationJob.h.

◆ m_TargetDataUID

mitk::NodeUIDType QmitkFramesRegistrationJob::m_TargetDataUID

UID of the target data node for provenance tracking.

Definition at line 165 of file QmitkFramesRegistrationJob.h.

◆ m_TargetMaskDataUID

mitk::NodeUIDType QmitkFramesRegistrationJob::m_TargetMaskDataUID

UID of the target mask data node for provenance tracking.

Definition at line 168 of file QmitkFramesRegistrationJob.h.


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