-
Notifications
You must be signed in to change notification settings - Fork 78
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
Using length in sequences #20
Comments
That relates to the case where the item start element provides the length of the subsequent object. This doesn't seem to be related to #10, though. I will expand why on that issue. |
Thanks for explanations! I also found some files to reproduce the behavior ( |
I checked the standard http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_7.5.2.html |
Yes, I feared so. Thank you for pinpointing the part of the standard. Clearly we're against a bug which ought to be fixed with high priority. |
I wish I could help with this issue, but my background is C++ (DCMTK) and Python (Pydicom). But as an idea, you could design this crate to allow the user to be responsible for providing particular information on edge cases. For example, TransferSyntaxUID, etc. The DICOM standard is huge, with a lot of deprecated/new specifications. It is quite difficult to cover all cases. |
Just copying a reply from #21 for context.
It is worth noting that two mechanisms need to be updated here, both related in some way: explicit item delimitation, and explicit sequence delimitation. And both are based on lengths in bytes, which means that the number of bytes already read needs to be tracked by the parser. |
- keep track of sequence and item nesting in a stack - check delimiters after parsing data value tokens - add parser dataset test
- check for sequence/item endings after start if len = 0 - clarify TODO note regarding EOF - more tests, uniformize common impl into helper fn
There's a TODO
https://github.com/Enet4/dicom-rs/blob/master/object/src/mem.rs#L305
Is it clear how it should be implemented? It may fix #10
The text was updated successfully, but these errors were encountered: