10 #ifndef __vtkMRMLMeasurement_h 11 #define __vtkMRMLMeasurement_h 20 #include <vtkCommand.h> 21 #include <vtkDoubleArray.h> 22 #include <vtkObject.h> 23 #include <vtkPolyData.h> 24 #include <vtkSmartPointer.h> 81 InputDataModifiedEvent = vtkCommand::UserEvent + 555
85 void PrintSelf(ostream& os, vtkIndent indent)
override;
103 virtual void Compute() = 0;
106 vtkGetMacro(Enabled,
bool);
107 virtual void SetEnabled(
bool enabled);
108 virtual void EnabledOn();
109 virtual void EnabledOff();
112 vtkGetMacro(Name, std::string);
113 vtkSetMacro(Name, std::string);
122 void SetValue(
double value,
const char* quantityName =
nullptr);
125 vtkGetMacro(Value,
double);
133 void SetDisplayValue(
double value,
const char* units=
nullptr,
double displayCoefficient=0.0);
137 double GetDisplayValue();
140 vtkGetMacro(ValueDefined,
bool);
143 vtkGetMacro(Units, std::string);
144 virtual void SetUnits(std::string units);
149 vtkGetMacro(DisplayCoefficient,
double);
150 vtkSetMacro(DisplayCoefficient,
double);
153 vtkGetMacro(Description, std::string);
154 vtkSetMacro(Description, std::string);
157 vtkGetMacro(PrintFormat, std::string);
158 virtual void SetPrintFormat(std::string format);
177 vtkGetMacro(LastComputationResult,
int);
179 const char* GetLastComputationResultAsPrintableString();
182 std::string GetValueWithUnitsAsPrintableString();
185 void SetControlPointValues(vtkDoubleArray* inputValues);
186 vtkGetObjectMacro(ControlPointValues, vtkDoubleArray);
191 void SetMeshValue(vtkPolyData* meshValue);
192 virtual vtkPolyData* GetMeshValue();
212 bool ValueDefined{
false};
213 double DisplayCoefficient{1.0}; std::string Units;
vtkSmartPointer< vtkCodedEntry > QuantityCode
vtkSmartPointer< vtkCodedEntry > UnitsCode
Class for storing well-defined measurement results, using coded entries.
vtkSmartPointer< vtkPolyData > MeshValue
Surface mesh for displaying computed value.
Simple class for storing standard coded entries (coding scheme, value, meaning triplets) ...
vtkWeakPointer< vtkMRMLNode > InputMRMLNode
MRML node used to calculate the measurement.
vtkSmartPointer< vtkCodedEntry > MethodCode
vtkSmartPointer< vtkCodedEntry > DerivationCode
Abstract Superclass for all specific types of MRML nodes.
Node that holds the information about a unit.
vtkSmartPointer< vtkDoubleArray > ControlPointValues
Per-control point measurements.