15 #ifndef __vtkMRMLColorNode_h 16 #define __vtkMRMLColorNode_h 23 class vtkScalarsToColors;
52 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
62 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
66 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
74 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "Color";};
87 virtual void SetType(
int type);
90 vtkGetMacro(Type,
int);
97 void ProcessMRMLEvents ( vtkObject *caller,
unsigned long event,
void *callData ) VTK_OVERRIDE;
105 virtual const char * GetTypeAsString();
110 TypeModifiedEvent = 20002
115 const char *GetColorName(
int ind);
120 int GetColorIndexByName(
const char *name);
132 std::string GetColorNameAsFileName(
int colorIndex,
const char *subst =
"_");
138 std::string GetColorNameWithoutSpaces(
int ind,
const char *subst);
142 int SetColorName(
int ind,
const char *name);
147 int SetColorNameWithSpaces(
int ind,
const char *name,
const char *subst);
150 virtual int GetNumberOfColors();
155 virtual bool GetColor(
int ind,
double color[4]);
159 vtkSetStringMacro(FileName);
160 vtkGetStringMacro(FileName);
165 virtual vtkLookupTable * GetLookupTable();
171 virtual vtkScalarsToColors* GetScalarsToColors();
176 vtkGetStringMacro(NoName);
177 vtkSetStringMacro(NoName);
181 vtkGetMacro(NamesInitialised,
int);
182 vtkSetMacro(NamesInitialised,
int);
183 vtkBooleanMacro(NamesInitialised,
int);
186 void SetNamesFromColors();
211 virtual bool SetNameFromColor(
int index);
217 virtual bool HasNameFromColor(
int index);
virtual void Reset(vtkMRMLNode *defaultNode)
Reset node attributes to the initial state as defined in the constructor or the passed default node...
virtual bool GetModifiedSinceRead()
virtual int GetFirstType()
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
alternative method to propagate events generated in Storage nodes
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.
MRML node to represent a 3D surface model.
A set of MRML Nodes that supports serialization and undo/redo.
char * NoName
the string used for an unnamed colour
int NamesInitialised
Have the colour names been set? Used to do lazy copy of the Names array.
char * FileName
A file name to read text attributes from
Abstract MRML node to represent color information.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual int GetLastType()
Abstract Superclass for all specific types of MRML nodes.
std::vector< std::string > Names
A vector of names for the color table elements
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data
void operator=(const vtkMRMLStorableNode &)