Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLAnnotationTextDisplayNode.h
Go to the documentation of this file.
1// .NAME vtkMRMLAnnotationTextDisplayNode - MRML node to represent display properties for tractography.
2// .SECTION Description
3// vtkMRMLAnnotationTextDisplayNode 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 __vtkMRMLAnnotationTextDisplayNode_h
10#define __vtkMRMLAnnotationTextDisplayNode_h
11
12#include "vtkMRML.h"
14#include "vtkSlicerAnnotationsModuleMRMLExport.h"
15
16class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationTextDisplayNode : public vtkMRMLAnnotationDisplayNode
17{
18public:
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 // Description:
38 // Copy the node's attributes to this object
39 void Copy(vtkMRMLNode* node) override;
40
41 // Description:
42 // Get node XML tag name (like Volume, Annotation)
43 const char* GetNodeTagName() override { return "AnnotationTextDisplay"; }
44
45 // Description:
46 // Finds the storage node and read the data
47 void UpdateScene(vtkMRMLScene* scene) override;
48
49 // Description:
50 // alternative method to propagate events generated in Display nodes
51 void ProcessMRMLEvents(vtkObject* /*caller*/, unsigned long /*event*/, void* /*callData*/) override;
52
53 // Description:
54 // Get/Set for Text scale
55 void SetTextScale(double scale);
56 vtkGetMacro(TextScale, double);
57
59 vtkSetMacro(UseLineWrap, int);
60 vtkGetMacro(UseLineWrap, int);
61 vtkBooleanMacro(UseLineWrap, int);
62
64 vtkSetMacro(MaxCharactersPerLine, unsigned int);
65 vtkGetMacro(MaxCharactersPerLine, unsigned int);
66
68
70 vtkSetMacro(ShowBorder, int);
71 vtkGetMacro(ShowBorder, int);
72 vtkBooleanMacro(ShowBorder, int);
73
76 vtkSetMacro(ShowLeader, int);
77 vtkGetMacro(ShowLeader, int);
78 vtkBooleanMacro(ShowLeader, int);
79
82 vtkSetMacro(UseThreeDimensionalLeader, int);
83 vtkGetMacro(UseThreeDimensionalLeader, int);
84 vtkBooleanMacro(UseThreeDimensionalLeader, int);
85
87 vtkSetMacro(ShowArrowHead, int);
88 vtkGetMacro(ShowArrowHead, int);
89 vtkBooleanMacro(ShowArrowHead, int);
90
96 vtkSetClampMacro(LeaderGlyphSize, double, 0.0, 0.1);
97 vtkGetMacro(LeaderGlyphSize, double);
98
102 vtkSetClampMacro(MaximumLeaderGlyphSize, int, 1, 1000);
103 vtkGetMacro(MaximumLeaderGlyphSize, int);
104
107 vtkSetClampMacro(Padding, int, 0, 50);
108 vtkGetMacro(Padding, int);
109
112 vtkSetMacro(AttachEdgeOnly, int);
113 vtkGetMacro(AttachEdgeOnly, int);
114 vtkBooleanMacro(AttachEdgeOnly, int);
115
117 void CreateBackup() override;
119 void RestoreBackup() override;
120
125 std::string GetLineWrappedText(std::string inputText);
126
127protected:
132
133 double TextScale;
134
137
146};
147
148#endif
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void operator=(const vtkMRMLAnnotationTextDisplayNode &)
void PrintSelf(ostream &os, vtkIndent indent) override
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
Propagate events generated in mrml.
void CreateBackup() override
Create a backup of this node and attach it.
~vtkMRMLAnnotationTextDisplayNode() override=default
void UpdateScene(vtkMRMLScene *scene) override
void WriteXML(ostream &of, int indent) override
void SetTextScale(double scale)
void RestoreBackup() override
Restore an attached backup of this node.
vtkMRMLAnnotationTextDisplayNode(const vtkMRMLAnnotationTextDisplayNode &)
void Copy(vtkMRMLNode *node) override
Copy node contents from another node of the same type. Does not copy node ID and Scene....
static vtkMRMLAnnotationTextDisplayNode * New()
std::string GetLineWrappedText(std::string inputText)
void ReadXMLAttributes(const char **atts) override
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.