Slicer 5.9
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"
6
7class vtkCollection;
8
10class VTK_MRML_EXPORT vtkMRMLROIListNode : public vtkMRMLNode
11{
12 public:
15 void PrintSelf(ostream& os, vtkIndent indent) override;
16
17 //--------------------------------------------------------------------------
19 //--------------------------------------------------------------------------
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
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);
83 int SetNthROIID(int n, const char *id);
84 const char *GetNthROIID(int n);
85
88 int AddROI( );
91 void RemoveROI(int i);
95
96 void ProcessMRMLEvents ( vtkObject *caller, unsigned long event, void *callData ) override;
97
100 enum
101 {
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
162
166 void UpdateIJK();
167
172
173 protected:
176
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
friend class vtkMRMLScene
char * VolumeNodeID
The ID of the volume node that is associated with the ROI.
int SetNthROILabelText(int n, const char *text)
Get/Set for label text of the Nth ROI.
void SetColor(double c[3])
int GetNthROISelected(int n)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
void RemoveAllROIs()
Remove all ROIs from the list.
double * GetNthROIRadiusIJK(int n)
double Opacity
Numbers relating to the 3D render of the ROI.
~vtkMRMLROIListNode() override
void SetSelectedColor(double c[3])
int AddROI()
Add an ROI to the list with default values.
double * GetNthROIIJK(int n)
void UpdateScene(vtkMRMLScene *scene) override
int SetNthROIRadiusXYZ(int n, double Radiusx, double Radiusy, double Radiusz)
Get/Set for Nth radius of the ROI in RAS coordinates.
vtkCollection * ROIList
The collection of ROI that make up this list.
void SetSelectedColor(double r, double g, double b)
Get/Set for color for when an ROI is selected.
double * GetNthROIXYZ(int n)
void PrintSelf(ostream &os, vtkIndent indent) override
int SetNthROIIJK(int n, double i, double j, double k)
void UpdateReferences() override
update display node ids
void SetOpacity(double opacity)
Opacity of the ROI expressed as a number from 0 to 1.
void SetTextScale(double scale)
Get/Set for Text scale.
const char * GetNthROIID(int n)
int SetNthROIID(int n, const char *id)
Get/Set for ID of the Nth ROI.
int SetNthROIXYZ(int n, double x, double y, double z)
double * GetNthROIRadiusXYZ(int n)
void SetVisibility(int visible)
Get/Set for list visibility.
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
Propagate events generated in mrml.
void ReadXMLAttributes(const char **atts) override
Set node attributes.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
void RemoveROI(int i)
Remove an ROI from the list.
void operator=(const vtkMRMLROIListNode &)
static vtkMRMLROIListNode * New()
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
vtkMRMLROINode * GetNthROINode(int n)
int SetNthROIRadiusIJK(int n, double Radiusi, double Radiusj, double Radiusk)
Get/Set for Nth radius of the ROI in IJK coordinates.
const char * GetNthROILabelText(int n)
void SetColor(double r, double g, double b)
Get/Set for ROI and Text color.
void SetAllVolumeNodeID()
Set the Volume node ID for each ROI node in the list.
int GetNumberOfROIs()
Get the number of ROIs in the list.
int SetNthROISelected(int n, int flag)
Get/Set for selected flag of the Nth ROI.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
vtkMRMLROIListNode(const vtkMRMLROIListNode &)
MRML node to represent a 3D ROI.