21 #ifndef __vtkMRMLUnitNode_h 22 #define __vtkMRMLUnitNode_h 38 void PrintSelf(ostream& os, vtkIndent indent)
override;
51 void WriteXML(ostream& of,
int indent)
override;
67 const char* GetQuantity();
68 void SetQuantity(
const char* quantity);
74 virtual double GetDisplayValueFromValue(
double value);
78 virtual double GetValueFromDisplayValue(
double value);
81 const char* GetDisplayStringFromValue(
double value);
87 const char* GetDisplayStringFormat();
92 void SetName(
const char* name)
override;
98 vtkGetStringMacro(Prefix);
99 vtkSetStringMacro(Prefix);
106 vtkGetStringMacro(Suffix);
107 vtkSetStringMacro(Suffix);
112 vtkGetMacro(Precision,
int);
113 vtkSetClampMacro(Precision,
int, 0, VTK_INT_MAX);
119 vtkGetMacro(MinimumValue,
double);
120 vtkSetMacro(MinimumValue,
double);
126 vtkGetMacro(MaximumValue,
double);
127 vtkSetMacro(MaximumValue,
double);
132 vtkGetMacro(DisplayCoefficient,
double);
133 vtkSetMacro(DisplayCoefficient,
double);
138 vtkGetMacro(DisplayOffset,
double);
139 vtkSetMacro(DisplayOffset,
double);
147 virtual const char* GetDisplayValueStringFromDisplayValue(
double displayValue);
148 virtual const char* GetDisplayStringFromDisplayValueString(
const char* displayValue);
153 std::string WrapValueWithPrefix(
const std::string& value)
const;
154 std::string WrapValueWithSuffix(
const std::string& value)
const;
155 std::string WrapValueWithPrefixAndSuffix(
const std::string& value)
const;
virtual void Reset(vtkMRMLNode *defaultNode)
Reset node attributes to the initial state as defined in the constructor or the passed default node...
virtual void ReadXMLAttributes(const char **atts)
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
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.
std::string LastDisplayString
virtual void SetName(const char *)
Name of this node, to be set by the user.
virtual void WriteXML(ostream &of, int indent)
std::string LastValueString
double DisplayCoefficient
void PrintSelf(ostream &os, vtkIndent indent) override
Abstract Superclass for all specific types of MRML nodes.
Node that holds the information about a unit.