Slicer  4.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
29 class vtkMRMLScene;
31 
35 class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkMRMLCrosshairDisplayableManager :
37 {
38 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44  // Utility functions (used by 2D and 3D crosshair displayable managers)
45  static vtkMRMLCrosshairNode* FindCrosshairNode(vtkMRMLScene* scene);
46 
47  bool CanProcessInteractionEvent(vtkMRMLInteractionEventData* eventData, double &closestDistance2) override;
48  bool ProcessInteractionEvent(vtkMRMLInteractionEventData* eventData) override;
49 
50  void SetActionsEnabled(int actions);
51  int GetActionsEnabled();
52 
53  vtkMRMLSliceIntersectionWidget* GetSliceIntersectionWidget();
54 
55 protected:
58 
61  void Create() override;
62 
64  void OnMRMLSliceNodeModifiedEvent() override;
65 
67  void AdditionalInitializeStep() override;
68 
69 private:
71  void operator=(const vtkMRMLCrosshairDisplayableManager&) = delete;
72 
73  void UnobserveMRMLScene() override;
74  void ObserveMRMLScene() override;
75  void UpdateFromMRMLScene() override;
76  void OnMRMLNodeModified(vtkMRMLNode* node) override;
77 
78  class vtkInternal;
79  vtkInternal * Internal;
80 };
81 
82 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
MRML node for storing a crosshair through RAS space.
virtual void OnMRMLNodeModified(vtkMRMLNode *)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
virtual bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData)
virtual void UnobserveMRMLScene()
virtual void ObserveMRMLScene()
virtual bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2)
static vtkMRMLAbstractSliceViewDisplayableManager * New()
virtual void UpdateFromMRMLScene()
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
Displayable manager for the crosshair on slice (2D) views.
virtual void OnMRMLSliceNodeModifiedEvent()
Could be overloaded if DisplayableManager subclass.