|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
QRunnable job that performs image registration using a MatchPoint algorithm in a background thread. More...
#include <QmitkRegistrationJob.h>


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 | RegResultIsAvailable (mitk::MAPRegistrationWrapper::Pointer spResultRegistration, const QmitkRegistrationJob *pJob) |
| Emitted when the registration result 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... | |
Public Member Functions | |
| QmitkRegistrationJob (::map::algorithm::RegistrationAlgorithmBase *pAlgorithm) | |
| Constructs the registration job with the given algorithm. More... | |
| ~QmitkRegistrationJob () override | |
| Destructor. Removes the algorithm event observer. More... | |
| void | run () override |
| Executes the registration algorithm. More... | |
| const ::map::algorithm::RegistrationAlgorithmBase * | GetLoadedAlgorithm () const |
| Returns the registration algorithm used by this job. More... | |
Public Attributes | |
| mitk::BaseData::ConstPointer | m_spTargetData |
| The target (fixed) data for the registration. More... | |
| mitk::BaseData::ConstPointer | m_spMovingData |
| The moving data for the registration. More... | |
| mitk::Image::ConstPointer | m_spTargetMask |
| Optional mask image for the target data. More... | |
| mitk::Image::ConstPointer | m_spMovingMask |
| Optional mask image for the moving data. More... | |
| bool | m_MapEntity |
| If true, the job also maps the moving entity using the computed registration. More... | |
| bool | m_StoreReg |
| If true, the registration result is stored. More... | |
| bool | m_ErrorOccured |
| Flag indicating whether an error occurred during execution. More... | |
| std::string | m_JobName |
| Human-readable name for the registration job. More... | |
| mitk::NodeUIDType | m_TargetDataUID |
| UID of the target data node for provenance tracking. More... | |
| mitk::NodeUIDType | m_MovingDataUID |
| UID of the moving data node for provenance tracking. More... | |
| mitk::NodeUIDType | m_TargetMaskDataUID |
| UID of the target mask data node for provenance tracking. More... | |
| mitk::NodeUIDType | m_MovingMaskDataUID |
| UID of the moving mask data node for provenance tracking. More... | |
Protected Types | |
| typedef ::map::algorithm::facet::IterativeAlgorithmInterface | IIterativeAlgorithm |
| typedef ::map::algorithm::facet::MultiResRegistrationAlgorithmInterface | IMultiResAlgorithm |
Protected Member Functions | |
| const mitk::Image * | GetTargetDataAsImage () const |
| const mitk::Image * | GetMovingDataAsImage () const |
| void | OnMapAlgorithmEvent (::itk::Object *, const itk::EventObject &event) |
Protected Attributes | |
| ::map::core::RegistrationBase::Pointer | m_spResultRegistration |
| mitk::DataNode::Pointer | m_spRegNode |
| mitk::DataNode::Pointer | m_spMappedImageNode |
| ::itk::MemberCommand< QmitkRegistrationJob >::Pointer | m_spCommand |
| unsigned long | m_ObserverID |
| ::map::algorithm::RegistrationAlgorithmBase::Pointer | m_spLoadedAlgorithm |
QRunnable job that performs image registration using a MatchPoint algorithm in a background thread.
This job executes a MatchPoint registration algorithm on a pair of moving and target data sets (typically images) in a QThreadPool, keeping the GUI thread responsive. It observes algorithm events (iterations, level changes, status updates) and relays them as Qt signals for progress reporting.
Optional masks can be set for both moving and target data. On successful completion, the job emits RegResultIsAvailable with a mitk::MAPRegistrationWrapper containing the computed registration. The Finished signal is always emitted at the end.
Definition at line 53 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 177 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 178 of file QmitkRegistrationJob.h.
| QmitkRegistrationJob::QmitkRegistrationJob | ( | ::map::algorithm::RegistrationAlgorithmBase * | pAlgorithm | ) |
Constructs the registration job with the given algorithm.
Registers an ITK observer on the algorithm to receive algorithm events and initializes default member values.
| [in] | pAlgorithm | Pointer to the MatchPoint registration algorithm to use. The job takes shared ownership via a smart pointer. |
nullptr.
|
override |
Destructor. Removes the algorithm event observer.
|
signal |
Emitted for general algorithm information messages.
| [in] | info | Information message string. |
|
signal |
Emitted when the algorithm completes an iteration.
| [in] | info | Descriptive text about the iteration. |
| [in] | hasIterationCount | True if the algorithm provides an iteration count. |
| [in] | currentIteration | The current iteration number (valid only if hasIterationCount is true). |
|
signal |
Emitted when the algorithm status changes (e.g., initializing, starting, stopping).
| [in] | info | Status description string. |
|
signal |
Emitted when an error occurs during registration.
| [in] | err | Description of the error. |
|
signal |
Emitted when the job has completed (regardless of success or failure).
| const ::map::algorithm::RegistrationAlgorithmBase* QmitkRegistrationJob::GetLoadedAlgorithm | ( | ) | const |
Returns the registration algorithm used by this job.
|
protected |
|
protected |
|
signal |
Emitted when the algorithm changes its multi-resolution level.
| [in] | info | Descriptive text about the level change. |
| [in] | hasLevelCount | True if the algorithm provides a level count. |
| [in] | currentLevel | The current level number (valid only if hasLevelCount is true). |
|
protected |
|
signal |
Emitted when the registration result is available.
| [in] | spResultRegistration | The computed registration wrapped in a MAPRegistrationWrapper. |
| [in] | pJob | Pointer to this job instance for context. |
|
override |
Executes the registration algorithm.
Sets moving and target data (and optional masks) on the algorithm via mitk::MAPAlgorithmHelper, runs the registration, and wraps the result in a mitk::MAPRegistrationWrapper. Emits RegResultIsAvailable on success or Error on failure. Always emits Finished.
| bool QmitkRegistrationJob::m_ErrorOccured |
Flag indicating whether an error occurred during execution.
Definition at line 153 of file QmitkRegistrationJob.h.
| std::string QmitkRegistrationJob::m_JobName |
Human-readable name for the registration job.
Definition at line 156 of file QmitkRegistrationJob.h.
| bool QmitkRegistrationJob::m_MapEntity |
If true, the job also maps the moving entity using the computed registration.
Definition at line 147 of file QmitkRegistrationJob.h.
| mitk::NodeUIDType QmitkRegistrationJob::m_MovingDataUID |
UID of the moving data node for provenance tracking.
Definition at line 162 of file QmitkRegistrationJob.h.
| mitk::NodeUIDType QmitkRegistrationJob::m_MovingMaskDataUID |
UID of the moving mask data node for provenance tracking.
Definition at line 168 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 187 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 186 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 188 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 184 of file QmitkRegistrationJob.h.
| mitk::BaseData::ConstPointer QmitkRegistrationJob::m_spMovingData |
The moving data for the registration.
Definition at line 138 of file QmitkRegistrationJob.h.
| mitk::Image::ConstPointer QmitkRegistrationJob::m_spMovingMask |
Optional mask image for the moving data.
Definition at line 144 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 182 of file QmitkRegistrationJob.h.
|
protected |
Definition at line 181 of file QmitkRegistrationJob.h.
| mitk::BaseData::ConstPointer QmitkRegistrationJob::m_spTargetData |
The target (fixed) data for the registration.
Definition at line 135 of file QmitkRegistrationJob.h.
| mitk::Image::ConstPointer QmitkRegistrationJob::m_spTargetMask |
Optional mask image for the target data.
Definition at line 141 of file QmitkRegistrationJob.h.
| bool QmitkRegistrationJob::m_StoreReg |
If true, the registration result is stored.
Definition at line 150 of file QmitkRegistrationJob.h.
| mitk::NodeUIDType QmitkRegistrationJob::m_TargetDataUID |
UID of the target data node for provenance tracking.
Definition at line 159 of file QmitkRegistrationJob.h.
| mitk::NodeUIDType QmitkRegistrationJob::m_TargetMaskDataUID |
UID of the target mask data node for provenance tracking.
Definition at line 165 of file QmitkRegistrationJob.h.