Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef __QMITK_REGISTRATION_JOB_H
18 #define __QMITK_REGISTRATION_JOB_H
19 
20 // QT
21 #include <QObject>
22 #include <QRunnable>
23 
24 // ITK
25 #include <itkCommand.h>
26 
27 // MITK
28 #include "mitkUIDHelper.h"
29 #include <mitkDataNode.h>
30 #include <mitkImage.h>
32 
33 // MatchPoint
34 #include <mapDeploymentDLLInfo.h>
35 #include <mapIterativeAlgorithmInterface.h>
36 #include <mapMultiResRegistrationAlgorithmInterface.h>
37 #include <mapRegistrationAlgorithmBase.h>
38 #include <mapRegistrationBase.h>
39 
41 
42 class MITKMATCHPOINTREGISTRATIONUI_EXPORT QmitkRegistrationJob : public QObject, public QRunnable
43 {
44  // this is needed for all Qt objects that should have a Qt meta-object
45  // (everything that derives from QObject and wants to have signal/slots)
46  Q_OBJECT
47 
48 public:
49  QmitkRegistrationJob(map::algorithm::RegistrationAlgorithmBase *pAlgorithm);
51 
52  void run();
53 
54 signals:
55  void Finished();
56  void Error(QString err);
57  void RegResultIsAvailable(mitk::MAPRegistrationWrapper::Pointer spResultRegistration,
58  const QmitkRegistrationJob *pJob);
59  void AlgorithmIterated(QString info, bool hasIterationCount, unsigned long currentIteration);
60  void LevelChanged(QString info, bool hasLevelCount, unsigned long currentLevel);
61  void AlgorithmStatusChanged(QString info);
62  void AlgorithmInfo(QString info);
63 
64 public:
65  // Inputs
68 
71 
72  // job settings
74  bool m_StoreReg;
76  std::string m_JobName;
81 
82  const map::algorithm::RegistrationAlgorithmBase *GetLoadedAlgorithm() const;
83 
84 protected:
85  typedef map::algorithm::facet::IterativeAlgorithmInterface IIterativeAlgorithm;
86  typedef map::algorithm::facet::MultiResRegistrationAlgorithmInterface IMultiResAlgorithm;
87 
88  // Result registration.
91  // mapped image. May be null if m_MapEntity is false.
93 
95  unsigned long m_ObserverID;
97 
98  // Helper functions
99  const mitk::Image *GetTargetDataAsImage() const;
100  const mitk::Image *GetMovingDataAsImage() const;
101 
102  void OnMapAlgorithmEvent(::itk::Object *, const itk::EventObject &event);
103 };
104 
105 #endif
mitk::Image::ConstPointer m_spMovingMask
itk::SmartPointer< Self > Pointer
::itk::MemberCommand< QmitkRegistrationJob >::Pointer m_spCommand
mitk::BaseData::ConstPointer m_spMovingData
map::core::RegistrationBase::Pointer m_spResultRegistration
mitk::NodeUIDType m_MovingMaskDataUID
mitk::NodeUIDType m_MovingDataUID
static void info(const char *fmt,...)
Definition: svm.cpp:100
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
mitk::BaseData::ConstPointer m_spTargetData
Image class for storing images.
Definition: mitkImage.h:76
mitk::NodeUIDType m_TargetMaskDataUID
mitk::Image::ConstPointer m_spTargetMask
mitk::NodeUIDType m_TargetDataUID
std::string NodeUIDType
Definition: mitkUIDHelper.h:30
map::algorithm::facet::IterativeAlgorithmInterface IIterativeAlgorithm
mitk::DataNode::Pointer m_spMappedImageNode
map::algorithm::RegistrationAlgorithmBase::Pointer m_spLoadedAlgorithm
map::algorithm::facet::MultiResRegistrationAlgorithmInterface IMultiResAlgorithm
mitk::DataNode::Pointer m_spRegNode