F.3 Transformation with other DICOM Formats

F.3.1 Native DICOM Model XML

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 "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

<NativeDicomModel>

<DicomAttribute tag= ggggee01 … />

<DicomAttribute tag= ggggee02 … />

</NativeDicomModel>

{

ggggee01 : { … },

ggggee02 : { … },

}

<DicomAttribute

tag= ggggeeee

vr= VR >

<Value number="1"> Value </Value>

</DicomAttribute>

ggggeeee : {

"vr": VR ,

"Value": [ Value ]

}

<DicomAttribute tag= ggggeeee … >

<Value number="1"> Value1 </Value>

<Value number="2"> Value2 </Value>

</DicomAttribute>

ggggeeee : {

"Value": [ Value1 ,

Value2 , …

]

}

<DicomAttribute tag= ggggeeee … >

</DicomAttribute>

ggggeeee : {

}

<DicomAttribute tag= ggggeeee vr="PN" … >

<PersonName number="1">

<Alphabetic>

<FamilyName> SB1

</FamilyName>

<GivenName> SB2

</GivenName>

<MiddleName> SB3

</MiddleName>

<NamePrefix> SB4

</NamePrefix>

<NameSuffix> SB5

</NameSuffix>

</Alphabetic>

<Ideographic>

<FamilyName> ID1

</FamilyName>

</Ideographic>

<Phonetic>

<FamilyName> PH1

</FamilyName>

</Phonetic>

</PersonName>

<PersonName number="2">

<Alphabetic>

<FamilyName> SB6

</FamilyName>

</Alphabetic>

</PersonName>

</DicomAttribute>

ggggeeee : {

"vr": "PN",

"Value": [

{

" Alphabetic " : "SB1^SB2^SB3^SB4^SB5",

"Ideographic": "ID1^ID2^ID3^ID4^ID5" ,

"Phonetic": "PH1^PH2^PH3^PH4^PH5"

},

{

"Alphabetic":

" SB6 "

}

]

}

<DicomAttribute tag= ggggeeee vr="SQ" … >

<Item number="1">

<DicomAttribute tag= ggggee01 … />

<DicomAttribute tag= ggggee02 … />

</Item>

<Item number="2">

<DicomAttribute tag= ggggee01 … />

<DicomAttribute tag= ggggee02 … />

</Item>

<Item number="3">

</Item>

</DicomAttribute>

ggggeeee : {

"vr": "SQ",

"Value":

[

{

ggggee01 : { … },

ggggee02 : { … },

}

{

ggggee01 : { … },

ggggee02 : { … },

}

{ }

]

}

<DicomAttribute tag= ggggeeee … >

<BulkData URI= BulkDataURI >

</DicomAttribute>

ggggeeee : {

"BulkDataURI": BulkDataURI

}

<DicomAttribute tag= ggggeeee … >

<InlineBinary> Base64String </InlineBinary>

</DicomAttribute>

ggggeeee : {

"InlineBinary": " Base64String"

}

<DicomAttribute tag= gggg00ee PrivateCreator= PrivateCreator … >

</DicomAttribute>

ggggXXee : {

}