Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLAnnotationROINode.h
Go to the documentation of this file.
1 #ifndef __vtkMRMLAnnotationROINode_h
2 #define __vtkMRMLAnnotationROINode_h
3 
4 #include "vtkSlicerAnnotationsModuleMRMLExport.h"
6 
7 class vtkMatrix4x4;
8 class vtkPlanes;
9 class vtkAbstractTransform;
10 class vtkMRMLScene;
11 
13 class VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT vtkMRMLAnnotationROINode
15 {
16 public:
17  static vtkMRMLAnnotationROINode *New();
21  void PrintAnnotationInfo(ostream& os, vtkIndent indent, int titleFlag = 1) override;
22 
23  //--------------------------------------------------------------------------
24  // MRMLNode methods
25  //--------------------------------------------------------------------------
26 
27  vtkMRMLNode* CreateNodeInstance() override;
30  const char* GetNodeTagName() override {return "AnnotationROI";}
31 
32  const char* GetIcon() override {return ":/Icons/AnnotationROI.png";}
33 
34  // Description:
36  void ReadXMLAttributes( const char** atts) override;
37 
40  void WriteXML(ostream& of, int indent) override;
41 
45 
46  void UpdateScene(vtkMRMLScene *scene) override;
47 
50  void ProcessMRMLEvents ( vtkObject * /*caller*/,
51  unsigned long /*event*/,
52  void * /*callData*/ ) override;
53 
56  vtkBooleanMacro(InteractiveMode, int);
57  vtkGetMacro(InteractiveMode, int);
58  vtkSetMacro(InteractiveMode, int);
59 
60 
63  vtkBooleanMacro(InsideOut, int);
64  vtkGetMacro(InsideOut, int);
65  vtkSetMacro(InsideOut, int);
66 
69  double GetROIAnnotationScale();
70  void SetROIAnnotationScale(double init);
71 
74  int GetROIAnnotationVisibility();
75  void SetROIAnnotationVisibility(int flag);
76 
77 // int SetROI(vtkIdType line1Id, int sel, int vis);
78 
81  double *GetPointColor();
82  void SetPointColor( double initColor[3]);
83 
86  double *GetLineColor();
87  void SetLineColor(double newColor[3]);
88 
91  double *GetROIAnnotationTextColor();
92  void SetROIAnnotationTextColor(double initColor[3]);
93 
96  void ApplyTransformMatrix(vtkMatrix4x4* transformMatrix) override;
97  void ApplyTransform(vtkAbstractTransform* transform) override;
98  virtual void GetTransformedPlanes(vtkPlanes *planes);
99 
102  void Initialize(vtkMRMLScene* mrmlScene) override;
103 
111  //double* GetXYZ() {return this->GetControlPointCoordinates(0);}
113  bool GetXYZ(double point[3]);
114  int SetXYZ(double newControl[3])
115  {
116  return this->SetControlPoint(0, newControl);
117  }
118 
119  int SetXYZ(double nC1, double nC2, double nC3)
120  {
121  double newControl[3] = {nC1,nC2,nC3};
122  return this->SetXYZ(newControl) ;
123  }
124 
130  bool GetRadiusXYZ(double point[3]);
131 
132  int SetRadiusXYZ(double newControl[3])
133  {
134  return this->SetControlPoint(1, newControl);
135  }
136 
137  int SetRadiusXYZ(double nC1, double nC2, double nC3)
138  {
139  double newControl[3] = {nC1,nC2,nC3};
140  return this->SetRadiusXYZ(newControl);
141  }
142 
143 
145  vtkSetStringMacro(LabelText);
146  vtkGetStringMacro(LabelText);
147 
149  vtkGetStringMacro(VolumeNodeID);
150  vtkSetStringMacro(VolumeNodeID);
151 
156  void GetRASBounds(double bounds[6]) override;
157 
161  void GetBounds(double bounds[6]) override;
162 
163  enum
164  {
165  ROINodeAddedEvent = 0,
167  };
168 
169 
170 protected:
172  ~vtkMRMLAnnotationROINode() override;
174  void operator=(const vtkMRMLAnnotationROINode&);
175 
177 
178  int SetControlPoint(int id, double newControl[3]);
179 
180  int AddControlPoint(double newControl[3],int selectedFlag, int visibleFlag);
181 
184 
187  char *LabelText;
188 
191 
192 };
193 
194 #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 GetBounds(double bounds[6]) override
void ApplyTransform(vtkAbstractTransform *transform) override
void UpdateScene(vtkMRMLScene *scene) override
Finds the storage node and read the data
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
int InsideOut
Control the orientation of the normals.
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:57
int SetRadiusXYZ(double newControl[3])
char * VolumeNodeID
The ID of the volume associated with the ROI.
vtkMRMLCopyContentMacro(vtkMRMLAnnotationNode)
virtual void ApplyTransformMatrix(vtkMatrix4x4 *transformMatrix)
static vtkMRMLAnnotationLinesNode * New()
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void GetRASBounds(double bounds[6]) override
const char * GetIcon() override
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
int SetXYZ(double nC1, double nC2, double nC3)
int SetXYZ(double newControl[3])
void Initialize(vtkMRMLScene *mrmlScene) override
int SetRadiusXYZ(double nC1, double nC2, double nC3)
const char * GetNodeTagName() override
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file