Hi,
OFStandard::ftoa produces incompatible with a javascript world "nan", "inf" , "-inf", it should be NaN Infinity -Infinity
it is important only for writeJson method, so, may be it is good idea to add new ftoa formatting flag and use it only in FL etc writeJson
or just change it from nan to NaN because as i see OFStandard::atof can handle both variants
Thanks!
Nan and Infinity
Moderator: Moderator Team
Re: Nan and Infinity
update: my solution is changed DcmJsonFormat::normalizeDecimalString with check and conversion
-
- OFFIS DICOM Team
- Posts: 1484
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Re: Nan and Infinity
Unfortunately, JSON does not have official keywords for "not a number" and "infinity". DICOM will define official keywords in CP 2275, which is not public yet. These will probably be the same ones as supported by JavaScript, but in any case DCMTK will write JSON compatible with CP 2275, once it is available.
Re: Nan and Infinity
agree, may be move static functions like normalizeDecimalString etc to virtual table of the DcmJsonFormat ? to have more flex control.
thanks!
thanks!
-
- OFFIS DICOM Team
- Posts: 1484
- Joined: Tue, 2004-11-02, 17:22
- Location: Oldenburg, Germany
- Contact:
Re: Nan and Infinity
You mean, we should declare some methods in class DcmJsonFormat virtual that are currently not declared so? That would certainly be possible. Perhaps you could propose a patch.
Who is online
Users browsing this forum: Google [Bot] and 1 guest