Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
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,
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_FRAMES_REGISTRATION_JOB_H
18 #define __QMITK_FRAMES_REGISTRATION_JOB_H
19 
20 // QT
21 #include <QObject>
22 #include <QRunnable>
23 
24 // ITK
25 #include <itkCommand.h>
26 
27 // MITK
28 #include <QmitkMappingJob.h>
29 #include <mitkDataNode.h>
30 #include <mitkImage.h>
31 
32 // MatchPoint
33 #include <mapDeploymentDLLInfo.h>
34 #include <mapIterativeAlgorithmInterface.h>
35 #include <mapMultiResRegistrationAlgorithmInterface.h>
36 #include <mapRegistrationAlgorithmBase.h>
37 #include <mapRegistrationBase.h>
38 
39 // Map4CTK
40 #include "mitkUIDHelper.h"
42 
44 
48  public QRunnable,
50 {
51  // this is needed for all Qt objects that should have a Qt meta-object
52  // (everything that derives from QObject and wants to have signal/slots)
53  Q_OBJECT
54 
55 public:
56  QmitkFramesRegistrationJob(map::algorithm::RegistrationAlgorithmBase *pAlgorithm);
58 
59  void run();
60 
61 signals:
62  void Finished();
63  void Error(QString err);
64  void ResultIsAvailable(mitk::Image::Pointer spResult, const QmitkFramesRegistrationJob *pJob);
65  void AlgorithmIterated(QString info, bool hasIterationCount, unsigned long currentIteration);
66  void LevelChanged(QString info, bool hasLevelCount, unsigned long currentLevel);
67  void AlgorithmStatusChanged(QString info);
68  void AlgorithmInfo(QString info);
69  void FrameProcessed(double progress);
70  void FrameRegistered(double progress);
71  void FrameMapped(double progress);
72 
73 public:
74  // Inputs
76 
78 
79  // job settings
83 
84  const map::algorithm::RegistrationAlgorithmBase *GetLoadedAlgorithm() const;
85 
86 private:
87  typedef map::algorithm::facet::IterativeAlgorithmInterface IIterativeAlgorithm;
88  typedef map::algorithm::facet::MultiResRegistrationAlgorithmInterface IMultiResAlgorithm;
89 
90  mitk::Image::Pointer m_spMappedImageNode;
91 
93  unsigned long m_ObserverID;
95 
97 
98  // Helper functions
99  const mitk::Image *GetTargetDataAsImage() const;
100 
101  void OnMapAlgorithmEvent(::itk::Object *, const itk::EventObject &event);
102 };
103 
104 #endif
mitk::BaseData::ConstPointer m_spTargetData
itk::SmartPointer< Self > Pointer
static void info(const char *fmt,...)
Definition: svm.cpp:100
mitk::Image::ConstPointer m_spTargetMask
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
Image class for storing images.
Definition: mitkImage.h:76
std::string NodeUIDType
Definition: mitkUIDHelper.h:30
std::vector< mitk::TimeStepType > IgnoreListType
mitk::TimeFramesRegistrationHelper::IgnoreListType m_IgnoreList