Slicer  4.10
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) VTK_OVERRIDE;
22 
23  //--------------------------------------------------------------------------
24  // MRMLNode methods
25  //--------------------------------------------------------------------------
26 
27  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
30  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "AnnotationROI";}
31 
32  virtual const char* GetIcon() VTK_OVERRIDE {return ":/Icons/AnnotationROI.png";}
33 
34  // Description:
36  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
37 
40  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
41 
42 
45  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
46 
47  void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
48 
51  virtual void ProcessMRMLEvents ( vtkObject * /*caller*/,
52  unsigned long /*event*/,
53  void * /*callData*/ ) VTK_OVERRIDE;
54 
57  vtkBooleanMacro(InteractiveMode, int);
58  vtkGetMacro(InteractiveMode, int);
59  vtkSetMacro(InteractiveMode, int);
60 
61 
64  vtkBooleanMacro(InsideOut, int);
65  vtkGetMacro(InsideOut, int);
66  vtkSetMacro(InsideOut, int);
67 
70  double GetROIAnnotationScale();
71  void SetROIAnnotationScale(double init);
72 
75  int GetROIAnnotationVisibility();
76  void SetROIAnnotationVisibility(int flag);
77 
78 // int SetROI(vtkIdType line1Id, int sel, int vis);
79 
82  double *GetPointColor();
83  void SetPointColor( double initColor[3]);
84 
87  double *GetLineColor();
88  void SetLineColor(double newColor[3]);
89 
92  double *GetROIAnnotationTextColor();
93  void SetROIAnnotationTextColor(double initColor[3]);
94 
97  virtual void ApplyTransformMatrix(vtkMatrix4x4* transformMatrix) VTK_OVERRIDE;
98  virtual void ApplyTransform(vtkAbstractTransform* transform) VTK_OVERRIDE;
99  virtual void GetTransformedPlanes(vtkPlanes *planes);
100 
103  void Initialize(vtkMRMLScene* mrmlScene) VTK_OVERRIDE;
104 
112  //double* GetXYZ() {return this->GetControlPointCoordinates(0);}
114  bool GetXYZ(double point[3]);
115  int SetXYZ(double newControl[3])
116  {
117  return this->SetControlPoint(0, newControl);
118  }
119 
120  int SetXYZ(double nC1, double nC2, double nC3)
121  {
122  double newControl[3] = {nC1,nC2,nC3};
123  return this->SetXYZ(newControl) ;
124  }
125 
131  bool GetRadiusXYZ(double point[3]);
132 
133  int SetRadiusXYZ(double newControl[3])
134  {
135  return this->SetControlPoint(1, newControl);
136  }
137 
138  int SetRadiusXYZ(double nC1, double nC2, double nC3)
139  {
140  double newControl[3] = {nC1,nC2,nC3};
141  return this->SetRadiusXYZ(newControl);
142  }
143 
144 
146  vtkSetStringMacro(LabelText);
147  vtkGetStringMacro(LabelText);
148 
150  vtkGetStringMacro(VolumeNodeID);
151  vtkSetStringMacro(VolumeNodeID);
152 
157  virtual void GetRASBounds(double bounds[6]) VTK_OVERRIDE;
158 
162  virtual void GetBounds(double bounds[6]) VTK_OVERRIDE;
163 
164  enum
165  {
166  ROINodeAddedEvent = 0,
168  };
169 
170 
171 protected:
175  void operator=(const vtkMRMLAnnotationROINode&);
176 
178 
179  int SetControlPoint(int id, double newControl[3]);
180 
181  int AddControlPoint(double newControl[3],int selectedFlag, int visibleFlag);
182 
185 
188  char *LabelText;
189 
192 
193 };
194 
195 #endif
void Initialize(vtkMRMLScene *mrmlScene) VTK_OVERRIDE
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
int InsideOut
Control the orientation of the normals.
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)
virtual const char * GetIcon() VTK_OVERRIDE
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
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.
virtual void GetBounds(double bounds[6]) VTK_OVERRIDE
int SetRadiusXYZ(double newControl[3])
char * VolumeNodeID
The ID of the volume associated with the ROI.
virtual void ApplyTransformMatrix(vtkMatrix4x4 *transformMatrix)
static vtkMRMLAnnotationLinesNode * New()
virtual void ApplyTransform(vtkAbstractTransform *transform) VTK_OVERRIDE
virtual void GetRASBounds(double bounds[6]) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
int SetXYZ(double nC1, double nC2, double nC3)
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
alternative method to propagate events generated in Display nodes
int SetXYZ(double newControl[3])
int SetRadiusXYZ(double nC1, double nC2, double nC3)
void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data