Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLAnnotationStickyNode.h
Go to the documentation of this file.
1 // .NAME vtkMRMLAnnotationStickyNode - MRML node to represent a fiber bundle from tractography in DTI data.
2 // .SECTION Description
3 // Annotation nodes contains control points, internally represented as vtkPolyData.
4 // A Annotation node contains many control points and forms the smallest logical unit of tractography
5 // that MRML will manage/read/write. Each control point has accompanying data.
6 // Visualization parameters for these nodes are controlled by the vtkMRMLAnnotationTextDisplayNode class.
7 //
8 
9 #ifndef __vtkMRMLAnnotationStickyNode_h
10 #define __vtkMRMLAnnotationStickyNode_h
11 
12 #include "vtkSlicerAnnotationsModuleMRMLExport.h"
13 #include "vtkMRMLAnnotationNode.h"
15 
16 #include <vtkStdString.h>
17 class vtkStringArray;
18 class vtkMRMLStorageNode;
19 
21 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationStickyNode : public vtkMRMLAnnotationControlPointsNode
22 {
23 public:
26 
27  //--------------------------------------------------------------------------
28  // MRMLNode methods
29  //--------------------------------------------------------------------------
30 
31  vtkMRMLNode* CreateNodeInstance() override;
32  // Description:
33  // Get node XML tag name (like Volume, Model)
34  const char* GetNodeTagName() override {return "AnnotationSticky";}
35 
36 
37  int SetSticky(const char* text,int selectedFlag);
38 
39  // Selected and visible are currently always set to 1 and are controlled by selected and visible flag - we can change this later
40  void SetStickyText(const char* newLabel) {this->SetText(0,newLabel,1,1);}
41  vtkStdString GetStickyText() {return this->GetText(0);}
42 
43  int SetStickyCoordinates(double newCoord[3]) {return this->SetControlPoint(0,newCoord,1,1);}
44 
45  void Initialize(vtkMRMLScene* mrmlScene) override;
46 
47 
48 protected:
49  vtkMRMLAnnotationStickyNode() = default;
50  ~vtkMRMLAnnotationStickyNode() override = default;
53 
54 };
55 
56 #endif
void Initialize(vtkMRMLScene *mrmlScene) override
static vtkMRMLAnnotationControlPointsNode * New()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
int SetStickyCoordinates(double newCoord[3])
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:56
vtkStdString GetText(int id)
A superclass for other storage nodes.
void SetText(int id, const char *newText, int selectedFlag, int visibleFlag)
void operator=(const vtkMRMLAnnotationControlPointsNode &)
void SetStickyText(const char *newLabel)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:139
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)