-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Axes v0.4 #93
Axes v0.4 #93
Conversation
For me installation of |
Hah! OK, it worked this time (on an aging Mac 10.14). It seems that a lot of things are valid (see below), so if the spec allows all of these, then it becomes very hard to read OME-NGFF data without having
|
aebcb30
to
9f2297e
Compare
Plate data exported today with current state of this branch and https://pypi.org/project/ome-zarr/0.3a1/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few API comments. I have not carried out any functional testing yet
src/omero_zarr/raw_pixels.py
Outdated
@@ -91,6 +91,12 @@ def planeGen() -> np.ndarray: | |||
cache_file_name_func=get_cache_filename, | |||
) | |||
|
|||
metadata = marshal_axes(image, len(paths)) | |||
|
|||
write_multiscales_metadata(parent, paths, **metadata) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I see this API (introduced in ome/ome-zarr-py#124) in action, I am slightly confused. I think this is primarily because transformations
is generated from the knowledge of paths
above and then later re-zipped with paths
when writing the metadata.
An alternative workflow would be to support datasets
either as lists of string or dictionaries in write_multiscales_metadata
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps slightly related to my thoughts in ome/ome-zarr-py#161 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since datasets
would include paths
, we would just have write_multiscales_metadata(group, datasets)
and remove support for paths? Or if datasets
is a list of strings, treat it as paths
(wouldn't break the API, but could be more confusing).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar questions and concerns around the usability came up in ome/ome-zarr-py#157 when adding support for plate.wells
as list of dictionaries alongside list of strings (also corresponding to individual well paths).
At least, I find List[Union[str, dict]]
to be a fairly good compromise that allows to handle both the simple use case where a minimal valid spec is generated from a list of paths and the extensible scenario where the caller wants to store additional metadata (and not necessarily specified by the OME-NGFF spec) to the datasets
element.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also wonder about the API for reading the transformations in ome-zarr-py
. These are currently a 2D list in the node.metadata
(not in the form of datasets
) since paths
are not returned by the reader:
paths = [d["path"] for d in datasets]
self.datasets: List[str] = paths
transformations = [d.get("transformations") for d in datasets]
if any(trans is not None for trans in transformations):
node.metadata["transformations"] = transformations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the various comments above, following this morning's discussion, I have been thinking of ways to exercise the In the OMERO -> OME-NGFF workflow, a potential candidate might be the Unless this is something straightforward to implement, I would definitely consider this outside the scope of this PR and limit the |
Trying to use the latest version of this PR, I get
Should the |
@sbesson Fixed ome-zarr requirement. |
That last commit de7703a uses PR: ome/ome-zarr-py#162 |
@joshmoore @sbesson I guess we probably don't want that last commit if this PR goes into a pre-release of omero-cli-zarr that works with |
Yes 👍 for getting a pre-release of omero-cli-zarr with |
Reverted de7703a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The most important concerns above have been addressed and new PRs have been opened upstream to introduce new metadata writing API. No objection from my side to getting this merged and releases as 0.3.0a1
. @joshmoore is there anything from your side that should be captured as an issue and addressed in the next development segment?
As discussed today, a screenshot illustrating the use of different names for Z/T axes and how it looks in Vizarr: |
Thanks @will-moore. Is this the dataset from https://minio-dev.openmicroscopy.org/idr/v0.4/2022-01-05/idr0062/6001240.zarr? |
Looking at https://deploy-preview-139--vizarr.netlify.app/?source=https://minio-dev.openmicroscopy.org/idr/v0.4/2022-01-05/idr0062/6001240.zarr (use Firefox - bugs on Chrome just now).
which should mean it applies to both channels? It looks like your example has different transforms applied to the 2 channels? |
As discussed this morning, merging and tagging this as |
Starting to implement Axes and Transformations (see ome/ngff#57).
cc @constantinpape
This requires https://pypi.org/project/ome-zarr/0.3a1/ for mask writing and new HCS metadata (row/column Indexes).
To test:
Some data exported with this PR can be viewed with vizarr:
https://deploy-preview-139--vizarr.netlify.app/?source=https://minio-dev.openmicroscopy.org/idr/v0.4/2022-01-05/idr0062/6001240.zarr (with PR at hms-dbmi/vizarr#139)
Plate data: https://minio-dev.openmicroscopy.org/idr/v0.4/2022-01-24/plates/idr0004/1752.zarr
Exported NGFF includes:
and each
dataset
has transformations. E.g. czyx image is scaled along axisz, y, x
or[1, 2, 3]
:NB: this format is still being discussed at ome/ngff#57 (review)