Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkRegistrationJob.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 __QMITK_REGISTRATION_JOB_H
14 #define __QMITK_REGISTRATION_JOB_H
15 
16 // QT
17 #include <QObject>
18 #include <QRunnable>
19 
20 // ITK
21 #include <itkCommand.h>
22 
23 // MITK
24 #include "mitkUIDHelper.h"
25 #include <mitkDataNode.h>
26 #include <mitkImage.h>
28 
29 // MatchPoint
30 #include <mapDeploymentDLLInfo.h>
31 #include <mapIterativeAlgorithmInterface.h>
32 #include <mapMultiResRegistrationAlgorithmInterface.h>
33 #include <mapRegistrationAlgorithmBase.h>
34 #include <mapRegistrationBase.h>
35 
37 
38 class MITKMATCHPOINTREGISTRATIONUI_EXPORT QmitkRegistrationJob : public QObject, public QRunnable
39 {
40  // this is needed for all Qt objects that should have a Qt meta-object
41  // (everything that derives from QObject and wants to have signal/slots)
42  Q_OBJECT
43 
44 public:
45  QmitkRegistrationJob(::map::algorithm::RegistrationAlgorithmBase *pAlgorithm);
46  ~QmitkRegistrationJob() override;
47 
48  void run() override;
49 
50 signals:
51  void Finished();
52  void Error(QString err);
53  void RegResultIsAvailable(mitk::MAPRegistrationWrapper::Pointer spResultRegistration,
54  const QmitkRegistrationJob *pJob);
55  void AlgorithmIterated(QString info, bool hasIterationCount, unsigned long currentIteration);
56  void LevelChanged(QString info, bool hasLevelCount, unsigned long currentLevel);
57  void AlgorithmStatusChanged(QString info);
58  void AlgorithmInfo(QString info);
59 
60 public:
61  // Inputs
64 
67 
68  // job settings
70  bool m_StoreReg;
72  std::string m_JobName;
77 
78  const ::map::algorithm::RegistrationAlgorithmBase *GetLoadedAlgorithm() const;
79 
80 protected:
81  typedef ::map::algorithm::facet::IterativeAlgorithmInterface IIterativeAlgorithm;
82  typedef ::map::algorithm::facet::MultiResRegistrationAlgorithmInterface IMultiResAlgorithm;
83 
84  // Result registration.
85  ::map::core::RegistrationBase::Pointer m_spResultRegistration;
87  // mapped image. May be null if m_MapEntity is false.
89 
90  ::itk::MemberCommand<QmitkRegistrationJob>::Pointer m_spCommand;
91  unsigned long m_ObserverID;
92  ::map::algorithm::RegistrationAlgorithmBase::Pointer m_spLoadedAlgorithm;
93 
94  // Helper functions
95  const mitk::Image *GetTargetDataAsImage() const;
96  const mitk::Image *GetMovingDataAsImage() const;
97 
98  void OnMapAlgorithmEvent(::itk::Object *, const itk::EventObject &event);
99 };
100 
101 #endif
mitk::Image::ConstPointer m_spMovingMask
::itk::MemberCommand< QmitkRegistrationJob >::Pointer m_spCommand
mitk::BaseData::ConstPointer m_spMovingData
::map::algorithm::facet::MultiResRegistrationAlgorithmInterface IMultiResAlgorithm
mitk::NodeUIDType m_MovingMaskDataUID
mitk::NodeUIDType m_MovingDataUID
static void info(const char *fmt,...)
Definition: svm.cpp:86
::map::core::RegistrationBase::Pointer m_spResultRegistration
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
mitk::BaseData::ConstPointer m_spTargetData
Image class for storing images.
Definition: mitkImage.h:72
mitk::NodeUIDType m_TargetMaskDataUID
::map::algorithm::facet::IterativeAlgorithmInterface IIterativeAlgorithm
mitk::Image::ConstPointer m_spTargetMask
mitk::NodeUIDType m_TargetDataUID
std::string NodeUIDType
Definition: mitkUIDHelper.h:26
mitk::DataNode::Pointer m_spMappedImageNode
::map::algorithm::RegistrationAlgorithmBase::Pointer m_spLoadedAlgorithm
mitk::DataNode::Pointer m_spRegNode