22 #ifndef __vtkSlicerUnitsLogic_h 23 #define __vtkSlicerUnitsLogic_h 31 #include "vtkSlicerUnitsModuleLogicExport.h" 49 virtual void PrintSelf(ostream& os, vtkIndent indent) VTK_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);
127 static double GetDisplayCoefficient(
const char* displayPrefix,
const char* valuePrefix =
"");
137 virtual
void OnMRMLSceneStartBatchProcess() VTK_OVERRIDE;
140 virtual
void OnMRMLNodeModified(
vtkMRMLNode* modifiedNode) VTK_OVERRIDE;
143 virtual
void AddDefaultsUnits();
149 virtual
void SetMRMLSceneInternal(
vtkMRMLScene* newScene) VTK_OVERRIDE;
154 virtual
void RegisterNodes() VTK_OVERRIDE;
155 virtual
void RegisterNodesInternal(
vtkMRMLScene* scene);
187 const
char* quantity = "length",
188 const
char* prefix = "",
189 const
char* suffix = "",
191 double min = -10000.,
193 double displayCoeff = 1.0,
194 double displayOffset = 0.0);
198 void SaveDefaultUnits();
203 void RestoreDefaultUnits();
214 std::map<
std::
string,
std::
string> CachedDefaultUnits;
218 bool RestoringDefaultUnits;
Superclass for MRML logic classes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
A set of MRML Nodes that supports serialization and undo/redo.
virtual void ObserveMRMLScene()
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.