10 #ifndef __vtkMRMLMeasurement_h 11 #define __vtkMRMLMeasurement_h 20 #include <vtkDoubleArray.h> 21 #include <vtkObject.h> 22 #include <vtkPolyData.h> 23 #include <vtkSmartPointer.h> 48 void PrintSelf(ostream& os, vtkIndent indent)
override;
51 virtual void Initialize();
62 virtual void Compute() = 0;
65 vtkSetMacro(Enabled,
bool);
66 vtkGetMacro(Enabled,
bool);
67 vtkBooleanMacro(Enabled,
bool);
70 vtkGetMacro(Name, std::string);
71 vtkSetMacro(Name, std::string);
74 vtkGetMacro(Value,
double);
75 void SetValue(
double value);
79 void SetValue(
double value,
const std::string& units,
const std::string& printFormat,
int lastComputationResult);
82 vtkGetMacro(ValueDefined,
bool);
85 vtkGetMacro(Units, std::string);
86 vtkSetMacro(Units, std::string);
89 vtkGetMacro(Description, std::string);
90 vtkSetMacro(Description, std::string);
93 vtkGetMacro(PrintFormat, std::string);
94 vtkSetMacro(PrintFormat, std::string);
113 vtkGetMacro(LastComputationResult,
int);
115 const char* GetLastComputationResultAsPrintableString();
118 std::string GetValueWithUnitsAsPrintableString();
121 std::string GetAsString();
125 bool SetFromString(
const std::string& content);
128 void SetControlPointValues(vtkDoubleArray* inputValues);
129 vtkGetObjectMacro(ControlPointValues, vtkDoubleArray);
131 #ifdef USE_POLYDATA_MEASUREMENTS 132 void SetPolyDataValues(vtkPolyData* inputValues);
134 vtkGetObjectMacro(PolyDataValues, vtkPolyData);
152 bool ValueDefined{
false};
163 vtkDoubleArray* ControlPointValues{
nullptr};
164 #ifdef USE_POLYDATA_MEASUREMENTS 165 vtkPolyData* PolyDataValues{
nullptr};
168 vtkWeakPointer<vtkMRMLNode> InputMRMLNode;
Class for storing well-defined measurement results, using coded entries.
Simple class for storing standard coded entries (coding scheme, value, meaning triplets) ...
Abstract Superclass for all specific types of MRML nodes.