Skip to content

Main content

DICOM Pixel Spacing Pair

Format nonnegative DICOM row-then-column pixel spacing with a backslash separator and return in-plane area; image dimensions and the single-pixel exception for zero spacing remain caller-supplied context.

Loading tool…

Description

Format row/column pixel spacing and calculate nominal pixel area.

Medical-image metadata separates patient position, laterality, pixel spacing, slice spacing, padding and frame timing. Row and column spacing order matters, and slice spacing is distinct from slice thickness. A rectangular voxel or constant-frame model uses declared geometry; it does not inspect images, confirm a patient or establish a clinical finding.

Format row/column pixel spacing and calculate nominal pixel area.

When to use this tool

Use DICOM Pixel Spacing Pair when you already have rowSpacingMillimeters, columnSpacingMillimeters and need to format row/column pixel spacing and calculate nominal pixel area.

How to use the tool and how it works

  1. Enter rowSpacingMillimeters, columnSpacingMillimeters. 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 dicomValue, pixelAreaSquareMillimeters. Use the output convention below.

Require nonnegative mm spacings and each JavaScript number string at most 16 characters. Join row then column with a backslash and multiply for mm².1

Pixel spacing is ordered row then column in millimetres. The standard restricts zero values to particular singleton dimensions; this helper does not check image dimensions.2

A DS value is limited to 16 bytes. This helper checks each unrounded JavaScript number spelling against that length, without constructing or validating a complete DICOM element.3

Input fieldMeaning and unitsAccepted input
rowSpacingMillimetersRow-to-row centre spacing in mm; serialized first, with unrounded string length<=16.Required. Finite number; minimum 0.
columnSpacingMillimetersColumn-to-column centre spacing in mm; serialized second, with unrounded string length<=16.Required. Finite number; minimum 0.
Output fieldInterpretationReturned shape
dicomValueDicom ValueRequired. Text; maximum UTF-16 length 8192.
pixelAreaSquareMillimetersPixel Area Square MillimetersRequired. Finite number.
json
{
  "input": {
    "rowSpacingMillimeters": 0.5,
    "columnSpacingMillimeters": 0.8
  },
  "output": {
    "dicomValue": "0.5\\0.8",
    "pixelAreaSquareMillimeters": 0.4
  }
}

Limitations and assumptions

  • Uses unrounded numeric spelling and allows zero; this is not full DICOM DS/attribute validation and does not distinguish every image-specific zero-spacing rule.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Inspect the original DICOM attributes and complete image geometry when validating an image record. Use the relevant attribute and value-representation checks for format compliance, and actual per-frame timing when constant spacing or frame time is inadequate.

References

  1. Calculation and input contract: radiology/dicom-pixel-spacing-pair — tool.io

  2. DICOM PS3.3: Basic Pixel Spacing Calibration Macro — DICOM Standards Committee

  3. DICOM PS3.5: Decimal String value representation — DICOM Standards Committee

Similar or alternative tools