Open mbstadler opened 8 months ago
Super interesting to follow along, thanks for documenting this @mbstadler & for sending me a link @silvbarb !
A few small comments from me:
new class ez_zarr.ome_zarr.Image representing an image: what we currently have in fractal_out.zarr/B/03/0 (contains .zgroup and pyramid level folders 0, 1, 2, ... each containing .zarray)
Core is also that it contains a .zattrs with multiscales metadata following the NGFF spec
possible additional classes representing an array (folder containing .zarray), a list of arrays (initialised by a folder, populates list with all arrays found within), any other specific zarr filesets
Intuitively, I see this as a function of the Image class: Provide the different resolution level arrays, based on available resolution levels. Or provide some Zarr subgroups like labels & tables.
Also, in case it's relevant, I started playing around with an OME-Zarr image class here: https://github.com/fractal-analytics-platform/napari-ome-zarr-navigator/blob/roi_loader/src/napari_ome_zarr_navigator/ome_zarr_image.py Would be interesting to figure out if we have matching needs for the OMEZarrImage class! I think there should be quite some overlap given your description above and what I've been needing so far. Happy to then contribute to ez_zarr if that's relevant / evaluate whether depending on the fractal_tasks_core roi & NGFF metadata functionality in my case is relevant :)
Reopening the issue (image-level tasks are done and included in #10, but plate-level tasks remain to be done).
... in order to support additional flavors of OME-Zarr filesets.
Ideas:
ez_zarr.ome_zarr.Image
representing an image: what we currently have infractal_out.zarr/B/03/0
(contains.zgroup
and pyramid level folders0
,1
,2
, ... each containing.zarray
)ez_zarr.ome_zarr.Plate
: similar to currentFractalZarr
, usingImage
internally (either creating them upon construction, or on the fly when needed) and with additional changes (see below)ez_zarr.ome_zarr.Plate
work with Fractal and FAIM outputs.zgroups
in column folder of Fractal plate output/we/know/where/Data/ZarrExampleData
ez_zarr.ome_zarr.Plate
methods:ez_zarr.ome_zarr.Image
internally, rename to get_array_by_coordinate, get_subarray, get_pyramid, get_array_pyramidlabel_name = None
-> intensity image, orlabel_name = "nuclei"
-> label imageez_zarr.ome_zarr.Image
method, thePlate
method could default to the first image or accept a list of images/wellsdescribe("path/to/zarr")
-> similar tozarr.hierarchy.Group.tree()
.zarray
), a list of arrays (initialised by a folder, populates list with all arrays found within), any other specific zarr filesetsImage.plot()
(y,x)
inplotting.plot_image
(just add a dummy channel axis usingnp.newaxis()
)row_label
andcolumn_label
in the layout, use a singlelabel
columnSmall addition to consider (identified by using
ez_zarr
on feature extraction 3D):_get_bounding_box_for_label_value
as public functionlabel_name
argument ofget_array_pair_by_coordinate
to alabel_list
--> very useful for extracting together with the intensity image arrays, also pairednuclei
,cells
, and potentiallyorganoids
masksget_array_pair_by_coordinate
by label_id (object) and not only by coordinates (this is done already when we plot by object_id) --> implemented by exposingget_bounding_box_for_label_value
with ability to specify output coordinate spaceget_bounding_box_for_label_value
to get coordinates, then use these inplot
)