10#ifndef __vtkMRMLMeasurement_h
11#define __vtkMRMLMeasurement_h
20#include <vtkCommand.h>
21#include <vtkDoubleArray.h>
23#include <vtkPolyData.h>
24#include <vtkSmartPointer.h>
85 void PrintSelf(ostream& os, vtkIndent indent)
override;
113 vtkGetMacro(
Name, std::string);
114 vtkSetMacro(
Name, std::string);
123 void SetValue(
double value,
const char* quantityName =
nullptr);
134 void SetDisplayValue(
double value,
const char* units=
nullptr,
double displayCoefficient=0.0);
Simple class for storing standard coded entries (coding scheme, value, meaning triplets)
vtkSmartPointer< vtkCodedEntry > QuantityCode
virtual VTK_NEWINSTANCE vtkMRMLMeasurement * CreateInstance() const =0
@ NoChange
can be used to indicate to keep the current value
vtkMRMLUnitNode * GetUnitNode(const char *quantityName)
Helper function to get unit node from the scene based on quantity name.
vtkSmartPointer< vtkDoubleArray > ControlPointValues
Per-control point measurements.
virtual vtkCodedEntry * GetQuantityCode()
vtkSmartPointer< vtkCodedEntry > MethodCode
vtkSmartPointer< vtkCodedEntry > DerivationCode
~vtkMRMLMeasurement() override
vtkSmartPointer< vtkPolyData > MeshValue
Surface mesh for displaying computed value.
void SetValue(double value, const char *quantityName=nullptr)
virtual void Copy(vtkMRMLMeasurement *source)
Copy one type into another (deep copy)
void SetControlPointValues(vtkDoubleArray *inputValues)
Set the per-control point measurement values.
void SetMeshValue(vtkPolyData *meshValue)
vtkMRMLNode * GetInputMRMLNode()
Get input MRML node used for calculating the measurement.
virtual vtkCodedEntry * GetMethodCode()
virtual vtkPolyData * GetMeshValue()
virtual void EnabledOff()
void SetInputMRMLNode(vtkMRMLNode *node)
Set input MRML node used for calculating the measurement.
double DisplayCoefficient
virtual void Clear()
Reset state of object. Removes all content.
virtual vtkCodedEntry * GetUnitsCode()
void PrintSelf(ostream &os, vtkIndent indent) override
void SetUnitsCode(vtkCodedEntry *entry)
Copy content of coded entry.
void SetDisplayValue(double value, const char *units=nullptr, double displayCoefficient=0.0)
void SetMethodCode(vtkCodedEntry *entry)
Copy content of coded entry.
void SetDerivationCode(vtkCodedEntry *entry)
Copy content of coded entry.
ComputationResult LastComputationResult
virtual void SetPrintFormat(std::string format)
void operator=(const vtkMRMLMeasurement &)
vtkMRMLMeasurement(const vtkMRMLMeasurement &)
vtkWeakPointer< vtkMRMLNode > InputMRMLNode
MRML node used to calculate the measurement.
std::string GetValueWithUnitsAsPrintableString()
Get measurement value and units as a single human-readable string.
virtual void SetUnits(std::string units)
virtual void ClearValue(ComputationResult computationResult=NoChange)
vtkSmartPointer< vtkCodedEntry > UnitsCode
const char * GetLastComputationResultAsPrintableString()
Get last computation result as human-readable string.
virtual vtkCodedEntry * GetDerivationCode()
virtual void SetEnabled(bool enabled)
void SetQuantityCode(vtkCodedEntry *entry)
Copy content of coded entry.
Abstract Superclass for all specific types of MRML nodes.
Node that holds the information about a unit.