Medical Imaging Interaction Toolkit  2021.10.99-1c4db16f
Medical Imaging Interaction Toolkit
mitkDisplayCoordinateOperation.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 MITKDISPLAYCOORDINATEOPERATION_H_HEADER_INCLUDED_C10E33D0
14 #define MITKDISPLAYCOORDINATEOPERATION_H_HEADER_INCLUDED_C10E33D0
15 
16 #include "mitkBaseRenderer.h"
17 #include "mitkNumericTypes.h"
18 #include "mitkOperation.h"
19 #include <MitkCoreExports.h>
20 #include <mitkWeakPointer.h>
21 
22 #define mitkGetMacro(name, type) \
23  virtual type Get##name() { return this->m_##name; }
24 namespace mitk
25 {
26  // TODO Legacy , no longer necessary when after migrating all DisplayInteractions to new Interactions.
27  // Coordinate supplier can probably also be removed then.
28 
29  //##Documentation
30  //## @brief Operation with informations necessary for operations of DisplayVectorInteractor
31  //## @ingroup Undo
33  {
34  public:
36  mitk::BaseRenderer *renderer,
37  const mitk::Point2D &startDisplayCoordinate,
38  const mitk::Point2D &lastDisplayCoordinate,
39  const mitk::Point2D &currentDisplayCoordinate);
40 
42  mitk::BaseRenderer *renderer,
43  const mitk::Point2D &startDisplayCoordinate,
44  const mitk::Point2D &lastDisplayCoordinate,
45  const mitk::Point2D &currentDisplayCoordinate,
46  const mitk::Point2D &startCoordinateInMM);
47 
48  ~DisplayCoordinateOperation() override;
49 
50  mitk::BaseRenderer *GetRenderer();
51 
52  mitkGetMacro(StartDisplayCoordinate, mitk::Point2D);
53  mitkGetMacro(LastDisplayCoordinate, mitk::Point2D);
54  mitkGetMacro(CurrentDisplayCoordinate, mitk::Point2D);
55  mitkGetMacro(StartCoordinateInMM, mitk::Point2D);
56 
57  mitk::Vector2D GetLastToCurrentDisplayVector();
58  mitk::Vector2D GetStartToCurrentDisplayVector();
59  mitk::Vector2D GetStartToLastDisplayVector();
60 
61  private:
63 
64  const mitk::Point2D m_StartDisplayCoordinate;
65  const mitk::Point2D m_LastDisplayCoordinate;
66  const mitk::Point2D m_CurrentDisplayCoordinate;
67  const mitk::Point2D m_StartCoordinateInMM;
68  };
69 }
70 
71 #endif /* MITKDISPLAYCOORDINATEOPERATION_H_HEADER_INCLUDED_C10E33D0 */
#define MITKCORE_EXPORT
Base class of all Operation-classes.
Definition: mitkOperation.h:29
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
Operation with informations necessary for operations of DisplayVectorInteractor.
int OperationType
Definition: mitkOperation.h:23
#define mitkGetMacro(name, type)