Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
QmitkParameterFitBackgroundJob.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 QmitkParameterFitBackgroundJob_h
14 #define QmitkParameterFitBackgroundJob_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 
31 #include "MitkModelFitUIExports.h"
32 
33 class MITKMODELFITUI_EXPORT ParameterFitBackgroundJob : public QObject, public QRunnable
34 {
35  // this is needed for all Qt objects that should have a Qt meta-object
36  // (everything that derives from QObject and wants to have signal/slots)
37  Q_OBJECT
38 
39 public:
43 
45 
46  void run() override;
47 
51 
53 
54 signals:
55  void Finished();
56  void Error(QString err);
58  void JobProgress(double progress);
59  void JobStatusChanged(QString info);
60 
61 protected:
62  //Inputs
63  mitk::ParameterFitImageGeneratorBase::Pointer m_Generator;
64  mitk::modelFit::ModelFitInfo::ConstPointer m_ModelFitInfo;
65  mitk::DataNode::Pointer m_ParentNode;
67 
68  // Results
70 
71  ::itk::MemberCommand<ParameterFitBackgroundJob>::Pointer m_spCommand;
72  unsigned long m_ObserverID;
73 
74  void OnFitEvent(::itk::Object *, const itk::EventObject &event);
75 };
76 
77 #endif
#define MITKMODELFITUI_EXPORT
ParameterFitBackgroundJob(mitk::ParameterFitImageGeneratorBase *generator, const mitk::modelFit::ModelFitInfo *fitInfo, mitk::DataNode *parentNode, mitk::modelFit::ModelFitResultNodeVectorType additionalRelevantNodes)
void JobProgress(double progress)
void ResultsAreAvailable(mitk::modelFit::ModelFitResultNodeVectorType resultMap, const ParameterFitBackgroundJob *pJob)
mitk::modelFit::ModelFitResultNodeVectorType m_AdditionalRelevantNodes
void OnFitEvent(::itk::Object *, const itk::EventObject &event)
::itk::MemberCommand< ParameterFitBackgroundJob >::Pointer m_spCommand
~ParameterFitBackgroundJob() override
mitk::modelFit::ModelFitResultNodeVectorType GetAdditionalRelevantNodes() const
mitk::modelFit::ModelFitResultNodeVectorType m_Results
mitk::DataNode * GetParentNode() const
mitk::ParameterFitImageGeneratorBase::Pointer m_Generator
void JobStatusChanged(QString info)
mitk::modelFit::ModelFitInfo::ConstPointer m_ModelFitInfo
void Error(QString err)
ParameterFitBackgroundJob(mitk::ParameterFitImageGeneratorBase *generator, const mitk::modelFit::ModelFitInfo *fitInfo, mitk::DataNode *parentNode=nullptr)
Class for nodes of the DataTree.
Definition: mitkDataNode.h:64
Data class that stores all information about a modelfit that is relevant to the visualization and sto...
std::vector< DataNode::Pointer > ModelFitResultNodeVectorType