Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLCrosshairNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLCrosshairNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLCrosshairNode_h
16 #define __vtkMRMLCrosshairNode_h
17 
18 #include "vtkMRMLNode.h"
19 #include "vtkMRMLSliceNode.h"
20 
25 class VTK_MRML_EXPORT vtkMRMLCrosshairNode : public vtkMRMLNode
26 {
27  public:
28  static vtkMRMLCrosshairNode *New();
30  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
31 
34  enum
35  {
36  CursorPositionModifiedEvent = 22000
37  };
38 
39  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
40 
43  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
44 
47  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
48 
51  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
52 
55  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "Crosshair";};
56 
59  vtkGetMacro (CrosshairMode, int );
60  vtkSetMacro (CrosshairMode, int );
61  vtkGetMacro (CrosshairBehavior, int );
62  vtkSetMacro (CrosshairBehavior, int );
63  vtkSetClampMacro (CrosshairThickness, int, 1, 3);
64  vtkGetMacro (CrosshairThickness, int);
65  void SetCrosshairToFine() { this->SetCrosshairThickness(1); }
66  void SetCrosshairToMedium() { this->SetCrosshairThickness(2); }
67  void SetCrosshairToThick() { this->SetCrosshairThickness(3); }
68 
76  void SetCursorPositionRAS(double ras[3]);
77 
82  void SetCursorPositionXYZ(double xyz[3], vtkMRMLSliceNode *sliceNode);
83 
85  void SetCursorPositionInvalid();
86 
91  bool GetCursorPositionRAS(double ras[3]);
92 
97  vtkMRMLSliceNode* GetCursorPositionXYZ(double xyz[3]);
98 
101  vtkSetVector3Macro(CrosshairRAS, double);
102  vtkGetVector3Macro(CrosshairRAS, double);
103 
106  void SetCrosshairRAS(double ras[3], int id);
107 
109  vtkGetMacro(LightBoxPane, int);
110 
111 
114  vtkSetMacro(Navigation, int);
115  vtkGetMacro(Navigation, int);
116  vtkBooleanMacro(Navigation, int);
117 
120  void SetCrosshairName(const char *name) {
121  this->SetSingletonTag(name);
122  }
124  return this->GetSingletonTag();
125  }
126 
128  enum
129  {
130  NoCrosshair = 0,
136  ShowSmallIntersection
137  };
138  enum
139  {
140  Fine = 1,
142  Thick
143  };
145  enum
146  {
147  NoAction = 0,
148  OffsetJumpSlice = 1,
149  CenteredJumpSlice = 2,
150  Normal = 1, // Deprecated
151  JumpSlice = 1 // Deprecated
152  };
153 
154 protected:
158  void operator=(const vtkMRMLCrosshairNode&);
159 
163 
165 
166  double CrosshairRAS[3];
168 
171  double CursorPositionRAS[3];
174  double CursorPositionXYZ[3];
178  vtkWeakPointer<vtkMRMLSliceNode> CursorSliceNode;
179 
182 };
183 
184 #endif
185 
MRML node for storing a slice through RAS space.
MRML node for storing a crosshair through RAS space.
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
void SetCrosshairName(const char *name)
Name of the layout.
virtual char * GetSingletonTag()
vtkWeakPointer< vtkMRMLSliceNode > CursorSliceNode
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135
virtual void SetSingletonTag(const char *)
Tag that make this node a singleton in the scene.
bool CursorPositionRASValid
Set to false if the cursor is not in a view.