21#ifndef __vtkMRMLUnitNode_h
22#define __vtkMRMLUnitNode_h
38 void PrintSelf(ostream& os, vtkIndent indent)
override;
51 void WriteXML(ostream& of,
int indent)
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);
Abstract Superclass for all specific types of MRML nodes.
Node that holds the information about a unit.
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
void PrintSelf(ostream &os, vtkIndent indent) override
void SetQuantity(const char *quantity)
void operator=(const vtkMRMLUnitNode &)
std::string WrapValueWithPrefix(const std::string &value) const
std::string LastValueString
static vtkMRMLUnitNode * New()
std::string LastDisplayString
void SetName(const char *name) override
virtual const char * GetDisplayValueStringFromDisplayValue(double displayValue)
virtual double GetValueFromDisplayValue(double value)
const char * GetDisplayStringFromValue(double value)
const char * GetDisplayStringFormat()
std::string WrapValueWithPrefixAndSuffix(const std::string &value) const
vtkMRMLUnitNode(const vtkMRMLUnitNode &)
double DisplayCoefficient
void Reset(vtkMRMLNode *defaultNode) override
Reimplemented to prevent reset if unit node is a singleton.
void ReadXMLAttributes(const char **atts) override
Set node attributes.
~vtkMRMLUnitNode() override
const char * GetQuantity()
virtual double GetDisplayValueFromValue(double value)
virtual const char * GetDisplayStringFromDisplayValueString(const char *displayValue)
std::string WrapValueWithSuffix(const std::string &value) const