Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkInteractionSchemeSwitcher.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 MITKINTERACTIONSCHEMESWITCHER_H
14 #define MITKINTERACTIONSCHEMESWITCHER_H
15 
16 #include "MitkCoreExports.h"
17 
19 
20 #include <itkObject.h>
21 
22 namespace mitk
23 {
24  /***********************************************************************
25  *
26  * \brief Class that offers a convenient way to switch between different
27  * interaction schemes and their different modes.
28  *
29  * This class offers the possibility to switch between the two different
30  * interaction schemes that are available:
31  *
32  * - MITK : The original interaction scheme
33  * - left mouse button : setting the cross position in the MPR view
34  * - middle mouse button : panning
35  * - right mouse button : zooming
36  *
37  * There are 3 different MITK modes that are available in the MITK scheme.
38  *
39  * - PACS : An alternative interaction scheme that behaves more like a
40  * PACS workstation
41  * - left mouse button : behavior depends on current MouseMode
42  * - middle mouse button : fast scrolling
43  * - right mouse button : level-window
44  * - ctrl + right button : zooming
45  * - shift+ right button : panning
46  *
47  * There are 5 different PACS modes that are available in the PACS scheme.
48  * Each mode defines the interaction that is performed on a left
49  * mouse button click:
50  * - Pointer : sets the cross position for the MPR
51  * - Scroll
52  * - Level-Window
53  * - Zoom
54  * - Pan
55  *
56  * When the interaction scheme is changed, this class sets the corresponding
57  * interaction .xml-files for a given interaction event handler.
58  *
59  ***********************************************************************/
60  class MITKCORE_EXPORT InteractionSchemeSwitcher : public itk::Object
61  {
62  public:
63 #pragma GCC visibility push(default)
64 
67  itkEventMacro(InteractionSchemeChangedEvent, itk::AnyEvent);
68 #pragma GCC visibility pop
69 
71  itkFactorylessNewMacro(Self);
72  itkCloneMacro(Self);
73 
74  // enum of the different interaction schemes that are available
76  {
77  MITKStandard = 0,
85  PACSZoom
86  };
87 
103  void SetInteractionScheme(mitk::InteractionEventHandler* interactionEventHandler, InteractionScheme interactionScheme);
109  InteractionScheme GetInteractionScheme() const { return m_InteractionScheme; };
110 
111  protected:
112 
114  ~InteractionSchemeSwitcher() override;
115 
116  private:
117 
118  InteractionScheme m_InteractionScheme;
119  };
120 } // namespace mitk
121 
122 #endif // MITKINTERACTIONSCHEMESWITCHER_H
InteractionScheme GetInteractionScheme() const
Return the current interaction scheme.
#define MITKCORE_EXPORT
itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent)
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49