Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkDescriptionParameterBackgroundJob.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef QmitkDescriptionParameterBackgroundJob_h
14 #define QmitkDescriptionParameterBackgroundJob_h
15 
16 
17 //QT
18 #include <QRunnable>
19 #include <QObject>
20 
21 //MITK
22 #include <mitkDataNode.h>
23 
26 #include <mitkModelFitInfo.h>
27 
28 // ITK
29 #include <itkCommand.h>
30 
32 
41 class MITKPHARMACOKINETICSUI_EXPORT DescriptionParameterBackgroundJob : public QObject, public QRunnable
42 {
43  Q_OBJECT
44 
45 public:
54 
56  void run() override;
57 
63 
64 signals:
66  void Finished();
67 
71  void Error(QString err);
72 
78 
82  void JobProgress(double progress);
83 
87  void JobStatusChanged(QString info);
88 
89 protected:
91 
92  //Inputs
93  mitk::DescriptionParameterImageGeneratorBase::Pointer m_Generator;
94  mitk::DataNode::Pointer m_ParentNode;
95 
96  // Results
98 
99  ::itk::MemberCommand<DescriptionParameterBackgroundJob>::Pointer m_spCommand;
100  unsigned long m_ObserverID;
101 
102  void OnComputeEvent(::itk::Object *, const itk::EventObject &event);
103 };
104 
105 #endif
#define MITKPHARMACOKINETICSUI_EXPORT
Background job for computing description parameter images asynchronously.
static mitk::modelFit::ModelFitResultNodeVectorType CreateResultNodes(const mitk::DescriptionParameterImageGeneratorBase::ParameterImageMapType &paramimages)
void JobProgress(double progress)
Emitted to report computation progress.
void Finished()
Emitted when the job has finished (successfully or not).
mitk::DescriptionParameterImageGeneratorBase::Pointer m_Generator
void JobStatusChanged(QString info)
Emitted when the job status changes.
mitk::modelFit::ModelFitResultNodeVectorType m_Results
DescriptionParameterBackgroundJob(mitk::DescriptionParameterImageGeneratorBase *generator, mitk::DataNode *parentNode=nullptr)
Construct a background job for the given generator.
void OnComputeEvent(::itk::Object *, const itk::EventObject &event)
void ResultsAreAvailable(mitk::modelFit::ModelFitResultNodeVectorType resultMap, const DescriptionParameterBackgroundJob *pJob)
Emitted when result data nodes are available.
mitk::DataNode * GetParentNode() const
Get the parent node for the results of this job.
void run() override
Execute the parameter image generation in the background thread.
void Error(QString err)
Emitted when an error occurs during computation.
::itk::MemberCommand< DescriptionParameterBackgroundJob >::Pointer m_spCommand
Central node class of the MITK data tree, associating a data object with properties and mappers.
Definition: mitkDataNode.h:72
Abstract base class for generators that produce parameter images from curve descriptors.
std::map< ParameterNameType, Image::Pointer > ParameterImageMapType
Map from parameter names to their corresponding output images.
std::vector< DataNode::Pointer > ModelFitResultNodeVectorType