Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLSliceViewInteractorStyle.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: $RCSfile: vtkMRMLSliceViewInteractorStyle.h,v $
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or https://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
16 #ifndef __vtkMRMLSliceViewInteractorStyle_h
17 #define __vtkMRMLSliceViewInteractorStyle_h
18 
19 // VTK includes
20 #include "vtkWeakPointer.h"
21 
22 // MRML includes
23 #include "vtkMRMLDisplayableManagerExport.h"
25 
30 class vtkMRMLSliceLogic;
31 class vtkTimerLog;
32 
42 class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLSliceViewInteractorStyle :
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
53  bool DelegateInteractionEventToDisplayableManagers(vtkEventData* inputEventData) override;
54 
56 
58  enum
59  {
60  None = 0,
61  Translate = 1,
62  Zoom = 2,
63  Rotate = 4, /* Rotate not currently used */
64  Blend = 8, /* fg to bg, labelmap to bg */
65  AdjustWindowLevelBackground = 16,
66  AdjustWindowLevelForeground = 32,
67  BrowseSlice = 64,
68  ShowSlice = 128,
69  AdjustLightbox = 256, /* not used */
70  SelectVolume = 512,
71  SetCursorPosition = 1024, /* adjust cursor position in crosshair node as mouse is moved */
72  SetCrosshairPosition = 2048,
73  TranslateSliceIntersection = 4096,
74  RotateSliceIntersection = 8192,
75  AllActionsMask = Translate | Zoom | Rotate | Blend | AdjustWindowLevelBackground | AdjustWindowLevelForeground
76  | BrowseSlice | ShowSlice | AdjustLightbox | SelectVolume | SetCursorPosition | SetCrosshairPosition
77  | TranslateSliceIntersection | RotateSliceIntersection
78  };
79 
84  void SetActionEnabled(int actionsMask, bool enable = true);
87  bool GetActionEnabled(int actionsMask);
88 
91  void SetSliceLogic(vtkMRMLSliceLogic* SliceLogic);
92  vtkGetObjectMacro(SliceLogic, vtkMRMLSliceLogic);
93 
94  vtkMRMLCrosshairDisplayableManager* GetCrosshairDisplayableManager();
95 
96  vtkMRMLScalarBarDisplayableManager* GetScalarBarDisplayableManager();
97 
98 protected:
101 
102  static void SliceViewProcessEvents(vtkObject* object, unsigned long event, void* clientdata, void* calldata);
103 
104  void SetMouseCursor(int cursor);
105 
107 
109 
110 private:
112  void operator=(const vtkMRMLSliceViewInteractorStyle&) = delete;
113 };
114 
115 #endif
void SetMouseCursor(int cursor)
Superclass for displayable manager classes.
void PrintSelf(ostream &os, vtkIndent indent) override
virtual bool DelegateInteractionEventToDisplayableManagers(unsigned long event)
Common base class for processing interaction events in MRML views.
MRML node for representing segmentation display attributes.
static vtkMRMLViewInteractorStyle * New()
Displayable manager for window/level adjustment of volumes.
Provides customizable interaction routines.
Slicer logic class for slice manipulation.
Displayable manager for the crosshair on slice (2D) views.