ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
370 stars 241 forks source link

DICOM reader: better handling of nested sequences that include pixel data #4168

Closed melissalinkert closed 2 months ago

melissalinkert commented 3 months ago

Fixes #4165.

Using the data in inbox/gh-4165, showinf should show that each pyramid resolution starts with "scrambled" tiles. showinf -noflat -resolution 2 img_0.dcm or showinf -nogroup img_3.dcm in particular can easily reproduce the issue.

With this change, each resolution and extra image in the dataset should display correctly.

As described in #4165, there are PixelData elements (which Bio-Formats' reader should ignore) that are nested within a private sequence element. The reader will no longer stop at the first PixelData encountered, and instead should skip over any PixelData contained within a sequence.

melissalinkert commented 3 months ago

daaa2f9 should fix the original metadata table issue in https://github.com/ome/bioformats/pull/4168#pullrequestreview-1968481092