View Issue Details

IDProjectCategoryView StatusLast Update
0004225Slicer4Core: CLI infrastructurepublic2016-06-28 17:46
Reporterjohan.andruejolAssigned Tojcfr 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0004225: Make CLI unit aware
Description

Since there is infrastructure in Slicer to support units, it would be nice to be able to specify in a CLI what type of unit a field expects something.

Additional Information

For example, in the CLI's xml, one would have the following field:

<integer>
<name>radius</name>
<label>radius</label>
<longflag>radius</longflag>
<description><![CDATA[Radius(in mm).]]>/description>
<quantity>Length</quantity>
</integer>

The corresponding GUI element would then use a unit-aware widget with the "Length" quantity.

TagsNo tags attached.

Activities

fedorov

fedorov

2016-06-28 17:46

developer   ~0014022

As a side note, DICOM has a mechanism to support semantics for describing quantities and units.

UCUM is used for units: http://unitsofmeasure.org/trac, and various terminologies are used for quantities. Some examples of quantity definitions are here: http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_D.html#para_5a00de2c-9c86-4b9b-aa0a-19ff0d09d0b0.

As a step towards reconciliation of SEM with DICOM, I would suggest to at least use a separate attribute <units> to explicitly encode the units, instead of hiding it inside <description>.

Here's an example of how quantity/units can be described in DICOM using Real World Value Mapping module.

(0040,9096) SQ (Sequence with explicit length #=1)      # 578, 1 RealWorldValueMappingSequence
  (fffe,e000) na (Item with explicit length #=8)          # 570, 1 Item
    (0028,3003) LO [Standardized Uptake Value body weight]  #  38, 1 LUTExplanation
    (0040,08ea) SQ (Sequence with explicit length #=1)      #  86, 1 MeasurementUnitsCodeSequence
      (fffe,e000) na (Item with explicit length #=3)          #  78, 1 Item
        (0008,0100) SH [{SUVbw}g/ml]                            #  12, 1 CodeValue
        (0008,0102) SH [UCUM]                                   #   4, 1 CodingSchemeDesignator
        (0008,0104) LO [Standardized Uptake Value body weight]  #  38, 1 CodeMeaning
      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
    (0040,9210) SH [{SUVbw}g/ml]                            #  12, 1 LUTLabel
    (0040,9211) US 32761                                    #   2, 1 RealWorldValueLastValueMapped
    (0040,9216) SS 0                                        #   2, 1 RealWorldValueFirstValueMapped
    (0040,9220) SQ (Sequence with explicit length #=2)      # 342, 1 QuantityDefinitionSequence
      (fffe,e000) na (Item with explicit length #=3)          # 154, 1 Item
        (0040,a040) CS [CODE]                                   #   4, 1 ValueType
        (0040,a043) SQ (Sequence with explicit length #=1)      #  50, 1 ConceptNameCodeSequence
          (fffe,e000) na (Item with explicit length #=3)          #  42, 1 Item
            (0008,0100) SH [G-C1C6]                                 #   6, 1 CodeValue
            (0008,0102) SH [SRT]                                    #   4, 1 CodingSchemeDesignator
            (0008,0104) LO [Quantity]                               #   8, 1 CodeMeaning
          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
        (0040,a168) SQ (Sequence with explicit length #=1)      #  68, 1 ConceptCodeSequence
          (fffe,e000) na (Item with explicit length #=3)          #  60, 1 Item
            (0008,0100) SH [126400]                                 #   6, 1 CodeValue
            (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator
            (0008,0104) LO [Standardized Uptake Value]              #  26, 1 CodeMeaning
          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
      (fffe,e000) na (Item with explicit length #=3)          # 172, 1 Item
        (0040,a040) CS [CODE]                                   #   4, 1 ValueType
        (0040,a043) SQ (Sequence with explicit length #=1)      #  60, 1 ConceptNameCodeSequence
          (fffe,e000) na (Item with explicit length #=3)          #  52, 1 Item
            (0008,0100) SH [G-C036]                                 #   6, 1 CodeValue
            (0008,0102) SH [SRT]                                    #   4, 1 CodingSchemeDesignator
            (0008,0104) LO [Measurement Method]                     #  18, 1 CodeMeaning
          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
        (0040,a168) SQ (Sequence with explicit length #=1)      #  76, 1 ConceptCodeSequence
          (fffe,e000) na (Item with explicit length #=3)          #  68, 1 Item
            (0008,0100) SH [126410]                                 #   6, 1 CodeValue
            (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator
            (0008,0104) LO [SUV body weight calculation method]     #  34, 1 CodeMeaning
          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem
    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem
    (0040,9224) FD 0                                        #   8, 1 RealWorldValueIntercept
    (0040,9225) FD 0.00037512500000000006                   #   8, 1 RealWorldValueSlope
fedorov

fedorov

2016-06-28 17:46

developer   ~0014023

Last edited: 2016-06-28 17:46

View 2 revisions

@pieper - I added you FYI

Issue History

Date Modified Username Field Change
2016-06-28 11:00 johan.andruejol New Issue
2016-06-28 11:00 johan.andruejol Status new => assigned
2016-06-28 11:00 johan.andruejol Assigned To => jcfr
2016-06-28 17:00 jcfr Status assigned => acknowledged
2016-06-28 17:01 jcfr Target Version Slicer 4.6.0 =>
2016-06-28 17:46 fedorov Note Added: 0014022
2016-06-28 17:46 fedorov Note Added: 0014023
2016-06-28 17:46 fedorov Note Edited: 0014023 View Revisions