Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
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 
17 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationTextDisplayNode : public vtkMRMLAnnotationDisplayNode
18 {
19  public:
22  void PrintSelf ( ostream& os, vtkIndent indent ) VTK_OVERRIDE;
23 
24  //--------------------------------------------------------------------------
25  // MRMLNode methods
26  //--------------------------------------------------------------------------
27 
28  virtual vtkMRMLNode* CreateNodeInstance () VTK_OVERRIDE;
29 
30  // Description:
31  // Read node attributes from XML (MRML) file
32  virtual void ReadXMLAttributes ( const char** atts ) VTK_OVERRIDE;
33 
34  // Description:
35  // Write this node's information to a MRML file in XML format.
36  virtual void WriteXML ( ostream& of, int indent ) VTK_OVERRIDE;
37 
38 
39  // Description:
40  // Copy the node's attributes to this object
41  virtual void Copy ( vtkMRMLNode *node ) VTK_OVERRIDE;
42 
43  // Description:
44  // Get node XML tag name (like Volume, Annotation)
45  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "AnnotationTextDisplay";}
46 
47  // Description:
48  // Finds the storage node and read the data
49  virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
50 
51  // Description:
52  // alternative method to propagate events generated in Display nodes
53  virtual void ProcessMRMLEvents ( vtkObject * /*caller*/,
54  unsigned long /*event*/,
55  void * /*callData*/ ) VTK_OVERRIDE;
56 
57  // Description:
58  // Get/Set for Text scale
59  void SetTextScale(double scale);
60  vtkGetMacro(TextScale,double);
61 
63  vtkSetMacro(UseLineWrap,int);
64  vtkGetMacro(UseLineWrap,int);
65  vtkBooleanMacro(UseLineWrap,int);
66 
68  vtkSetMacro(MaxCharactersPerLine, unsigned int);
69  vtkGetMacro(MaxCharactersPerLine, unsigned int);
70 
72 
74  vtkSetMacro(ShowBorder,int);
75  vtkGetMacro(ShowBorder,int);
76  vtkBooleanMacro(ShowBorder,int);
77 
80  vtkSetMacro(ShowLeader,int);
81  vtkGetMacro(ShowLeader,int);
82  vtkBooleanMacro(ShowLeader,int);
83 
86  vtkSetMacro(UseThreeDimensionalLeader,int);
87  vtkGetMacro(UseThreeDimensionalLeader,int);
88  vtkBooleanMacro(UseThreeDimensionalLeader,int);
89 
91  vtkSetMacro(ShowArrowHead, int);
92  vtkGetMacro(ShowArrowHead, int);
93  vtkBooleanMacro(ShowArrowHead, int);
94 
100  vtkSetClampMacro(LeaderGlyphSize,double,0.0,0.1);
101  vtkGetMacro(LeaderGlyphSize,double);
102 
106  vtkSetClampMacro(MaximumLeaderGlyphSize,int,1,1000);
107  vtkGetMacro(MaximumLeaderGlyphSize,int);
108 
111  vtkSetClampMacro(Padding, int, 0, 50);
112  vtkGetMacro(Padding, int);
113 
116  vtkSetMacro(AttachEdgeOnly,int);
117  vtkGetMacro(AttachEdgeOnly,int);
118  vtkBooleanMacro(AttachEdgeOnly,int);
119 
121  void CreateBackup() VTK_OVERRIDE;
123  void RestoreBackup() VTK_OVERRIDE;
124 
129  std::string GetLineWrappedText(std::string inputText);
130 protected:
135 
136  double TextScale;
137 
139  unsigned int MaxCharactersPerLine;
140 
147  int Padding;
149 
150 };
151 
152 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
LRU Cache.
virtual void CreateBackup()
Creates a backup of the current MRML state of this node and keeps a reference.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data.
void operator=(const vtkMRMLAnnotationDisplayNode &)
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE
Create instance of the default node. Like New only virtual.
static vtkMRMLAnnotationDisplayNode * New()
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138