1 #ifndef __vtkMRMLAnnotationRulerNode_h 2 #define __vtkMRMLAnnotationRulerNode_h 4 #include "vtkSlicerAnnotationsModuleMRMLExport.h" 8 class vtkAbstractTransform;
25 virtual
vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
28 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "AnnotationRuler";}
30 virtual const char*
GetIcon() VTK_OVERRIDE {
return ":/Icons/AnnotationDistance.png";}
38 virtual void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
51 void * ) VTK_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 *GetPointColour();
147 void SetPointColour(
double initColor[3]);
151 double *GetLineColour();
152 void SetLineColour(
double newColor[3]);
156 double *GetDistanceAnnotationTextColour();
157 void SetDistanceAnnotationTextColour(
double initColor[3]);
161 virtual void ApplyTransform(vtkAbstractTransform* transform) VTK_OVERRIDE;
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])
virtual void PrintAnnotationInfo(ostream &os, vtkIndent indent, int titleFlag=1) VTK_OVERRIDE
int AddControlPoint(double newControl[3], int selectedFlag, int visibleFlag)
void operator=(const vtkMRMLAnnotationLinesNode &)
virtual void ReadXMLAttributes(const char **atts) VTK_OVERRIDE
Read node attributes from XML file.
void GetPositionWorldCoordinates2(double position[4])
virtual const char * GetIcon() VTK_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.
virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE
Copy the node's attributes to this object.
virtual void WriteXML(ostream &of, int indent) VTK_OVERRIDE
Write this node's information to a MRML file in XML format.
int SetPosition2(double nC1, double nC2, double nC3)
int SetPosition1(double newControl[3])
A supercalss for other storage nodes.
double * GetControlPointCoordinates(vtkIdType id)
int SetPosition1(double nC1, double nC2, double nC3)
static vtkMRMLAnnotationLinesNode * New()
virtual void ApplyTransform(vtkAbstractTransform *transform) VTK_OVERRIDE
char * DistanceAnnotationFormat
virtual vtkMRMLStorageNode * CreateDefaultStorageNode() VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
alternative method to propagate events generated in Display nodes
void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data.
int SetPositionWorldCoordinates2(double newControl[4])
int SetPositionWorldCoordinates1(double newControl[4])