15 #ifndef __vtkMRMLColorTableNode_h 16 #define __vtkMRMLColorTableNode_h 31 void PrintSelf(ostream& os, vtkIndent indent)
override;
45 void WriteXML(ostream& of,
int indent)
override;
61 virtual void SetAndObserveLookupTable(vtkLookupTable *newLookupTable);
68 SetAndObserveLookupTable(newLookupTable);
73 void SetType(
int type)
override;
75 void SetTypeToFullRainbow();
78 void SetTypeToRainbow();
79 void SetTypeToOcean();
80 void SetTypeToDesert();
81 void SetTypeToInvGrey();
82 void SetTypeToReverseRainbow();
84 void SetTypeToFMRIPA();
85 void SetTypeToLabels();
86 void SetTypeToRandom();
88 void SetTypeToGreen();
91 void SetTypeToMagenta();
92 void SetTypeToYellow();
93 void SetTypeToWarm1();
94 void SetTypeToWarm2();
95 void SetTypeToWarm3();
96 void SetTypeToCool1();
97 void SetTypeToCool2();
98 void SetTypeToCool3();
99 void SetTypeToWarmShade1();
100 void SetTypeToWarmShade2();
101 void SetTypeToWarmShade3();
102 void SetTypeToCoolShade1();
103 void SetTypeToCoolShade2();
104 void SetTypeToCoolShade3();
105 void SetTypeToWarmTint1();
106 void SetTypeToWarmTint2();
107 void SetTypeToWarmTint3();
108 void SetTypeToCoolTint1();
109 void SetTypeToCoolTint2();
110 void SetTypeToCoolTint3();
113 void ProcessMRMLEvents ( vtkObject *caller,
unsigned long event,
void *callData )
override;
197 void SetNumberOfColors(
int n);
209 void AddColor(
const char* name,
double r,
double g,
double b,
double a = 1.0);
213 int SetColor(
int entry,
const char* name,
double r,
double g,
double b,
double a = 1.0);
217 int SetColors(
int firstEntry,
int lastEntry,
const char* name,
double r,
double g,
double b,
double a = 1.0);
220 int SetColor(
int entry,
double r,
double g,
double b,
double a);
221 int SetColor(
int entry,
double r,
double g,
double b);
222 int SetOpacity(
int entry,
double opacity);
226 bool GetColor(
int entry,
double color[4])
override;
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
virtual void SetLookupTable(vtkLookupTable *newLookupTable)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void operator=(const vtkMRMLColorNode &)
int GetFirstType() override
Return the lowest and highest integers, for use in looping
virtual int GetNumberOfColors()
Get the number of colors in the table
void ReadXMLAttributes(const char **atts) override
Set node attributes
static vtkMRMLColorNode * New()
int LastAddedColor
keep track of where we last added a color
void PrintSelf(ostream &os, vtkIndent indent) override
A superclass for other storage nodes.
Abstract MRML node to represent color information.
void Reset(vtkMRMLNode *defaultNode) override
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
int GetLastType() override
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
Abstract Superclass for all specific types of MRML nodes.
MRML node to represent discrete color information.
vtkLookupTable * LookupTable
The look up table, constructed according to the Type
virtual void SetType(int type)
Set Type to type, then build colors and set names
virtual vtkLookupTable * GetLookupTable()
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
Propagate events generated in mrml.
virtual bool GetColor(int ind, double color[4])
virtual const char * GetTypeAsString()
return a text string describing the color look up table type