21 #ifndef __vtkMRMLUnitNode_h 22 #define __vtkMRMLUnitNode_h 38 virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
47 virtual
void ReadXMLAttributes( const
char** atts) VTK_OVERRIDE;
51 virtual
void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
59 virtual const
char* GetNodeTagName() VTK_OVERRIDE {
return "Unit";}
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 virtual void SetName(
const char* name) VTK_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...
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
std::string LastDisplayString
virtual void SetName(const char *)
Name of this node, to be set by the user.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
std::string LastValueString
double DisplayCoefficient
Abstract Superclass for all specific types of MRML nodes.
Node that holds the information about a unit.