Slicer  4.11
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
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) override;
31 
34  enum
35  {
36  CursorPositionModifiedEvent = 22000
37  };
38 
39  vtkMRMLNode* CreateNodeInstance() override;
40 
43  void ReadXMLAttributes( const char** atts) override;
44 
47  void WriteXML(ostream& of, int indent) override;
48 
52 
55  const char* GetNodeTagName() 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  void SetCrosshairName(const char *name) {
115  this->SetSingletonTag(name);
116  }
118  return this->GetSingletonTag();
119  }
120 
122  enum
123  {
124  NoCrosshair = 0,
130  ShowSmallIntersection
131  };
132  enum
133  {
134  Fine = 1,
136  Thick
137  };
139  enum
140  {
141  NoAction = 0,
142  OffsetJumpSlice = 1,
143  CenteredJumpSlice = 2,
144  Normal = 1,
145  JumpSlice = 1
146  };
147 
148 protected:
150  ~vtkMRMLCrosshairNode() override;
152  void operator=(const vtkMRMLCrosshairNode&);
153 
157 
158  double CrosshairRAS[3];
160 
163  double CursorPositionRAS[3];
166  double CursorPositionXYZ[3];
170  vtkWeakPointer<vtkMRMLSliceNode> CursorSliceNode;
171 
174 };
175 
176 #endif
177 
MRML node for storing a slice through RAS space.
MRML node for storing a crosshair through RAS space.
virtual void ReadXMLAttributes(const char **atts)
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()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
vtkWeakPointer< vtkMRMLSliceNode > CursorSliceNode
virtual void WriteXML(ostream &of, int indent)
void PrintSelf(ostream &os, vtkIndent indent) override
#define vtkMRMLCopyContentMacro(thisClassName)
Definition: vtkMRMLNode.h:142
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
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.