Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
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 (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 
14 
16  mitk::BaseRenderer *renderer,
17  const mitk::Point2D &startDisplayCoordinate,
18  const mitk::Point2D &lastDisplayCoordinate,
19  const mitk::Point2D &currentDisplayCoordinate)
20  : mitk::Operation(operationType),
21  m_Renderer(renderer),
22  m_StartDisplayCoordinate(startDisplayCoordinate),
23  m_LastDisplayCoordinate(lastDisplayCoordinate),
24  m_CurrentDisplayCoordinate(currentDisplayCoordinate)
25 {
26 }
27 
29  mitk::BaseRenderer *renderer,
30  const mitk::Point2D &startDisplayCoordinate,
31  const mitk::Point2D &lastDisplayCoordinate,
32  const mitk::Point2D &currentDisplayCoordinate,
33  const mitk::Point2D &startCoordinateInMM)
34  : mitk::Operation(operationType),
35  m_Renderer(renderer),
36  m_StartDisplayCoordinate(startDisplayCoordinate),
37  m_LastDisplayCoordinate(lastDisplayCoordinate),
38  m_CurrentDisplayCoordinate(currentDisplayCoordinate),
39  m_StartCoordinateInMM(startCoordinateInMM)
40 {
41 }
42 
44 {
45 }
46 
48 {
49  return m_Renderer.Lock();
50 }
51 
53 {
54  return m_CurrentDisplayCoordinate - m_LastDisplayCoordinate;
55 }
56 
58 {
59  return m_CurrentDisplayCoordinate - m_StartDisplayCoordinate;
60 }
61 
63 {
64  return m_LastDisplayCoordinate - m_StartDisplayCoordinate;
65 }
itk::SmartPointer< T > Lock() const
Base class of all Operation-classes.
Definition: mitkOperation.h:29
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:23