glencoesoftware / bioformats2raw

Bio-Formats image file format to raw format converter
GNU General Public License v2.0
77 stars 35 forks source link

MRXS: conversion is incorrect when multiple pyramids are present #258

Open melissalinkert opened 1 week ago

melissalinkert commented 1 week ago

Reported in https://forum.image.sc/t/issues-mrxs-to-tiff-using-bioformat2raw/100695; private sample data is in automated-tests/inbox/imagesc-100695/.

The problematic dataset has an extra Slide zoom mask level inserted between the Slide zoom level and Slide filter level (the "real" data). Looking at a diff of Slidedat.ini against the Slidedat.ini for https://openslide.cs.cmu.edu/download/openslide-testdata/Mirax/CMU-1.zip is useful.

https://github.com/melissalinkert/bioformats2raw/commit/905daf48e125c00bb8431cca32fd9780115ce0ed is a start at fixing the channel count detection, but that does not result in correct image data. I suspect that pyramidDepth needs to be calculated and recorded separately for each hierarchy so that the index file is read properly, but more investigation is needed.