Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLCrosshairDisplayableManager.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Kitware Inc.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 This file was originally developed by Julien Finet, Kitware Inc.
17 and was partially funded by NIH grant 3P41RR013218-12S1
18
19==============================================================================*/
20
21#ifndef __vtkMRMLCrosshairDisplayableManager_h
22#define __vtkMRMLCrosshairDisplayableManager_h
23
24// MRMLDisplayableManager includes
26#include "vtkMRMLDisplayableManagerExport.h"
27
29class vtkMRMLScene;
31
35class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLCrosshairDisplayableManager :
37{
38public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
44 // Utility functions (used by 2D and 3D crosshair displayable managers)
46
47 bool CanProcessInteractionEvent(vtkMRMLInteractionEventData* eventData, double &closestDistance2) override;
49
50 void SetActionsEnabled(int actions);
52
54
56 int GetMouseCursor() override;
57
58 // Called to notify the displayable manager that it has got or lost the focus.
59 void SetHasFocus(bool hasFocus, vtkMRMLInteractionEventData* eventData) override;
60
61protected:
64
67 void Create() override;
68
71
73 void AdditionalInitializeStep() override;
74
75private:
77 void operator=(const vtkMRMLCrosshairDisplayableManager&) = delete;
78
79 void UnobserveMRMLScene() override;
80 void ObserveMRMLScene() override;
81 void UpdateFromMRMLScene() override;
82 void OnMRMLNodeModified(vtkMRMLNode* node) override;
83
84 class vtkInternal;
85 vtkInternal * Internal;
86};
87
88#endif
virtual void OnMRMLNodeModified(vtkMRMLNode *)
virtual void UpdateFromMRMLScene()
virtual void UnobserveMRMLScene()
virtual void ObserveMRMLScene()
vtkMRMLSliceIntersectionWidget * GetSliceIntersectionWidget()
bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &closestDistance2) override
static vtkMRMLCrosshairDisplayableManager * New()
int GetMouseCursor() override
Displayable manager returns ID of the mouse cursor shape that should be displayed.
void PrintSelf(ostream &os, vtkIndent indent) override
void SetHasFocus(bool hasFocus, vtkMRMLInteractionEventData *eventData) override
Set if the widget gets/loses focus (interaction events are processed by this displayable manager).
bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData) override
void OnMRMLSliceNodeModifiedEvent() override
Called when the SliceNode is modified. May cause Crosshair to remap its position on screen.
static vtkMRMLCrosshairNode * FindCrosshairNode(vtkMRMLScene *scene)
void AdditionalInitializeStep() override
Method to perform additional initialization.
MRML node for storing a crosshair through RAS space.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.