Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
31class vtkTimerLog;
32
42class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLSliceViewInteractorStyle :
44{
45public:
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
92 vtkGetObjectMacro(SliceLogic, vtkMRMLSliceLogic);
93
95
97
98protected:
101
102 static void SliceViewProcessEvents(vtkObject* object, unsigned long event, void* clientdata, void* calldata);
103
104 void SetMouseCursor(int cursor);
105
107
109
110private:
112 void operator=(const vtkMRMLSliceViewInteractorStyle&) = delete;
113};
114
115#endif
Superclass for displayable manager classes.
Displayable manager for the crosshair on slice (2D) views.
Displayable manager for window/level adjustment of volumes.
MRML node for representing segmentation display attributes.
Slicer logic class for slice manipulation.
Provides customizable interaction routines.
static vtkMRMLSliceViewInteractorStyle * New()
static void SliceViewProcessEvents(vtkObject *object, unsigned long event, void *clientdata, void *calldata)
void SetActionEnabled(int actionsMask, bool enable=true)
bool DelegateInteractionEventToDisplayableManagers(vtkEventData *inputEventData) override
vtkMRMLCrosshairDisplayableManager * GetCrosshairDisplayableManager()
bool GetActionEnabled(int actionsMask)
void SetSliceLogic(vtkMRMLSliceLogic *SliceLogic)
Get/Set the SliceLogic.
vtkMRMLScalarBarDisplayableManager * GetScalarBarDisplayableManager()
void PrintSelf(ostream &os, vtkIndent indent) override
Common base class for processing interaction events in MRML views.
virtual bool DelegateInteractionEventToDisplayableManagers(unsigned long event)