18 itk::ProgressEvent progressEvent;
19 itk::InitializeEvent initEvent;
20 itk::StartEvent startEvent;
21 itk::EndEvent endEvent;
23 if (progressEvent.CheckEvent(&event))
28 else if (initEvent.CheckEvent(&event))
32 else if (startEvent.CheckEvent(&event))
36 else if (endEvent.CheckEvent(&event))
52 mitkThrow() <<
"Cannot create parameter fit background job. Passed fit generator is NULL.";
57 mitkThrow() <<
"Cannot create parameter fit background job. Passed model traits interface is NULL.";
65 m_spCommand = ::itk::MemberCommand<ParameterFitBackgroundJob>::New();
105 catch (::std::exception& e)
107 emit
Error(QString(
"Error while fitting data. Details: ")+QString::fromLatin1(e.what()));
111 emit
Error(QString(
"Unkown error when fitting the data."));
void ResultsAreAvailable(mitk::modelFit::ModelFitResultNodeVectorType resultMap, const ParameterFitBackgroundJob *pJob)
void OnFitEvent(::itk::Object *, const itk::EventObject &event)
void JobStatusChanged(QString info)
unsigned long m_ObserverID
mitk::DataNode * GetParentNode() const
virtual double GetProgress() const =0
~ParameterFitBackgroundJob() override
mitk::modelFit::ModelFitResultNodeVectorType m_Results
std::vector< DataNode::Pointer > ModelFitResultNodeVectorType
MITKMODELFIT_EXPORT ModelFitResultNodeVectorType CreateResultNodeMap(const ModelFitResultImageMapType &results, const ModelFitResultImageMapType &derivedResults, const ModelFitResultImageMapType &criterionResults, const ModelFitResultImageMapType &evaluationResults, const ModelFitInfo *fitInfo)
void JobProgress(double progress)
Data class that stores all information about a modelfit that is relevant to the visualization and sto...
ParameterFitBackgroundJob(mitk::ParameterFitImageGeneratorBase *generator, const mitk::modelFit::ModelFitInfo *fitInfo, mitk::DataNode *parentNode=nullptr)
mitk::DataNode::Pointer m_ParentNode
mitk::modelFit::ModelFitResultNodeVectorType GetAdditionalRelevantNodes() const
mitk::modelFit::ModelFitResultNodeVectorType m_AdditionalRelevantNodes
::itk::MemberCommand< ParameterFitBackgroundJob >::Pointer m_spCommand
mitk::modelFit::ModelFitInfo::ConstPointer m_ModelFitInfo
Class for nodes of the DataTree.
mitk::ParameterFitImageGeneratorBase::Pointer m_Generator