Medical Imaging Interaction Toolkit  2018.4.99-12ad79a3
Medical Imaging Interaction Toolkit
mitkInteractionPositionEvent.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 #include <string>
15 
17  const mitk::Point2D &mousePosition)
18  : InteractionEvent(baseRenderer), m_PointerPosition(mousePosition)
19 {
20 }
21 
23 {
24  return m_PointerPosition;
25 }
26 
28 {
29  Point3D worldPos;
30  this->GetSender()->DisplayToWorld(m_PointerPosition, worldPos);
31  return worldPos;
32 }
33 
35 {
36  return Superclass::IsEqual(other);
37 }
38 
40 {
41 }
42 
44 {
45  return (dynamic_cast<InteractionPositionEvent *>(baseClass.GetPointer()) != nullptr);
46 }
void DisplayToWorld(const Point2D &displayPoint, Point3D &worldIndex) const
This method converts a display point to the 3D world index using the geometry of the renderWindow...
Organizes the rendering process.
virtual bool IsEqual(const InteractionEvent &other) const
BaseRenderer * GetSender() const
bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const override
InteractionPositionEvent(BaseRenderer *baseRenderer, const Point2D &mousePosition)
bool IsEqual(const InteractionEvent &) const override