Comments (4)
There are some other places where converting to native times causes differences due to rounding errors, so we thought about keeping the original value in a _original
field or similar so that this kind of issue won't lead to a validation error on round trips. Otherwise I'm not sure we want NaNs in the fields that we plan to compute on - a goal of the normalizing steps is to handle all the special cases so that application code isn't littered with if statements. Since I don't think the standard allows NaN or Infinity so it's fair to reject them but I understand the goal of dealing well with nonstandard data.
from dcmjs.
Makes sense, however I don't believe this is non-standard data or a special case. We've just seen it in the real world coming from a GE Vivid S70 v201.102.0 Ultrasound machine.
It appears that NaN
values are sometimes put into tags with a VR of FD
(double float) that are required by the spec, but for which the machine doesn't have a useful/sensible/legitimate value for. So they put NaN
to fill the gap. This seems reasonable, and AFAICT is valid according to the DICOM spec.
The FD
VR is defined as Double precision binary floating point number represented in IEEE 754:1985 64-bit Floating Point Number Format.
(link), and both NaN and infinity values are defined by IEEE 754:1985, so these values are allowed in FD
tags. However they're not allowed in other VRs that store numeric values, such as DS
(decimal string) and IS
(integer string).
Thoughts?
I've just opened a PR that removes the NaN check and adds a couple of tests.
from dcmjs.
Ah, I see, FD
no DS
, yes, allowing NaN
and Inf
makes sense, thanks for the explanation.
from dcmjs.
🎉 This issue has been resolved in version 0.29.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
from dcmjs.
Related Issues (20)
- The saved image file is inconsistent with the source file. HOT 9
- private Tags take element wrong into account HOT 1
- Segmentation loading with wadors not working HOT 1
- dcmjs-imaging HOT 2
- Invalid tag in sequence : Unable to parse MR Dicom file in dcmjs. Cornerstone able to parse and works fine HOT 1
- Order of tags gets messed up when edition DICOM SEG HOT 5
- Length of Decimal String larger than 16 characters
- Lots of 'Invalid vr type... ' log messages in dcmjs release 0.29.11 HOT 4
- modifying dicom meta-data HOT 2
- Reading dicom file HOT 2
- Getting ERROR: Value exceeds max length for some DICOM tags HOT 2
- Write issue for JPEG2000Loseless images HOT 3
- Issue with pixel redaction for JPEGLoseless type HOT 1
- Change in PixelSequence value HOT 1
- Support for reading from a readable stream HOT 1
- Test failing due to missing image referenced by seg HOT 1
- PN tags interpretation as union between object and string breaks DIMSE functionality HOT 2
- Can use to load dicom segment? HOT 1
- Fail to denaturalize a sequence having private tags. HOT 1
- Netlify-deployed docs site (https://dcmjs.netlify.com/) is down HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dcmjs.