Project

General

Profile

Actions

Feature #1055

open

Support alternative keywords for NaN and infinity in dcm2json

Added by Marco Eichelberg over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Library and Apps
Target version:
-
Start date:
2023-01-11
Due date:
% Done:

0%

Estimated time:
Module:
dcmdata
Operating System:
Compiler:

Description

In the "extended mode", dcm2json converts floating point numbers that are "not a number" or infinity to the terms "nan", "inf", and "-inf", which are not part of the JSON specification but a (somewhat) common extension.

It seems that various libraries (e.g. https://github.com/Canop/JSON.parseMore and Google gson) use the terms "NaN", "Infinity" and "-Infinity" instead. An alternative "extended mode" should be added that uses these terms.

Finally, in the default strict mode, dcm2json refuses to convert DICOM datasets that contain a floating point value that is nan or inf. According to the JSON specification, these values should be encoded as "null". Check if we can add this as another mode to dcm2json and whether it would cause issues in the conversion of JSON to DICOM.


Related issues 1 (1 open0 closed)

Related to DCMTK - Feature #1086: Implement support for DICOM CP 2275 in dcm2jsonNew2023-11-11

Actions
Actions

Also available in: Atom PDF