zarr-python icon indicating copy to clipboard operation
zarr-python copied to clipboard

small 3D-tif-file memmap convert to zarr failed

Open SaibotMagd opened this issue 1 year ago • 2 comments

Zarr version

'2.16.0'

Numcodecs version

'0.11.0'

Python Version

'3.11.3'

Operating System

Ubuntu 22/ Debian 10 (tried it on 2 systems with 2 Fiji versions)

Installation

"pip install into conda environment"

Description

I tried the smallest possible example:

  • create a zarr file out of a 3D-tif-file using memmap, because the "real" files are pretty large.
  • read the resulted zarr with FIJI Mobie Plugin (https://omero-guides.readthedocs.io/en/latest/fiji/docs/view_mobie_zarr.html the installation guide is not working since "Go to Plugins > BigDataViewer > OME ZARR > Open OME ZARR from S3…." doesn't exist, so I used: image

Error: Message: image

since the folder-size is to small (60.7MB without compression while the original tif-file is 75MB), I think it doesn't save the image correctly.

Steps to reproduce

import dask.array as da
import numpy as np
from dask.diagnostics import ProgressBar
import xarray as xr
import tifffile

file = 'resampled_autofluorescence.tif'
zarr = 'auto.zarr'

mm = tifffile.memmap(file)
arr = da.from_array(mm)
arr.to_zarr(zarr)

imagefile and all sourcecode to be found here: https://ncloud.lin-magdeburg.de/s/tCs5GEw8jBPE64j

SaibotMagd avatar Aug 03 '23 11:08 SaibotMagd