Skip to content

NDD Format

Steve Pieper edited this page Feb 24, 2023 · 4 revisions

(This is a work-in-progress description of the format)

Natural DICOM Document (NDD)

The NDD format is a form of syntactic sugar on top of the DICOM JSON Model (the "DJM") with the goal of making DICOM objects easier to understand and operate on using JSON tools in various languages.

Overall Goals

  • Transformations between DJM and NDD must lossless and unambiguous
  • NDD must be compatible with standard JavaScript language and JSON tooling
  • Rely on consumers of NDD to have access to a data dictionary if they to understand tags and value representations (datatypes)
  • Support the use of JSON-LD and JSON-Schema to define and validate NDD (future work)

Core transformations

  • DICOM dataset is an Object (sequence with one element converted to element in NDD, back to one element list in DJM)
  • Tags
    • Replace hex tags with corresponding data dictionary names where available
    • Retain hex tags for unknown tags
  • Value Representation
    • Drop VR when it is defined in data dictionary
    • Preserve VR in an _vrMap object if needed
    • Since all values are lists in DJM
      • Convert single element (VM=1) lists to single value in NDD
      • Convert single element NDD values to lists in DJM
    • Sequence items in DJM become Objects in NDD (Recursively defined)
  • Media storage metaheader is stored in _meta attribute of NDD dataset

Other issues handled in same way as DJM

  • Bulk data URIs, inline binary
  • Private Attributes
  • Special case VR
    • decimal strings that don't map perfectly to JSON Numbers
    • character sets

Motivation

The valuable semantics of DICOM are often obscured by the complex syntax. Many tools such as dsrdump or dsr2html create human readable versions of sophisticated DICOM objects, but these are one-way conversions that tend to hide the internal structure of the object. The user of NDD should have convenient access to the elements while working within the overall organization of the original object.

Examples

  • This example supports drag-and-drop display of Part 10 DICOM files and display of corresponding NDD form. currently broken... See the dcmjs source code and tests instead.