Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLROIListNode.h
Go to the documentation of this file.
1 #ifndef __vtkMRMLROIListNode_h
2 #define __vtkMRMLROIListNode_h
3 
4 #include "vtkMRMLNode.h"
5 class vtkMRMLROINode;
6 
7 class vtkCollection;
8 
10 class VTK_MRML_EXPORT vtkMRMLROIListNode : public vtkMRMLNode
11 {
12  public:
13  static vtkMRMLROIListNode *New();
15  void PrintSelf(ostream& os, vtkIndent indent) override;
16 
17  //--------------------------------------------------------------------------
19  //--------------------------------------------------------------------------
20  vtkMRMLNode* CreateNodeInstance() override;
21 
24  void ReadXMLAttributes( const char** atts) override;
25 
28  void WriteXML(ostream& of, int indent) override;
29 
32  void Copy(vtkMRMLNode *node) override;
33 
36  const char* GetNodeTagName() override {return "ROIList";}
37 
40  void UpdateScene(vtkMRMLScene *scene) override;
41 
44  void UpdateReferences() override;
45 
48  int GetNumberOfROIs();
49 
53 
57  int SetNthROIXYZ(int n, double x, double y, double z);
58  double *GetNthROIXYZ(int n);
61  int SetNthROIRadiusXYZ(int n, double Radiusx, double Radiusy, double Radiusz);
62  double *GetNthROIRadiusXYZ(int n);
66  int SetNthROIIJK(int n, double i, double j, double k);
67  double *GetNthROIIJK(int n);
70  int SetNthROIRadiusIJK(int n, double Radiusi, double Radiusj, double Radiusk);
71  double *GetNthROIRadiusIJK(int n);
72 
75  int SetNthROILabelText(int n, const char *text);
76  const char *GetNthROILabelText(int n);
79  int SetNthROISelected(int n, int flag);
80  int GetNthROISelected(int n);
83  int SetNthROIID(int n, const char *id);
84  const char *GetNthROIID(int n);
85 
88  int AddROI( );
91  void RemoveROI(int i);
94  void RemoveAllROIs();
95 
96  void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ) override;
97 
100  enum
101  {
102  DisplayModifiedEvent = 21000,
103  PolyDataModifiedEvent = 21001,
104  ROIModifiedEvent = 21002
105  };
106 
109  void SetVisibility(int visible);
110  vtkGetMacro(Visibility,int);
111 
114  void SetTextScale(double scale);
115  vtkGetMacro(TextScale,double);
116 
119  void SetColor(double r, double g, double b);
120  void SetColor(double c[3]);
121  vtkGetVectorMacro(Color,double,3);
122 
125  void SetSelectedColor(double r, double g, double b);
126  void SetSelectedColor(double c[3]);
127  vtkGetVectorMacro(SelectedColor,double,3);
128 
131  void SetOpacity(double opacity);
132  vtkGetMacro(Opacity, double);
133 
136  vtkSetMacro(Ambient, double);
137  vtkGetMacro(Ambient, double);
138 
141  vtkSetMacro(Diffuse, double);
142  vtkGetMacro(Diffuse, double);
143 
146  vtkSetMacro(Specular, double);
147  vtkGetMacro(Specular, double);
148 
151  vtkSetMacro(Power, double);
152  vtkGetMacro(Power, double);
153 
156  vtkGetStringMacro(VolumeNodeID);
157  vtkSetStringMacro(VolumeNodeID);
158 
161  void SetAllVolumeNodeID();
162 
166  void UpdateIJK();
167 
171  vtkMRMLROINode* GetNthROINode(int n);
172 
173  protected:
175  ~vtkMRMLROIListNode() override;
176 
178  void operator=(const vtkMRMLROIListNode&);
179 
182  vtkCollection *ROIList;
183 
184  double TextScale;
186  double Color[3];
187  double SelectedColor[3];
188 
189 
192  double Opacity;
193  double Ambient;
194  double Diffuse;
195  double Specular;
196  double Power;
197 
201 };
202 
203 #endif
MRML node to represent a 3D ROI.
virtual void UpdateReferences()
The method should remove all pointers and observations to all nodes that are not in the scene anymore...
virtual void ReadXMLAttributes(const char **atts)
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
MRML list node to represent a list of ROINODE.
char * VolumeNodeID
The ID of the volume node that is associated with the ROI
virtual void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData)
Propagate events generated in mrml.
virtual void Copy(vtkMRMLNode *node)
Copy node contents from another node of the same type. Does not copy node ID and Scene. Performs deep copy - an independent copy is created from all data, including bulk data.
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:57
virtual void WriteXML(ostream &of, int indent)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void PrintSelf(ostream &os, vtkIndent indent) override
double Opacity
Numbers relating to the 3D render of the ROI
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
vtkCollection * ROIList
The collection of ROI that make up this list
virtual void UpdateScene(vtkMRMLScene *)
Definition: vtkMRMLNode.h:206