1 #ifndef __vtkMRMLAnnotationRulerNode_h 2 #define __vtkMRMLAnnotationRulerNode_h 4 #include "vtkSlicerAnnotationsModuleMRMLExport.h" 8 class vtkAbstractTransform;
30 const char*
GetIcon()
override {
return ":/Icons/AnnotationDistance.png";}
38 void WriteXML(ostream& of,
int indent)
override;
56 void GetPosition1(
double position[3]);
61 double p[4]={0,0,0,1};
62 this->GetPosition1(p);
81 double locPoint[4]={0,0,0,1};
83 return this->SetPosition1(locPoint) ;
88 double newControl[3] = {nC1,nC2,nC3};
89 return this->SetPosition1(newControl) ;
94 void GetPosition2(
double position[3]);
99 double p[4]={0,0,0,1};
100 this->GetPosition2(p);
116 double locPoint[4]={0,0,0,1};
118 return this->SetPosition2(locPoint) ;
123 double newControl[3] = {nC1,nC2,nC3};
124 return this->SetPosition2(newControl) ;
129 vtkGetStringMacro(DistanceAnnotationFormat);
130 vtkSetStringMacro(DistanceAnnotationFormat);
134 double GetDistanceAnnotationScale();
135 void SetDistanceAnnotationScale(
double init);
139 int GetDistanceAnnotationVisibility();
140 void SetDistanceAnnotationVisibility(
int flag);
142 int SetRuler(vtkIdType line1Id,
int sel,
int vis);
146 double *GetPointColor();
147 void SetPointColor(
double initColor[3]);
151 double *GetLineColor();
152 void SetLineColor(
double newColor[3]);
156 double *GetDistanceAnnotationTextColor();
157 void SetDistanceAnnotationTextColor(
double initColor[3]);
170 double GetDistanceMeasurement();
174 vtkGetStringMacro(ModelID1);
175 vtkSetStringMacro(ModelID1);
176 vtkGetStringMacro(ModelID2);
177 vtkSetStringMacro(ModelID2);
181 RulerNodeAddedEvent = 20010,
198 int AddControlPoint(
double newControl[3],
int selectedFlag,
int visibleFlag);
void GetPositionWorldCoordinates1(double position[4])
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 ApplyTransform(vtkAbstractTransform *transform) override
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data
void GetPositionWorldCoordinates2(double position[4])
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
const char * GetIcon() override
int SetPosition2(double newControl[3])
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)
A set of MRML Nodes that supports serialization and undo/redo.
int SetPosition2(double nC1, double nC2, double nC3)
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
int SetPosition1(double newControl[3])
A superclass for other storage nodes.
double * GetControlPointCoordinates(vtkIdType id)
int SetPosition1(double nC1, double nC2, double nC3)
static vtkMRMLAnnotationLinesNode * New()
vtkMRMLStorageNode * CreateDefaultStorageNode() override
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
char * DistanceAnnotationFormat
Abstract Superclass for all specific types of MRML nodes.
int SetPositionWorldCoordinates2(double newControl[4])
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
int SetPositionWorldCoordinates1(double newControl[4])