Skip to content

Main content

DICOM Planar Configuration Pixel Offset Tool

Uncompressed zero-based sample-element offset for DICOM planar versus interleaved storage, excluding bit packing and frame byte offsets.

Loading tool…

Description

Uncompressed zero-based sample-element offset for DICOM planar versus interleaved storage, excluding bit packing and frame byte offsets.

An image grid has array indices as well as physical spacing, timing, and signal conventions. A calculation on supplied metadata describes one part of that grid or signal; it does not inspect an image, validate a complete file, or interpret anatomy.

Uncompressed zero-based sample-element offset for DICOM planar versus interleaved storage, excluding bit packing and frame byte offsets.

When to use this tool

Use it for dicom planar configuration pixel offset when the required inputs and conventions are already available.

How to use the tool and how it works

  1. Enter pixelIndex, sampleIndex, pixelsPerFrame, samplesPerPixel, planar. Use the stated units and boundary conventions.
  2. Run the calculation. Correct any input error before interpreting a result.
  3. Read elementOffset. Inspect any known, defined, inclusion, or boundary flags before interpreting numeric values.

Require positive pixelsPerFrame, samplesPerPixel from one through 16, and zero-based indices within their respective ranges. For planar storage calculate sampleIndex*pixelsPerFrame+pixelIndex; otherwise calculate pixelIndex*samplesPerPixel+sampleIndex.1

DICOM distinguishes planar sample storage from interleaved sample storage.2

Input fieldMeaning and unitsAccepted input
pixelIndexPixel IndexRequired. Safe integer; minimum 0.
sampleIndexSample IndexRequired. Safe integer; minimum 0.
pixelsPerFrameTotal pixels in the modeled frame.Required. Safe integer; minimum 1.
samplesPerPixelSamples per pixel, from one through 16.Required. Safe integer; minimum 1; maximum 16.
planarPlanarRequired. Boolean.
Output fieldInterpretationReturned shape
elementOffsetZero-based offset in sample elements, not bytes.Required. Safe integer.
json
{
  "input": {
    "pixelIndex": 4,
    "sampleIndex": 1,
    "pixelsPerFrame": 10,
    "samplesPerPixel": 3,
    "planar": false
  },
  "output": {
    "elementOffset": 13
  }
}

Limitations and assumptions

  • The output is a sample element offset, not a byte offset. Bit packing, frame offsets, transfer syntax, compression, and endianness are outside this single-frame indexing calculation.
  • The field tables describe structural bounds; the mechanics also state cross-field requirements. Malformed input shapes, disallowed keys, and invalid domains cause input errors. Results must remain finite and within the declared output contract. A successful false flag or zero placeholder is distinct from an error.
  • Numeric arithmetic uses binary floating point. Exact comparisons have no hidden tolerance or decimal rounding; negative zero is exported as zero. Decimal-text integer operations retain the exactness specifically stated above.

Alternative or Complementary methods

For dicom planar configuration pixel offset, check the source records and the supplied rule before comparing the result with another method. Use a full image reader and geometry or signal analysis when the task requires interpreting image data.

References

  1. Calculation and input contract: radiology/dicom-planar-configuration-pixel-offset — tool.io

  2. DICOM PS3.3, C.7.6.3: Image Pixel Module — NEMA

Similar or alternative tools