Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length of Decimal String larger than 16 characters #366

Open
rvantklooster opened this issue Oct 2, 2023 · 0 comments
Open

Length of Decimal String larger than 16 characters #366

rvantklooster opened this issue Oct 2, 2023 · 0 comments

Comments

@rvantklooster
Copy link
Contributor

Given a Decimal String with the numerical value of 0.99990081787109 (Number), and writing it to a DICOM file, then the resulting string is 17 characters wide.

In DecimalString::formatValue (ValueRepresentation.js), the function toExponential() guarantee that the resulting string is maximum 16 characters wide. See https://github.com/dcmjs-org/dcmjs/blob/master/src/ValueRepresentation.js#L535C1-L545C6

We copied the behavior from pydicom to properly truncate the string and made a PR. See https://github.com/pydicom/pydicom/blob/main/src/pydicom/valuerep.py#L912

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant