bioio-devs / bioio-ome-zarr

A BioIO reader plugin for reading Zarr files in the OME format.
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Add function to check resolution levels and their shapes #19

Closed vianamp closed 2 months ago

vianamp commented 4 months ago

See conversation here. Add a function like this

    def list_zarr_levels_and_dims(file_path:str):
        reader = BioImage(file_path, reader=bioio_ome_zarr.Reader)
        levels = reader.resolution_levels
        print(f"Found ZAR file with {len(levels)} resolution levels.")
        for lvl in levels:
            reader.set_resolution_level(lvl)
            print(f"\tLevel {lvl} shape: {reader.shape}")
        return