The transformation between the Native DICOM Model XML and the DICOM JSON model cannot be done through the use of generic XML - JSON converters.
The mapping between the two formats is as follows (see also Table F.3.1-1):
The XML "NativeDicomModel" element maps to the DICOM JSON Model Object
Each "DicomAttribute" element maps to an attribute object within the DICOM JSON model object
The "tag" attribute maps to the JSON object name
The Native DICOM Model XML allows for duplicate Tag values and the DICOM JSON model does not. To resolve this, private attribute Tag values must be remapped according to the conflict avoidance rules specified in Section 7.8.1 “Private Data Element Tags” in PS3.5 .
The "vr" attribute maps to the "vr" child string
"Value" elements map to members of the "Value" child array
A "Value" element with the attribute "number=n" maps to "Value[n-1]"
Empty "Value" elements are represented by "null" entries in the "Value" array
"PersonName" elements map to objects within the "Value" array. For a "PersonName" element with the attribute "number=n":
The "Alphabetic" element maps to "Value[ n-1 ].Alphabetic"
The "Ideographic" element maps to "PersonName[ n ].Ideographic"
The "Phonetic" element maps to "PersonName[ n ].Phonetic"
- "Item" elements map to members of the "Value" child array
An "Item" element with the attribute "number=n" maps to "Value[n-1]"
Empty "Item" elements are represented by empty JSON property entries in the "Value" array
The "uri" attribute of the "BulkData" element maps to the "BulkDataURI" string
The "InlineBinary" element maps to the "InlineBinary" string
Table F.3.1-1. XML to JSON Mapping
DICOM PS3.19 XML |
DICOM JSON Model |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|