Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkFramesRegistrationJob.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 QmitkFramesRegistrationJob_h
14 #define QmitkFramesRegistrationJob_h
15 
16 // QT
17 #include <QObject>
18 #include <QRunnable>
19 
20 // ITK
21 #include <itkCommand.h>
22 
23 // MITK
24 #include <QmitkMappingJob.h>
25 #include <mitkDataNode.h>
26 #include <mitkImage.h>
27 
28 // MatchPoint
29 #include <mapDeploymentDLLInfo.h>
30 #include <mapIterativeAlgorithmInterface.h>
31 #include <mapMultiResRegistrationAlgorithmInterface.h>
32 #include <mapRegistrationAlgorithmBase.h>
33 #include <mapRegistrationBase.h>
34 
35 // Map4CTK
36 #include "mitkUIDHelper.h"
38 
40 
44  public QRunnable,
46 {
47  // this is needed for all Qt objects that should have a Qt meta-object
48  // (everything that derives from QObject and wants to have signal/slots)
49  Q_OBJECT
50 
51 public:
52  QmitkFramesRegistrationJob(map::algorithm::RegistrationAlgorithmBase *pAlgorithm);
53  ~QmitkFramesRegistrationJob() override;
54 
55  void run() override;
56 
57 signals:
58  void Finished();
59  void Error(QString err);
60  void ResultIsAvailable(mitk::Image::Pointer spResult, const QmitkFramesRegistrationJob *pJob);
61  void AlgorithmIterated(QString info, bool hasIterationCount, unsigned long currentIteration);
62  void LevelChanged(QString info, bool hasLevelCount, unsigned long currentLevel);
63  void AlgorithmStatusChanged(QString info);
64  void AlgorithmInfo(QString info);
65  void FrameProcessed(double progress);
66  void FrameRegistered(double progress);
67  void FrameMapped(double progress);
68 
69 public:
70  // Inputs
72 
74 
75  // job settings
79 
80  const map::algorithm::RegistrationAlgorithmBase *GetLoadedAlgorithm() const;
81 
82 private:
83  typedef map::algorithm::facet::IterativeAlgorithmInterface IIterativeAlgorithm;
84  typedef map::algorithm::facet::MultiResRegistrationAlgorithmInterface IMultiResAlgorithm;
85 
86  mitk::Image::Pointer m_spMappedImageNode;
87 
88  ::itk::MemberCommand<QmitkFramesRegistrationJob>::Pointer m_spCommand;
89  unsigned long m_ObserverID;
90  map::algorithm::RegistrationAlgorithmBase::Pointer m_spLoadedAlgorithm;
91 
92  mitk::TimeFramesRegistrationHelper::Pointer m_helper;
93 
94  // Helper functions
95  const mitk::Image *GetTargetDataAsImage() const;
96 
97  void OnMapAlgorithmEvent(::itk::Object *, const itk::EventObject &event);
98 };
99 
100 #endif
mitk::TimeFramesRegistrationHelper::IgnoreListType
std::vector< mitk::TimeStepType > IgnoreListType
Definition: mitkTimeFramesRegistrationHelper.h:55
QmitkFramesRegistrationJob::m_TargetMaskDataUID
mitk::NodeUIDType m_TargetMaskDataUID
Definition: QmitkFramesRegistrationJob.h:78
mitkImage.h
mitkUIDHelper.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
QmitkFramesRegistrationJob
Definition: QmitkFramesRegistrationJob.h:43
itk::SmartPointer< Self >
mitkTimeFramesRegistrationHelper.h
QmitkFramesRegistrationJob::m_IgnoreList
mitk::TimeFramesRegistrationHelper::IgnoreListType m_IgnoreList
Definition: QmitkFramesRegistrationJob.h:76
QmitkFramesRegistrationJob::m_spTargetData
mitk::BaseData::ConstPointer m_spTargetData
Definition: QmitkFramesRegistrationJob.h:71
QmitkMappingJob.h
MITKMATCHPOINTREGISTRATIONUI_EXPORT
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
Definition: MitkMatchPointRegistrationUIExports.h:15
mitkDataNode.h
QmitkMappingJobSettings
Definition: QmitkMappingJob.h:34
QmitkFramesRegistrationJob::m_TargetDataUID
mitk::NodeUIDType m_TargetDataUID
Definition: QmitkFramesRegistrationJob.h:77
mitk::NodeUIDType
std::string NodeUIDType
Definition: mitkUIDHelper.h:26
MitkMatchPointRegistrationUIExports.h
QmitkFramesRegistrationJob::m_spTargetMask
mitk::Image::ConstPointer m_spTargetMask
Definition: QmitkFramesRegistrationJob.h:73