Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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
14 #define mitkDisplayCoordinateOperation_h
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 information 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
mitk::Operation
Base class of all Operation-classes.
Definition: mitkOperation.h:29
mitk::DisplayCoordinateOperation
Operation with information necessary for operations of DisplayVectorInteractor.
Definition: mitkDisplayCoordinateOperation.h:32
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Vector< ScalarType, 2 >
mitkGetMacro
#define mitkGetMacro(name, type)
Definition: mitkDisplayCoordinateOperation.h:22
MitkCoreExports.h
mitk::Point< ScalarType, 2 >
mitkNumericTypes.h
mitk::OperationType
int OperationType
Definition: mitkOperation.h:23
mitkWeakPointer.h
mitkOperation.h
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
mitkBaseRenderer.h
mitk::WeakPointer< mitk::BaseRenderer >
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15