Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkDisplayInteractor.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,
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 
17 #ifndef mitkDisplayInteractor_h
18 #define mitkDisplayInteractor_h
19 
21 #include <MitkCoreExports.h>
22 
23 namespace mitk
24 {
38  {
39  public:
40  mitkClassMacro(DisplayInteractor, EventStateMachine) itkFactorylessNewMacro(Self) itkCloneMacro(Self)
47  virtual void Notify(InteractionEvent *interactionEvent, bool isHandled) override;
48 
49  protected:
51  virtual ~DisplayInteractor();
57  void ConnectActionsAndFunctions() override;
64  virtual void ConfigurationChanged() override;
65 
72  virtual bool FilterEvents(InteractionEvent *interactionEvent, DataNode *dataNode) override;
73 
74  virtual bool CheckPositionEvent(const InteractionEvent *interactionEvent);
75 
76  virtual bool CheckRotationPossible(const InteractionEvent *interactionEvent);
77 
78  virtual bool CheckSwivelPossible(const InteractionEvent *interactionEvent);
79 
83  virtual void Init(StateMachineAction *, InteractionEvent *);
87  virtual void Move(StateMachineAction *, InteractionEvent *);
88 
92  virtual void SetCrosshair(StateMachineAction *, InteractionEvent *);
93 
100  virtual void Zoom(StateMachineAction *, InteractionEvent *);
107  virtual void Scroll(StateMachineAction *, InteractionEvent *);
111  virtual void ScrollOneDown(StateMachineAction *, InteractionEvent *);
115  virtual void ScrollOneUp(StateMachineAction *, InteractionEvent *);
119  virtual void AdjustLevelWindow(StateMachineAction *, InteractionEvent *);
120 
124  virtual void StartRotation(StateMachineAction *, InteractionEvent *);
125 
129  virtual void EndRotation(StateMachineAction *, InteractionEvent *);
130 
134  virtual void Rotate(StateMachineAction *, InteractionEvent *event);
135 
136  virtual void Swivel(StateMachineAction *, InteractionEvent *event);
137 
141  virtual void UpdateStatusbar(StateMachineAction *, InteractionEvent *event);
142 
147  bool GetBoolProperty(mitk::PropertyList::Pointer propertyList, const char *propertyName, bool defaultValue);
148 
149  // Typedefs
151 
152  private:
153  mitk::DataNode::Pointer GetTopLayerNode(mitk::DataStorage::SetOfObjects::ConstPointer nodes,
154  mitk::Point3D worldposition,
155  BaseRenderer *ren);
156 
166  void UpdateStatusBar(itk::SmartPointer<mitk::Image> image3D, itk::Index<3> idx, TimeStepType time=0, int component=0);
167 
168 
172  mitk::Point2D m_StartCoordinateInMM;
176  mitk::Point2D m_LastDisplayCoordinate;
180  mitk::Point2D m_LastCoordinateInMM;
184  mitk::Point2D m_CurrentDisplayCoordinate;
185 
186 
197  int m_IndexToSliceModifier;
198 
202  bool m_AutoRepeat;
203 
208  std::string m_ScrollDirection;
209 
213  bool m_InvertScrollDirection;
214 
219  std::string m_ZoomDirection;
220 
224  bool m_InvertZoomDirection;
225 
229  bool m_InvertMoveDirection;
230 
235  std::string m_LevelDirection;
236 
240  bool m_InvertLevelWindowDirection;
241 
246  bool m_AlwaysReact;
250  float m_ZoomFactor;
251 
253 
257  bool m_LinkPlanes;
258 
259  SNCVector m_RotatableSNCs;
260  SNCVector
261  m_SNCsToBeRotated;
262 
263  Point3D m_LastCursorPosition;
264  Point3D m_CenterOfRotation;
265 
266  Point2D m_ReferenceCursor;
267 
268  Vector3D m_RotationPlaneNormal;
269  Vector3D m_RotationPlaneXVector;
270  Vector3D m_RotationPlaneYVector;
271 
272  Vector3D m_PreviousRotationAxis;
273  ScalarType m_PreviousRotationAngle;
274  };
275 }
276 #endif
Data management class that handles 'was created by' relations.
Base class to implement InteractionEventObservers.
#define MITKCORE_EXPORT
Observer that manages the interaction with the display.
double ScalarType
Organizes the rendering process.
STL namespace.
DataCollection - Class to facilitate loading/accessing structured data.
Key-value list holding instances of BaseProperty.
Controls the selection of the slice the associated BaseRenderer will display.
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
virtual void ConnectActionsAndFunctions() override
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:44
Image class for storing images.
Definition: mitkImage.h:76
std::vcl_size_t TimeStepType
std::vector< SliceNavigationController * > SNCVector
Class for nodes of the DataTree.
Definition: mitkDataNode.h:66
Super-class that provides the functionality of a StateMachine to DataInteractors. ...