Medical Imaging Interaction Toolkit  2021.10.99-ca5e1261
Medical Imaging Interaction Toolkit
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 (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 mitkDisplayInteractor_h
14 #define mitkDisplayInteractor_h
15 
17 #include <MitkCoreExports.h>
18 
19 namespace mitk
20 {
34  {
35  public:
36 
38 
39  itkFactorylessNewMacro(Self);
40 
41  itkCloneMacro(Self)
48  void Notify(InteractionEvent *interactionEvent, bool isHandled) override;
49 
50  protected:
51 
53  ~DisplayInteractor() override;
59  void ConnectActionsAndFunctions() override;
66  void ConfigurationChanged() override;
67 
74  bool FilterEvents(InteractionEvent *interactionEvent, DataNode *dataNode) override;
75 
76  virtual bool CheckPositionEvent(const InteractionEvent *interactionEvent);
77 
78  virtual bool CheckRotationPossible(const InteractionEvent *interactionEvent);
79 
80  virtual bool CheckSwivelPossible(const InteractionEvent *interactionEvent);
81 
85  virtual void Init(StateMachineAction *, InteractionEvent *);
89  virtual void Move(StateMachineAction *, InteractionEvent *);
90 
94  virtual void SetCrosshair(StateMachineAction *, InteractionEvent *);
95 
99  virtual void IncreaseTimeStep(StateMachineAction *, InteractionEvent *);
100 
104  virtual void DecreaseTimeStep(StateMachineAction *, InteractionEvent *);
105 
112  virtual void Zoom(StateMachineAction *, InteractionEvent *);
119  virtual void Scroll(StateMachineAction *, InteractionEvent *);
123  virtual void ScrollOneDown(StateMachineAction *, InteractionEvent *);
127  virtual void ScrollOneUp(StateMachineAction *, InteractionEvent *);
131  virtual void AdjustLevelWindow(StateMachineAction *, InteractionEvent *);
132 
136  virtual void StartRotation(StateMachineAction *, InteractionEvent *);
137 
141  virtual void EndRotation(StateMachineAction *, InteractionEvent *);
142 
146  virtual void Rotate(StateMachineAction *, InteractionEvent *event);
147 
148  virtual void Swivel(StateMachineAction *, InteractionEvent *event);
149 
153  virtual void UpdateStatusbar(StateMachineAction *, InteractionEvent *event);
154 
159  bool GetBoolProperty(mitk::PropertyList::Pointer propertyList, const char *propertyName, bool defaultValue);
160 
161  private:
171  void UpdateStatusBar(itk::SmartPointer<mitk::Image> image3D, itk::Index<3> idx, TimeStepType time=0, int component=0);
172 
173 
177  mitk::Point2D m_StartCoordinateInMM;
181  mitk::Point2D m_LastDisplayCoordinate;
185  mitk::Point2D m_LastCoordinateInMM;
189  mitk::Point2D m_CurrentDisplayCoordinate;
190 
191 
202  int m_IndexToSliceModifier;
203 
207  bool m_AutoRepeat;
208 
213  std::string m_ScrollDirection;
214 
218  bool m_InvertScrollDirection;
219 
224  std::string m_ZoomDirection;
225 
229  bool m_InvertZoomDirection;
230 
234  bool m_InvertMoveDirection;
235 
240  std::string m_LevelDirection;
241 
245  bool m_InvertLevelWindowDirection;
246 
251  bool m_AlwaysReact;
255  float m_ZoomFactor;
256 
258 
262  bool m_LinkPlanes;
263 
264  typedef std::vector<SliceNavigationController*> SNCVector;
265  SNCVector m_RotatableSNCs;
266  SNCVector m_SNCsToBeRotated;
267 
268  Point3D m_LastCursorPosition;
269  Point3D m_CenterOfRotation;
270 
271  Point2D m_ReferenceCursor;
272 
273  Vector3D m_RotationPlaneNormal;
274  Vector3D m_RotationPlaneXVector;
275  Vector3D m_RotationPlaneYVector;
276 
277  Vector3D m_PreviousRotationAxis;
278  ScalarType m_PreviousRotationAngle;
279  };
280 }
281 #endif
Base class to implement InteractionEventObservers.
#define MITKCORE_EXPORT
Observer that manages the interaction with the display.
double ScalarType
DataCollection - Class to facilitate loading/accessing structured data.
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
std::vcl_size_t TimeStepType
Class for nodes of the DataTree.
Definition: mitkDataNode.h:57
Super-class that provides the functionality of a StateMachine to DataInteractors. ...