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

Require DICOM times to encode with the given precision even for 0 microseconds #557

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

Enet4
Copy link
Owner

@Enet4 Enet4 commented Aug 26, 2024

Intends to resolve #556.

@jmlaka I would greatly appreciate your input on this one, if you can. The previous iteration of DicomTime made some assumptions about how the fractions of seconds component should be encoded, namely that if the number of microseconds is zero, it should always be encoded as .0 regardless of precision. From the description of VR DT in the standard (PS3.5 section 6.2), I could not find such a requirement. It sounds to me that we are supposed to comply with the precision provided and insert all the trailing zeros accordingly, which is the case when producing a time via chrono.

Enet4 added 2 commits August 26, 2024 19:52
- make no exception for zero microseconds:
  this does not seem to be DICOM compliant
  and is inconsistent with the calculated byte length
- Fix typos
- Use code formatting for date/time formats
- Turn some comments into doc comments
@Enet4 Enet4 added bug This is a bug A-lib Area: library C-core Crate: dicom-core labels Aug 26, 2024
DimitriPapadopoulos added a commit to DimitriPapadopoulos/codespell that referenced this pull request Sep 1, 2024
DimitriPapadopoulos added a commit to codespell-project/codespell that referenced this pull request Sep 2, 2024
@Enet4 Enet4 merged commit 73a9f2b into master Sep 13, 2024
4 checks passed
@Enet4 Enet4 deleted the bug/core/556-datetime-from-chrono branch November 18, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lib Area: library bug This is a bug C-core Crate: dicom-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read dicom file with some objects that contains dicom_date_time tag
1 participant