View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003569 | Slicer4 | Module DICOM | public | 2014-01-29 05:08 | 2018-03-02 11:02 |
Reporter | fedorov | Assigned To | pieper | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | Slicer 4.7.0 | |||
Summary | 0003569: Spaces in ImageOrientationPatient etc are not handled | ||||
Description | When spaces are present in ImageOrientationPatient and ImagePositionPatient, the volume is not loaded correctly (only one slice shows up). In addition to this, sometimes DICOM module loses all of the content after attempting to load such a volume (the content comes back after Slicer is restarted). | ||||
Additional Information | Sample dataset (from TCIA Breast RIDER collection) is attached. | ||||
Tags | No tags attached. | ||||
2014-01-29 05:08
|
RIDER_bug.zip (3,780,323 bytes) |
2014-01-29 05:22
|
|
I had no trouble loading this data on my local build (r22855). Can anyone else confirm the error using this dataset? |
|
I am unable to consistently reproduce this issue. It happens sometimes, but I was not able to identify the specific sequence of steps that would reliably lead to this issue. |
|
Interesting - can you clarify where exactly the issue comes up? It looks to me like all the parsing and interpretation works fine, so maybe there's something else that wedges the DICOM browser code. Does the issue happen on import, when you select a series, when you examine or when you load? |
|
Steve, I am able to consistently reproduce the first issue (only single slice showing up) with the today's nightly build and the dataset I shared with you earlier. Can you try that? Maybe the issue is specific to the nightly build or release build? |
|
I cannot reproduce it using a recent nightly build on Windows. It's a very old issue, most probably the root cause have been fixed in the last 3 years. |
|
There is definitely something weird going on with this data but it's hard to pin down. I am able to reproduce some of this with today's nightly version on mac, but not in a debug build. I could also reproduce odd behavior on windows using the current nightly (I don't have a debug build at the moment). I did not observe the DICOM module losing content after loading. What I do see: Mac release (not debug): Windows release: These tests were done with the nightly builds marked 2017-06-11. @lassoan can you confirm what I see on windows? |
|
The DICOM file is certainly invalid (as decimal strings are not allowed to contain spaces). The problem is that in vtkITKArchetypeImageSeriesReader::AnalyzeDicomHeaders(), image position is parsed like this:
This of course fails when there are extra spaces. The first value is filled, the rest is random memory junk (except in debug mode - in that case values may be initialized to a specific value). Potential solutions: Which one would you prefer? |
|
Thanks for debugging! David Clunie usually promotes the "read loosely, write strictly" rule, so I think if something can be handled we should probably try. I hate to make the user do extra steps when their source of data is bad, so making them run the patcher seems not optimal here. |
|
In this case, the workaround is easy to implement, so let's go with reading loosely. I don't think "reading loosely" is a good general principle, as 1. lots of workarounds make the code difficult to maintain and understand; 2. results of error-compensating mechanisms are unpredictable (if there are multiple loose interpretations that would fit a certain data, which one do you choose?). In many standards, loose interpretation of data is strictly forbidden. |
|
Fixed in r26087 |
|
It is not so much a discussion about whether "reading loosely" is a good general principle. It is a matter of reality that if you don't use this principle in regards to reading DICOM images, the result will be a world with very little data, and a lot of unhappy users who don't want to know any of these details, and just want to see the image loaded. |
|
I should also add that in this particular situation, it is not a random dataset, but a dataset coming from TCIA. TCIA is expected to be the place for "curated DICOM data", that creates certain expectation. It is indeed unfortunate that "curation" does not imply basic checking of the data, and does not implement some basic cleanup to fix issues like this one. |
|
I was rushed when I typed the message earlier, so I didn't pull up the reference - have a look for Postel's Principle in these slides: http://www.dclunie.com/papers/DICOMWeb_2015_Clunie_BestPracticesAndTools.pdf I do like the idea of being "definite" on what we accept, to the extent that is possible. |
|
Quoting David from the slides: "The entire Study content is important Isn't this ironic, considering that you don't have any standard-defined mechanism to confirm that your study (or even multi-instance series!) is complete ... |
|
I find it just sad that such an important and in many aspects very well written standard is implemented so inconsistently. I don't know how this mess could be fixed, but providing official reference implementations and example data sets would solve many problems. |
|
"You Can Lead a Horse to Water But You Can't Make It Drink" Until solving those problems leads to higher profits by the manufacturers, or is mandated by the government as a regulation, this assumes good will and won't happen. I am not saying we should not try, quite the opposite, that is all we can do. But I am not that optimistic it would solve the problems of inconsistency and fragmentation any time soon. |
|
Agreed! In working on the dcmtk reader support the vtkITK code I've been really torn on how best to implement the testing. I feel like I really need terabytes of ground truth data that just doesn't exist, at least not in any remotely organized form. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2014-01-29 05:08 | fedorov | New Issue | |
2014-01-29 05:08 | fedorov | Status | new => assigned |
2014-01-29 05:08 | fedorov | Assigned To | => pieper |
2014-01-29 05:08 | fedorov | File Added: RIDER_bug.zip | |
2014-01-29 05:22 | pieper | File Added: RIDER-in-slicer.png | |
2014-01-29 05:24 | pieper | Note Added: 0010535 | |
2014-01-29 07:01 | fedorov | Note Added: 0010536 | |
2014-01-29 09:13 | pieper | Note Added: 0010539 | |
2014-01-31 07:29 | fedorov | Note Added: 0010548 | |
2017-06-13 10:42 | lassoan | Note Added: 0014807 | |
2017-06-13 12:02 | pieper | Note Added: 0014811 | |
2017-06-13 13:29 | lassoan | Note Added: 0014813 | |
2017-06-13 13:30 | lassoan | Note Edited: 0014813 | View Revisions |
2017-06-13 13:48 | pieper | Note Added: 0014814 | |
2017-06-13 14:06 | lassoan | Note Added: 0014815 | |
2017-06-13 14:06 | lassoan | Status | assigned => resolved |
2017-06-13 14:06 | lassoan | Resolution | open => fixed |
2017-06-13 14:06 | lassoan | Fixed in Version | => Slicer 4.7.0 |
2017-06-13 14:06 | lassoan | Note Added: 0014816 | |
2017-06-13 14:12 | fedorov | Note Added: 0014818 | |
2017-06-13 14:14 | fedorov | Note Added: 0014820 | |
2017-06-13 16:11 | pieper | Note Added: 0014823 | |
2017-06-13 16:34 | fedorov | Note Added: 0014824 | |
2017-06-13 16:52 | lassoan | Note Added: 0014825 | |
2017-06-13 17:00 | fedorov | Note Added: 0014826 | |
2017-06-13 17:00 | pieper | Note Added: 0014827 | |
2018-03-02 11:02 | jcfr | Status | resolved => closed |