Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkMouseModeSwitcher.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 MITKMouseModeSwitcher_H_HEADER_INCLUDED_C10DC4EB
14
#define MITKMouseModeSwitcher_H_HEADER_INCLUDED_C10DC4EB
15
16
#include "
MitkCoreExports.h
"
17
#include "
mitkDisplayInteractor.h
"
18
#include <itkObject.h>
19
20
namespace
mitk
21
{
22
/***********************************************************************
23
*
24
* \brief Class that offers a convenient way to switch between different
25
* interaction schemes
26
*
27
* This class offers the possibility to switch between the two different
28
* interaction schemes that are available:
29
* - MITK : The original interaction scheme
30
* - left mouse button : setting the cross position in the MPR view
31
* - middle mouse button : panning
32
* - right mouse button : zooming
33
*
34
*
35
* - PACS : an alternative interaction scheme that behaves more like a
36
* PACS workstation
37
* - left mouse button : behavior depends on current MouseMode
38
* - middle mouse button : fast scrolling
39
* - right mouse button : level-window
40
* - ctrl + right button : zooming
41
* - shift+ right button : panning
42
*
43
* There are 5 different MouseModes that are available in the PACS scheme.
44
* Each MouseMode defines the interaction that is performed on a left
45
* mouse button click:
46
* - Pointer : sets the cross position for the MPR
47
* - Scroll
48
* - Level-Window
49
* - Zoom
50
* - Pan
51
*
52
* When the interaction scheme or the MouseMode is changed, this class
53
* manages the adding and removing of the relevant listeners offering
54
* a convenient way to modify the interaction behavior.
55
*
56
***********************************************************************/
57
class
MITKCORE_EXPORT
MouseModeSwitcher
:
public
itk::Object
58
{
59
public
:
60
#pragma GCC visibility push(default)
61
64
itkEventMacro
(MouseModeChangedEvent, itk::AnyEvent);
65
#pragma GCC visibility pop
66
67
mitkClassMacroItkParent
(
MouseModeSwitcher
, itk::Object);
68
itkFactorylessNewMacro(
Self
);
69
itkCloneMacro(
Self
);
70
71
// enum of the different interaction schemes that are available
72
enum
InteractionScheme
{
73
PACS = 0,
74
MITK = 1,
75
ROTATION = 2,
76
ROTATIONLINKED = 3,
77
SWIVEL = 4
78
};
79
80
// enum of available mouse modes for PACS interaction scheme
81
enum
MouseMode
82
{
83
MousePointer = 0,
84
Scroll
,
85
LevelWindow
,
86
Zoom
,
87
Pan
88
};
89
93
void
SetInteractionScheme(
InteractionScheme
);
94
98
void
SelectMouseMode(
MouseMode
mode);
99
103
MouseMode
GetCurrentMouseMode()
const
;
104
105
protected
:
106
MouseModeSwitcher
();
107
~
MouseModeSwitcher
()
override
;
108
109
private
:
113
void
InitializeListeners();
114
115
InteractionScheme
m_ActiveInteractionScheme;
116
MouseMode
m_ActiveMouseMode;
117
DisplayInteractor::Pointer
m_CurrentObserver;
118
123
us::ServiceRegistration<InteractionEventObserver>
m_ServiceRegistration;
124
};
125
}
// namespace mitk
126
127
#endif
/* MITKMouseModeSwitcher_H_HEADER_INCLUDED_C10DC4EB */
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition:
MitkCoreExports.h:15
mitk::itkEventMacro
itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent)
mitk::MouseModeSwitcher::Scroll
Definition:
mitkMouseModeSwitcher.h:84
mitk::MouseModeSwitcher::LevelWindow
Definition:
mitkMouseModeSwitcher.h:85
mitk::MouseModeSwitcher::InteractionScheme
InteractionScheme
Definition:
mitkMouseModeSwitcher.h:72
MitkCoreExports.h
mitk::MouseModeSwitcher::Zoom
Definition:
mitkMouseModeSwitcher.h:86
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition:
GeometryOverview.dox:1
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition:
mitkCommon.h:49
us::ServiceRegistration
Definition:
usServiceRegistration.h:48
itk::SmartPointer< Self >
mitk::MouseModeSwitcher
Definition:
mitkMouseModeSwitcher.h:57
mitkDisplayInteractor.h
mitk::MouseModeSwitcher::MouseMode
MouseMode
Definition:
mitkMouseModeSwitcher.h:81
Source
Modules
Core
include
mitkMouseModeSwitcher.h
Generated on Thu Mar 12 2020 10:23:56 for Medical Imaging Interaction Toolkit by
1.8.13