ENH: Added saving of DICOM scalar volume voxel quantity&unit in volume node
It implements functionality originally implemented in this commit (but later reverted due to regressions): "ENH: init quantity/units in scalar volume plugin" (4ac23a02).
This commit is functionally equivalent (except CT quantity incorrect code value has been fixed in
mapSOPClassUIDToDICOMQuantityAndUnits
).
Quantity and unit of voxel values of scalar volumes can be accessed in vtkMRMLScalarVolumeNode
by using these methods:
void SetVoxelValueQuantity(vtkCodedEntry*);
vtkGetObjectMacro(VoxelValueQuantity, vtkCodedEntry);
void SetVoxelValueUnit(vtkCodedEntry*);
vtkGetObjectMacro(VoxelValueUnit, vtkCodedEntry);
vtkCodedEntry
class was added that simplifies storage, printing, serialization of code scheme/value/meaning triplets
so that it can be easily added to other node types in the future.
DICOMScalarVolumePlugin
sets these values when the data is loaded from DICOM.
Added test of setting quantity and unit in scalar volume node during DICOM import (py_DICOMReaders test
).