Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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) VTK_OVERRIDE;
16 
17  //--------------------------------------------------------------------------
19  //--------------------------------------------------------------------------
20  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
21 
24  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
25 
28  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
29 
32  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
33 
36  virtual const char* GetNodeTagName() VTK_OVERRIDE {return "ROIList";}
37 
40  virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE;
41 
44  void UpdateReferences() VTK_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 ) VTK_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:
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...
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
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:54
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
double Opacity
Numbers relating to the 3D render of the ROI
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
vtkCollection * ROIList
The collection of ROI that make up this list
virtual void UpdateScene(vtkMRMLScene *)
Definition: vtkMRMLNode.h:174