Comments (7)
I am happy to take a look! It might help deepen my DICOM studies :D I am happy to have your guidance here!
from dicom-rs.
Thank you for reporting! This issue might be isolated enough to reproduce with a fine-grained test. I would be interested in knowing if there are any other attributes which could have triggered the error. Is there anything with the DT value representation? The DateTimeZone
error value is currently documented as an "Invalid or ambiguous combination of date with time", which suggests that a date-time is involved.
from dicom-rs.
Just a heads up, the tests show that those attributes are decoded just fine. This is very likely an issue with decoding a particular date-time in that data set. Whenever you have the time to provide the DT values which may trigger the error, I'd very much appreciate it.
from dicom-rs.
Yes, it turns out there is a seemingly malformed field:
(0010,0030) DA [1902] # 4, 1 PatientBirthDate
I am new to dicom, but this looks like wrong to me. Nevertheless this is the data I have...
from dicom-rs.
Indeed, this is yet another pseudo-DICOM value. While the standard mandates the presence of all 3 date components (YYYYMMDD
), a significant number of systems out there have the habit of producing dates in non-conforming formats.
With that said, the current behavior of the parser is to decode DICOM values inline as they are found in the data set, and I wish to move away from this behavior in the future (see #12). Still, the custom date decoding routine could be made more flexible by allowing the month and day to default to 1.
If you would like to give a shot at making this change with my guidance, please let me know. Otherwise, I can look into it eventually.
from dicom-rs.
I am glad! The date and time decoding functions are in the encoding crate, in this file. I would recommend taking a test-driven approach:
- Head down to the
tests
module and include the date value to be tested ("1902") in the appropriate test function. The test should then fail oncargo t
, given the circumstances. - Fix the function until the test passes.
I suspect that the custom date parser was already prepared for shorter values, but it was probably left untested and buggy.
from dicom-rs.
Aaah, you did it before I finally managed to get spare some time to fix it... Thank you very much!
from dicom-rs.
Related Issues (20)
- Bulk image conversion of DICOM files to a directory
- toimage command line utility error - panics on LUT value processing HOT 4
- 1-bit pixel data conversion is currently not supported
- Inspect shared/per-frame functional groups HOT 2
- Deflated Explicit VR Little Endian Case - "Could not read data set token" HOT 3
- Decompose findscu to be more modular and have an easy-to-use library HOT 2
- InMemDicomObject with defined Length retains Length value after changes to inner value of object HOT 2
- dicom_dump not visible HOT 1
- toimage utility exports jpeg with 411 vs 422 sampling HOT 3
- detect_preamble and in extension from_reader_with_all_options doesn't check for size HOT 1
- Can't set_transfer_syntax in some cases
- First two bytes are not an SOI marker error HOT 4
- Iterate over all tags with an AttributeSelector HOT 4
- Adding private data elements (with creator) HOT 4
- dicom-transfer-syntax-registry does not build on Windows by default HOT 1
- Extended offset table support
- Support for multiple character repertoires (extended character sets) HOT 1
- Could not compile openjp2 HOT 10
- Issue when trying to open a DICOM file. HOT 1
- DICOM naive datetime retrieval HOT 6
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 dicom-rs.