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