Skip to content

Main content

DICOM Decimal String Scale Tool

Inspect the lexical decimal scale of one DICOM DS token with ASCII-space padding and the 16-byte limit, without evaluating its numeric magnitude.

Loading tool…

Description

Return fractionDigits, safe-integer exponent, and fractionDigits-exponent as lexicalScale.

Clinical exchange formats use exact delimiters, character grammars, and scoped identifiers. A local token check addresses one syntax condition and can succeed without validating a complete message or its clinical meaning.

Return fractionDigits, safe-integer exponent, and fractionDigits-exponent as lexicalScale.

When to use this tool

Use DICOM Decimal String Scale when you need one bounded spelling, delimiter, or identifier component.

How to use the tool and how it works

  1. Enter token. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read fractionDigits, exponent, lexicalScale. Use the output convention below.

Require token at most 16 characters, trim only outer ASCII spaces, and parse the supported signed decimal/exponent spelling. Return fractionDigits, safe-integer exponent, and fractionDigits-exponent as lexicalScale.1

DICOM Decimal String permits decimal or exponent notation within its 16-byte limit. The lexical scale described here preserves written decimal structure without converting it to a binary numeric value.2

Input fieldMeaning and unitsAccepted input
tokenText in the explicitly supported lexical grammar.Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 16.
Output fieldInterpretationReturned shape
fractionDigitsFraction DigitsRequired. Safe integer.
exponentExponentRequired. Safe integer.
lexicalScaleWritten fractional digits minus exponent, distinct from binary floating-point precision.Required. Safe integer.
json
{
  "input": {
    "token": " 1.20E+2"
  },
  "output": {
    "fractionDigits": 2,
    "exponent": 2,
    "lexicalScale": 0
  }
}

Limitations and assumptions

  • Scale is lexical rather than binary precision; no numeric value is evaluated and complete DICOM element encoding or clinical unit interpretation is not validated.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use the relevant full standard, implementation profile, and validated parser when interoperable or clinical record validity matters.

References

  1. Calculation and input contract: health-informatics/dicom-decimal-string-scale — tool.io

  2. DICOM PS3.5: Value Representation — DICOM Standards Committee / NEMA

Similar or alternative tools