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
vtkMRMLAnnotationLineDisplayNode.h
Go to the documentation of this file.
1// .NAME vtkMRMLAnnotationLineDisplayNode - MRML node to represent display properties for tractography.
2// .SECTION Description
3// vtkMRMLAnnotationLineDisplayNode nodes store display properties of trajectories
4// from tractography in diffusion MRI data, including color type (by bundle, by fiber,
5// or by scalar invariants), display on/off for tensor glyphs and display of
6// trajectory as a line or tube.
7//
8
9#ifndef __vtkMRMLAnnotationLineDisplayNode_h
10#define __vtkMRMLAnnotationLineDisplayNode_h
11
12#include "vtkMRML.h"
14#include "vtkSlicerAnnotationsModuleMRMLExport.h"
15
16class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationLineDisplayNode : public vtkMRMLAnnotationDisplayNode
17{
18 public:
21 void PrintSelf ( ostream& os, vtkIndent indent ) override;
22
23 //--------------------------------------------------------------------------
24 // MRMLNode methods
25 //--------------------------------------------------------------------------
26
28
29 // Description:
30 // Read node attributes from XML (MRML) file
31 void ReadXMLAttributes ( const char** atts ) override;
32
33 // Description:
34 // Write this node's information to a MRML file in XML format.
35 void WriteXML ( ostream& of, int indent ) override;
36
37
38 // Description:
39 // Copy the node's attributes to this object
40 void Copy ( vtkMRMLNode *node ) override;
41
42 // Description:
43 // Get node XML tag name (like Volume, Annotation)
44 const char* GetNodeTagName() override {return "AnnotationLineDisplay";}
45
46 // Description:
47 // Finds the storage node and read the data
48 void UpdateScene(vtkMRMLScene *scene) override;
49
50 // Description:
51 // alternative method to propagate events generated in Display nodes
52 void ProcessMRMLEvents ( vtkObject * /*caller*/,
53 unsigned long /*event*/,
54 void * /*callData*/ ) override;
55
58 void SetLineThickness(double thickness);
59 vtkGetMacro(LineThickness,double);
60
62 vtkSetClampMacro(LabelPosition, double, 0.0, 1.0);
63 vtkGetMacro(LabelPosition, double);
64
66 vtkBooleanMacro(LabelVisibility, int);
67 vtkSetMacro(LabelVisibility, int);
68 vtkGetMacro(LabelVisibility, int);
69
71 vtkSetMacro(TickSpacing, double);
72 vtkGetMacro(TickSpacing, double);
73
75 vtkSetMacro(MaxTicks, int);
76 vtkGetMacro(MaxTicks, int);
77
79 inline void SliceProjectionDashedOn();
80
82 inline void SliceProjectionDashedOff();
83
86
89
92
95
99
103
119
122 vtkSetMacro(UnderLineThickness, double);
123 vtkGetMacro(UnderLineThickness, double);
124
127 vtkSetMacro(OverLineThickness, double);
128 vtkGetMacro(OverLineThickness, double);
129
131 void CreateBackup() override;
133 void RestoreBackup() override;
134
135protected:
140
146
149};
150
151//----------------------------------------------------------------------------
152void vtkMRMLAnnotationLineDisplayNode
153::SliceProjectionDashedOn()
154{
157}
158
159//----------------------------------------------------------------------------
160void vtkMRMLAnnotationLineDisplayNode
161::SliceProjectionDashedOff()
162{
165}
166
167//----------------------------------------------------------------------------
168void vtkMRMLAnnotationLineDisplayNode
169::SliceProjectionColoredWhenParallelOn()
170{
173}
174
175//----------------------------------------------------------------------------
176void vtkMRMLAnnotationLineDisplayNode
177::SliceProjectionColoredWhenParallelOff()
178{
181}
182
183//----------------------------------------------------------------------------
184void vtkMRMLAnnotationLineDisplayNode
185::SliceProjectionThickerOnTopOn()
186{
189}
190
191//----------------------------------------------------------------------------
192void vtkMRMLAnnotationLineDisplayNode
193::SliceProjectionThickerOnTopOff()
194{
197}
198
199//----------------------------------------------------------------------------
200void vtkMRMLAnnotationLineDisplayNode
201::SliceProjectionUseRulerColorOn()
202{
205}
206
207//----------------------------------------------------------------------------
208void vtkMRMLAnnotationLineDisplayNode
209::SliceProjectionUseRulerColorOff()
210{
213}
214
215#endif
virtual int GetSliceProjection()
void operator=(const vtkMRMLAnnotationDisplayNode &)
virtual void SetSliceProjection(int)
void WriteXML(ostream &of, int indent) override
void SliceProjectionThickerOnTopOn()
Set line thicker when on top of the plane, thinner when under.
void UpdateScene(vtkMRMLScene *scene) override
void SliceProjectionColoredWhenParallelOn()
Set line colored when parallel to slice plane.
vtkMRMLAnnotationLineDisplayNode(const vtkMRMLAnnotationLineDisplayNode &)
void ReadXMLAttributes(const char **atts) override
void SliceProjectionDashedOff()
Set SliceProjection to Plain.
static vtkMRMLAnnotationLineDisplayNode * New()
~vtkMRMLAnnotationLineDisplayNode() override=default
void CreateBackup() override
Create a backup of this node and attach it.
void SliceProjectionColoredWhenParallelOff()
Set line color unchanged when parallel to slice plane.
void SetLineThickness(double thickness)
void PrintSelf(ostream &os, vtkIndent indent) override
void SliceProjectionThickerOnTopOff()
Set line thickness uniform.
void SliceProjectionDashedOn()
Set SliceProjection to Dashed.
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void Copy(vtkMRMLNode *node) override
Copy node contents from another node of the same type. Does not copy node ID and Scene....
void RestoreBackup() override
Restore an attached backup of this node.
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
Propagate events generated in mrml.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.