glencoesoftware / bioformats2raw

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

how to downsample isotropically #208

Open d-v-b opened 1 year ago

d-v-b commented 1 year ago

is it possible to apply downsampling in all three spatial dimensions? I have isotropic data, so it makes sense to do this.

melissalinkert commented 1 year ago

Transferred from NGFF-Converter to bioformats2raw, as NGFF-Converter uses bioformats2raw internally to perform conversion.

It is not currently possible to do this with bioformats2raw, in large part because doing so would produce data that is currently incompatible with OMERO. I'm not opposed to adding this feature, but it's not likely to happen in the near future, and will almost certainly require some coordination with other projects (including Bio-Formats and OMERO).

kedarnarayan commented 1 month ago

+1 from a volume EM user. Volume EM datasets may or may not be isotropic, but image size is often x ~ y ~ z, and viewing in all planes is a requirement. The simple solution of skipping every other z slice won't work, unfortunately. Because volume EM approaches are typically "slice-and-image", it means that there is no bleedthrough of signal from z(n) to z(n+1) unlike say in confocal imaging. This means that when you delete a slice in a vEM stack you are actually missing significant information in the rendering, resulting in a blocky and weird downsampled image (especially true when you start off with slightly coarse or anisotropic z sampling, as seen in many vEM approaches). So downsampling in all three axes with a less basic downsampling solution would be warranted.

normanrz commented 1 month ago

Echoing what @kedarnarayan said, for Webknossos we need 3D downsampling in order to efficiently render zoomed-out views of orthogonal slices. As a reference, we implemented that in our Python library.

melissalinkert commented 1 month ago

Thanks for the additional details, @kedarnarayan and @normanrz. Are there any specific public volume EM datasets you would suggest that we use for testing?

kedarnarayan commented 1 month ago

@melissalinkert Try an isotropic FIB-SEM volume here: https://www.ebi.ac.uk/empiar/EMPIAR-11537/ For a larger dataset challenge: https://www.ebi.ac.uk/empiar/EMPIAR-10365/