Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkMappingJob.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 QmitkMappingJob_h
14 #define QmitkMappingJob_h
15 
16 // QT
17 #include <QObject>
18 #include <QRunnable>
19 
20 // ITK
21 #include <itkCommand.h>
22 
23 // MatchPoint
24 #include <mapRegistrationBase.h>
25 
26 // MITK
27 #include <mitkDataNode.h>
28 #include <mitkImageMappingHelper.h>
29 #include <mitkPointSet.h>
30 
32 #include <mitkUIDHelper.h>
33 
45 {
46 public:
48  std::string m_MappedName;
49 
52 
56 
59 
63 
65  double m_errorValue;
66 
70 
72  std::string m_InterpolatorLabel;
73 
81 };
82 
101  public QRunnable,
103 {
104  // this is needed for all Qt objects that should have a Qt meta-object
105  // (everything that derives from QObject and wants to have signal/slots)
106  Q_OBJECT
107 
108 public:
111 
113  ~QmitkMappingJob() override;
114 
122  void run() override;
123 
124 signals:
129  void Error(QString err);
130 
136  void MapResultIsAvailable(mitk::BaseData::Pointer spMappedData, const QmitkMappingJob *job);
137 
142  void AlgorithmInfo(QString info);
143 
144 public:
146  mitk::DataNode::Pointer m_spRegNode;
147 
149  mitk::BaseData::ConstPointer m_spInputData;
150 
153 
155  mitk::BaseGeometry::Pointer m_spRefGeometry;
156 
162  const map::core::RegistrationBase *GetRegistration() const;
163 
164 protected:
165  // mapped data.
166  mitk::BaseData::Pointer m_spMappedData;
167 
168  ::itk::MemberCommand<QmitkMappingJob>::Pointer m_spCommand;
169  unsigned long m_ObserverID;
170 
171  // Helper functions
174 
175  void OnMapAlgorithmEvent(::itk::Object *, const itk::EventObject &event);
176 };
177 
178 #endif
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
QRunnable job that maps (transforms) data using a MatchPoint registration in a background thread.
mitk::BaseGeometry::Pointer m_spRefGeometry
Optional reference geometry for image mapping. If null, the registration determines the output geomet...
~QmitkMappingJob() override
Destructor.
mitk::DataNode::Pointer m_spRegNode
Data node containing the mitk::MAPRegistrationWrapper to use for mapping.
const mitk::PointSet * GetInputDataAsPointSet() const
::itk::MemberCommand< QmitkMappingJob >::Pointer m_spCommand
mitk::NodeUIDType m_InputDataUID
UID of the input data node for provenance tracking.
const map::core::RegistrationBase * GetRegistration() const
Returns the MatchPoint registration extracted from the registration data node.
void OnMapAlgorithmEvent(::itk::Object *, const itk::EventObject &event)
const mitk::Image * GetInputDataAsImage() const
QmitkMappingJob()
Default constructor. Initializes with default mapping settings.
void Error(QString err)
Emitted when an error occurs during mapping.
mitk::BaseData::Pointer m_spMappedData
void MapResultIsAvailable(mitk::BaseData::Pointer spMappedData, const QmitkMappingJob *job)
Emitted when the mapped result data is available.
mitk::BaseData::ConstPointer m_spInputData
The input data to be mapped (image, point set, or multi-label segmentation).
void run() override
Executes the mapping or geometry refinement operation.
void AlgorithmInfo(QString info)
Emitted for general MatchPoint algorithm event messages during mapping.
unsigned long m_ObserverID
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
Data structure which stores a set of points.
Definition: mitkPointSet.h:71
std::string NodeUIDType
Type alias for node/data UID strings.
Definition: mitkUIDHelper.h:34
Settings structure controlling the behavior of a mapping (image/point set transformation) job.
bool m_doGeometryRefinement
If true, the mapper refines the image geometry instead of performing a full pixel-wise mapping.
double m_paddingValue
Value assigned to undefined pixels. Only relevant if m_allowUndefPixels is true.
std::string m_MappedName
Display name for the mapped result.
std::string m_InterpolatorLabel
Human-readable display name of the selected interpolation method.
double m_errorValue
Value assigned to unregistered pixels. Only relevant if m_allowUnregPixels is true.
bool m_allowUndefPixels
If true, undefined pixels (outside the field of view) are allowed and filled with m_paddingValue....
mitk::ImageMappingInterpolator::Type m_InterpolatorType
Interpolation method used for image mapping. Only relevant for images when m_doGeometryRefinement is ...
bool m_allowUnregPixels
If true, pixels not covered by the registration are allowed and filled with m_errorValue....
QmitkMappingJobSettings()
Constructs default mapping job settings.