22 #ifndef __vtkSlicerUnitsLogic_h 23 #define __vtkSlicerUnitsLogic_h 31 #include "vtkSlicerUnitsModuleLogicExport.h" 49 void PrintSelf(ostream& os, vtkIndent indent)
override;
54 const char* quantity =
"length",
55 const char* prefix =
"",
56 const char* suffix =
"",
62 void SetDefaultUnit(
const char* quantity,
const char*
id);
101 static double GetSIPrefixCoefficient(
const char* prefix);
129 static double GetDisplayCoefficient(
const char* displayPrefix,
const char* valuePrefix =
"",
double power=1);
145 virtual void AddDefaultsUnits();
157 virtual void RegisterNodesInternal(
vtkMRMLScene* scene);
189 const char* quantity =
"length",
190 const char* prefix =
"",
191 const char* suffix =
"",
193 double min = -10000.,
195 double displayCoeff = 1.0,
196 double displayOffset = 0.0);
200 void SaveDefaultUnits();
205 void RestoreDefaultUnits();
216 std::map<std::string, std::string> CachedDefaultUnits;
220 bool RestoringDefaultUnits;
Superclass for MRML logic classes.
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void OnMRMLSceneStartBatchProcess()
vtkMRMLScene * UnitsScene
virtual void OnMRMLNodeModified(vtkMRMLNode *)
A set of MRML Nodes that supports serialization and undo/redo.
virtual void RegisterNodes()
virtual void ObserveMRMLScene()
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
Slicer logic for unit manipulation.
Abstract Superclass for all specific types of MRML nodes.
static vtkMRMLAbstractLogic * New()
Node that holds the information about a unit.