Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"You can't make a program without broken egos."


devel / comp.protocols.dicom / Re: Incompatibilities between DICOM binary, XML and JSON encoding capabilities

SubjectAuthor
o Re: Incompatibilities between DICOM binary, XML and JSON encoding capabilitiesMathieu Malaterre

1
Re: Incompatibilities between DICOM binary, XML and JSON encoding capabilities

<099caaec-4541-420e-be44-f43c7f70264an@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=582&group=comp.protocols.dicom#582

  copy link   Newsgroups: comp.protocols.dicom
X-Received: by 2002:a05:620a:2b83:b0:6fc:cbd8:25d7 with SMTP id dz3-20020a05620a2b8300b006fccbd825d7mr2736044qkb.350.1673348643384;
Tue, 10 Jan 2023 03:04:03 -0800 (PST)
X-Received: by 2002:a05:6830:40c8:b0:677:4390:19f5 with SMTP id
h8-20020a05683040c800b00677439019f5mr3565873otu.299.1673348643015; Tue, 10
Jan 2023 03:04:03 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.protocols.dicom
Date: Tue, 10 Jan 2023 03:04:02 -0800 (PST)
In-Reply-To: <8d28ba22-9a17-47a2-a23b-913f9bc8a689@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=91.173.12.104; posting-account=5syELgoAAABMLWsjbxhk8Wo7CLxGgTPG
NNTP-Posting-Host: 91.173.12.104
References: <8d28ba22-9a17-47a2-a23b-913f9bc8a689@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <099caaec-4541-420e-be44-f43c7f70264an@googlegroups.com>
Subject: Re: Incompatibilities between DICOM binary, XML and JSON encoding capabilities
From: mathieu.malaterre@gmail.com (Mathieu Malaterre)
Injection-Date: Tue, 10 Jan 2023 11:04:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 61
 by: Mathieu Malaterre - Tue, 10 Jan 2023 11:04 UTC

On Wednesday, August 29, 2018 at 11:24:00 AM UTC+2, gunter zeilinger wrote:
> I stumbled over following incompatibilities between DICOM binary, XML and JSON encoding capabilities:
>
> 1. The value space of IEEE 754:1985 16-bit and 32-bit Floating Point Numbers - and therefore DICOM attributes with Value Representation (VR) FL and FD - includes codes for NaN, +ve Infinity and -ve Infinity, which representation is only supported by XML datatypes xs:float and xs:double [https://www.w3.org/TR/xmlschema-2/#float]:
>
> > The special values positive and negative infinity and not-a-number have lexical representations INF, -INF and NaN, respectively.
>
> , but not by a JSON Number [https://tools.ietf.org/html/rfc7159.html#page-7]
>
> > Numeric values that cannot be represented in the grammar below (such as Infinity and NaN) are not permitted.
>
> 2. In the binary encoding individual values inside multiple values can only be absent for attributes with a string type VR, but not with a binary VR.. E.g. you can encode an attribute with VR IS with an empty first and a non-empty second value by "\2", but you can't encode an attribute with VR SS,SL,US,UL with an empty first value. In XML and JSON individual values inside multiple values can be absent or set to null for attributes with any VR, E..g.
>
> <DicomAttribute tag=ggggeeee vr="US">
> <Value number="2">2</Value>
> </DicomAttribute>
>
> ggggeeee : { "vr": "US" , "Value": [ null, 2 ] }
>
> 3. The DICOM binary encoding does not constrain values of attributes with VR IS and DS to string representations of integer of float numbers, but the JSON representation does.
>
> 4. The DICOM binary encoding does not constrain values of attributes with VR PN to valid Person Names (up to 3 groups of up to 5 components), but the XML representation - and concerning the number of groups also the JSON representation - does.
>
> Issue 3 and 4 are rather issues of individual implementations and not of the specification. But it may help improving interoperability if the specification would recommend how a gateway implementation - which is itself not responsible for the incorrect values in received data sets - shall handle them.
>
> Issue 2 may be "solved" by constraining the absence of values in multi-values in the XML and JSON representation also to attributes with a string type VR.
>
> Issue 1 may be solved by explicitly permitting bare (=without quotes) "Infinity", "-Infinity", "NaN" as values for JSON numbers - contrary to RFC 7159 but in accordance with many JSON implementations (https://stackoverflow.com/questions/21896792/force-json-stringify-to-emit-nan-infinity-or-js-json-lib-that-does-so ).
>
> Any thoughts?

There is also the famous trick of changing the VR back to UN in which case you can safely send base64...

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor