Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkDisplayCoordinateOperation.cpp
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 
18 
20  mitk::BaseRenderer *renderer,
21  const mitk::Point2D &startDisplayCoordinate,
22  const mitk::Point2D &lastDisplayCoordinate,
23  const mitk::Point2D &currentDisplayCoordinate)
24  : mitk::Operation(operationType),
25  m_Renderer(renderer),
26  m_StartDisplayCoordinate(startDisplayCoordinate),
27  m_LastDisplayCoordinate(lastDisplayCoordinate),
28  m_CurrentDisplayCoordinate(currentDisplayCoordinate)
29 {
30 }
31 
33  mitk::BaseRenderer *renderer,
34  const mitk::Point2D &startDisplayCoordinate,
35  const mitk::Point2D &lastDisplayCoordinate,
36  const mitk::Point2D &currentDisplayCoordinate,
37  const mitk::Point2D &startCoordinateInMM)
38  : mitk::Operation(operationType),
39  m_Renderer(renderer),
40  m_StartDisplayCoordinate(startDisplayCoordinate),
41  m_LastDisplayCoordinate(lastDisplayCoordinate),
42  m_CurrentDisplayCoordinate(currentDisplayCoordinate),
43  m_StartCoordinateInMM(startCoordinateInMM)
44 {
45 }
46 
48 {
49 }
50 
52 {
53  return m_Renderer;
54 }
55 
57 {
58  return m_CurrentDisplayCoordinate - m_LastDisplayCoordinate;
59 }
60 
62 {
63  return m_CurrentDisplayCoordinate - m_StartDisplayCoordinate;
64 }
65 
67 {
68  return m_LastDisplayCoordinate - m_StartDisplayCoordinate;
69 }
Base class of all Operation-classes.
Definition: mitkOperation.h:33
Organizes the rendering process.
DisplayCoordinateOperation(mitk::OperationType operationType, mitk::BaseRenderer *renderer, const mitk::Point2D &startDisplayCoordinate, const mitk::Point2D &lastDisplayCoordinate, const mitk::Point2D &currentDisplayCoordinate)
DataCollection - Class to facilitate loading/accessing structured data.
int OperationType
Definition: mitkOperation.h:27