Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLAnnotationSplineNode.h
Go to the documentation of this file.
1 #ifndef __vtkMRMLAnnotationSplineNode_h
2 #define __vtkMRMLAnnotationSplineNode_h
3 
5 
6 class vtkMRMLScene;
7 
9 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationSplineNode : public vtkMRMLAnnotationLinesNode
10 {
11 public:
14  // Description:
15  // Just prints short summary
16  void PrintAnnotationInfo(ostream& os, vtkIndent indent, int titleFlag = 1) override;
17 
18  //--------------------------------------------------------------------------
19  // MRMLNode methods
20  //--------------------------------------------------------------------------
21 
22  vtkMRMLNode* CreateNodeInstance() override;
23  // Description:
24  // Get node XML tag name (like Volume, Model)
25  const char* GetNodeTagName() override {return "AnnotationRuler";}
26 
27  // Description:
28  // Read node attributes from XML file
29  void ReadXMLAttributes( const char** atts) override;
30 
31  // Description:
32  // Write this node's information to a MRML file in XML format.
33  void WriteXML(ostream& of, int indent) override;
34 
35 
36  // Description:
37  // Copy the node's attributes to this object
38  void Copy(vtkMRMLNode *node) override;
39 
40  void UpdateScene(vtkMRMLScene *scene) override;
41 
42  // Description:
43  // alternative method to propagate events generated in Display nodes
44  void ProcessMRMLEvents ( vtkObject * /*caller*/,
45  unsigned long /*event*/,
46  void * /*callData*/ ) override;
47 
48 
49  // Legacy code
50  // Description:
51  // get/set the first point position
52  double* GetPosition1() {return this->GetControlPointCoordinates(0);}
53 
54  // Description:
55  // get/set the distance annotation format, it's in standard sprintf notation
56  vtkGetStringMacro(DistanceAnnotationFormat);
57  vtkSetStringMacro(DistanceAnnotationFormat);
58 
59  // Description:
60  // KP Define - should be part of AnnotationRulerDisplayNode
61  double GetDistanceAnnotationScale();
62  void SetDistanceAnnotationScale(double init);
63 
64  // Description:
65  // get/set the distance annotation visbility
66  int GetDistanceAnnotationVisibility();
67  void SetDistanceAnnotationVisibility(int flag);
68 
69  int SetRuler(vtkIdType line1Id, int sel, int vis);
70 
71  // Description:
72  // get/set the resolution (number of subdivisions) of the line.
73  vtkGetMacro(Resolution, int);
74  vtkSetMacro(Resolution, int);
75 
76  // Description:
77  // get/set the point representation colour
78  double *GetPointColour();
79  void SetPointColour( double initColor[3]);
80 
81  // Description:
82  // get/set the line representation colour
83  double *GetLineColour();
84  void SetLineColour(double newColor[3]);
85 
86  // Description:
87  // get/set the distance annotation text colour
88  double *GetDistanceAnnotationTextColour();
89  void SetDistanceAnnotationTextColour(double initColor[3]);
90 
91  void Initialize(vtkMRMLScene* mrmlScene) override;
92 
93  double GetSplineMeasurement();
94  void SetSplineMeasurement(double val);
95 
96  int SetControlPoint(double newControl[3], int id);
97 
98  enum
99  {
100  SplineNodeAddedEvent = 0,
102  };
103 
104 
105 protected:
107  ~vtkMRMLAnnotationSplineNode() override;
110 
111  // Description:
112  // number of subdivisions on the line
115 
116  int AddControlPoint(double newControl[3],int selectedFlag, int visibleFlag);
117 
119 
120 };
121 
122 #endif
int AddControlPoint(double newControl[3], int selectedFlag, int visibleFlag)
void ProcessMRMLEvents(vtkObject *, unsigned long, void *) override
alternative method to propagate events generated in Display nodes
void operator=(const vtkMRMLAnnotationLinesNode &)
void PrintAnnotationInfo(ostream &os, vtkIndent indent, int titleFlag=1) override
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
double * GetControlPointCoordinates(vtkIdType id)
static vtkMRMLAnnotationLinesNode * New()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
void Initialize(vtkMRMLScene *mrmlScene) override
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file