Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
DescriptionParameterBackgroundJob Class Reference

Background job for computing description parameter images asynchronously. More...

#include <QmitkDescriptionParameterBackgroundJob.h>

Inheritance diagram for DescriptionParameterBackgroundJob:
Collaboration diagram for DescriptionParameterBackgroundJob:

Signals

void Finished ()
 Emitted when the job has finished (successfully or not). More...
 
void Error (QString err)
 Emitted when an error occurs during computation. More...
 
void ResultsAreAvailable (mitk::modelFit::ModelFitResultNodeVectorType resultMap, const DescriptionParameterBackgroundJob *pJob)
 Emitted when result data nodes are available. More...
 
void JobProgress (double progress)
 Emitted to report computation progress. More...
 
void JobStatusChanged (QString info)
 Emitted when the job status changes. More...
 

Public Member Functions

 DescriptionParameterBackgroundJob (mitk::DescriptionParameterImageGeneratorBase *generator, mitk::DataNode *parentNode=nullptr)
 Construct a background job for the given generator. More...
 
 ~DescriptionParameterBackgroundJob () override
 
void run () override
 Execute the parameter image generation in the background thread. More...
 
mitk::DataNode * GetParentNode () const
 Get the parent node for the results of this job. More...
 

Protected Member Functions

void OnComputeEvent (::itk::Object *, const itk::EventObject &event)
 

Static Protected Member Functions

static mitk::modelFit::ModelFitResultNodeVectorType CreateResultNodes (const mitk::DescriptionParameterImageGeneratorBase::ParameterImageMapType &paramimages)
 

Protected Attributes

mitk::DescriptionParameterImageGeneratorBase::Pointer m_Generator
 
mitk::DataNode::Pointer m_ParentNode
 
mitk::modelFit::ModelFitResultNodeVectorType m_Results
 
::itk::MemberCommand< DescriptionParameterBackgroundJob >::Pointer m_spCommand
 
unsigned long m_ObserverID
 

Detailed Description

Background job for computing description parameter images asynchronously.

Runs a DescriptionParameterImageGeneratorBase in a background thread (via QRunnable) and emits Qt signals for progress updates, completion, errors, and result availability. Results are packaged as DataNode objects suitable for insertion into a DataStorage.

See also
mitk::DescriptionParameterImageGeneratorBase, mitk::modelFit::ModelFitResultHelper

Definition at line 41 of file QmitkDescriptionParameterBackgroundJob.h.

Constructor & Destructor Documentation

◆ DescriptionParameterBackgroundJob()

DescriptionParameterBackgroundJob::DescriptionParameterBackgroundJob ( mitk::DescriptionParameterImageGeneratorBase *  generator,
mitk::DataNode *  parentNode = nullptr 
)

Construct a background job for the given generator.

Parameters
[in]generatorThe description parameter image generator to execute.
[in]parentNodeOptional parent data node for organizing result nodes in the data storage. May be nullptr.

◆ ~DescriptionParameterBackgroundJob()

DescriptionParameterBackgroundJob::~DescriptionParameterBackgroundJob ( )
override

Member Function Documentation

◆ CreateResultNodes()

static mitk::modelFit::ModelFitResultNodeVectorType DescriptionParameterBackgroundJob::CreateResultNodes ( const mitk::DescriptionParameterImageGeneratorBase::ParameterImageMapType &  paramimages)
staticprotected

◆ Error

void DescriptionParameterBackgroundJob::Error ( QString  err)
signal

Emitted when an error occurs during computation.

Parameters
[in]errThe error message.

◆ Finished

void DescriptionParameterBackgroundJob::Finished ( )
signal

Emitted when the job has finished (successfully or not).

◆ GetParentNode()

mitk::DataNode* DescriptionParameterBackgroundJob::GetParentNode ( ) const

Get the parent node for the results of this job.

Returns
The parent data node, or nullptr if none was specified.

◆ JobProgress

void DescriptionParameterBackgroundJob::JobProgress ( double  progress)
signal

Emitted to report computation progress.

Parameters
[in]progressProgress value in the range [0.0, 1.0].

◆ JobStatusChanged

void DescriptionParameterBackgroundJob::JobStatusChanged ( QString  info)
signal

Emitted when the job status changes.

Parameters
[in]infoA human-readable status message.

◆ OnComputeEvent()

void DescriptionParameterBackgroundJob::OnComputeEvent ( ::itk::Object *  ,
const itk::EventObject &  event 
)
protected

◆ ResultsAreAvailable

void DescriptionParameterBackgroundJob::ResultsAreAvailable ( mitk::modelFit::ModelFitResultNodeVectorType  resultMap,
const DescriptionParameterBackgroundJob *  pJob 
)
signal

Emitted when result data nodes are available.

Parameters
[in]resultMapThe vector of result data nodes.
[in]pJobPointer to this job instance.

◆ run()

void DescriptionParameterBackgroundJob::run ( )
override

Execute the parameter image generation in the background thread.

Member Data Documentation

◆ m_Generator

mitk::DescriptionParameterImageGeneratorBase::Pointer DescriptionParameterBackgroundJob::m_Generator
protected

Definition at line 93 of file QmitkDescriptionParameterBackgroundJob.h.

◆ m_ObserverID

unsigned long DescriptionParameterBackgroundJob::m_ObserverID
protected

Definition at line 100 of file QmitkDescriptionParameterBackgroundJob.h.

◆ m_ParentNode

mitk::DataNode::Pointer DescriptionParameterBackgroundJob::m_ParentNode
protected

Definition at line 94 of file QmitkDescriptionParameterBackgroundJob.h.

◆ m_Results

mitk::modelFit::ModelFitResultNodeVectorType DescriptionParameterBackgroundJob::m_Results
protected

Definition at line 97 of file QmitkDescriptionParameterBackgroundJob.h.

◆ m_spCommand

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

Definition at line 99 of file QmitkDescriptionParameterBackgroundJob.h.


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