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
DICOM: be more lenient with slice timing vector in Siemens mosaics #1499
DICOM: be more lenient with slice timing vector in Siemens mosaics #1499
Conversation
Looks good! Thanks for fixing this! Can't approve because the mrpad test fails, but this appears unrelated to the pull request.. |
Seemed to be only one of the Travis CI jobs that failed (not sure if that's |
When the number of entries is greater than the number of slices, are the additional entries zero-filled? Is the number of excess entries somehow related to the null space in the mosaic storage? This change will accept such data, but it would also conceivably accept invalid or corrupt data if such could be generated. Depends on if you want to go to the effort of better sanity checking. |
Not even. They're literally empty, as far as I can tell...
Assuming I've understood this right, not even. In the example we have, the CSA entry reports 78 entries when there are 75 slices. The last 3 elements in the list are empty. But I'd expect the mosaic to be 9×9=81, right?
Yes, we could sanity-check this more thoroughly, but I'm not sure it's a worthwhile investment. Unfortunately we don't know what assumptions we can rely on regarding this stuff given how proprietary it is, but I also expect Siemens to eventually move away from it in favour of multi-frame (hopefully...?) |
I didn't look decently into the logs when I said this; something else seems to indeed be going on... but my brain doesn't seem to be awake enough to deal with it. (a convoluted way of saying "I'm confused") |
There are examples now of Siemens mosaics where the number of entries in the CSA NumberOfImagesInMosaic entry reports a large size than the number of slices - leading to the whole entry being ignored - yet the last few entries are empty. This change allows for this situation, by taking as many entries as there are slices, and ignoring the last few entries.
931f39e
to
8253ee2
Compare
8253ee2
to
17af358
Compare
OK, I cleaned this up by re-committing the relevant changes without changing the test_data commit... Requires a forced-pushed, but hopefully it'll make for a cleaner history... |
In case anyone's wondering: remaining issues relate to the new version of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be the only option that will be compatible with "valid" data; more stringent checks are not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree.
There are examples now of Siemens mosaics where the number of entries in the CSA NumberOfImagesInMosaic entry reports a large size than the number of slices - leading to the whole entry being ignored - yet the last few entries are empty. This change allows for this situation, by taking as many entries as there are slices, and ignoring the last few entries.