-
Notifications
You must be signed in to change notification settings - Fork 7
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
Review NGFF models & Fractal OME-Zarr models #681
Comments
I think the reason is that our ngff models include class Channel(BaseModel):
"""
Model for an element of `Omero.channels`.
See https://ngff.openmicroscopy.org/0.4/#omero-md.
"""
window: Optional[Window] = None
label: Optional[str] = None
family: Optional[str] = None
color: str
active: Optional[bool] = None
class Omero(BaseModel):
"""
Model for `NgffImageMeta.omero`.
See https://ngff.openmicroscopy.org/0.4/#omero-md.
"""
channels: list[Channel] where The reason why this was not an issue in previous versions is that we had # Replicate image attrs
old_image_group = zarr.open_group(
f"{zarrurl_old}/{well_path}/{image_path}", mode="r"
)
new_image_group = zarr.group(
f"{zarrurl_new}/{well_path}/{image_path}"
)
new_image_group.attrs.put(old_image_group.attrs.asdict()) while we now have new_image_group.attrs.put(ngff_image.dict(exclude_none=True)) |
Ref #540 |
Let's review whether we can get our models more consistent for this (e.g. having FractalChannels inherited from Channels etc.) |
I put back a version of just using the attrs of the old image for the moment with 4aac820 It's slightly less elegant, as we have to load the metadata twice now (once for the NGFF model for things like number of pyramid levels, once for adding it to the new image). But with that, it's hopefully not a blocker for V2 anymore but something we can address carefully when we get a chance. [I still think we should find a good way of using those very useful Pydantic models for this purpose, e.g. having Fractal pydantic models we can use. Just wanted to make the registration testing work ;)] |
Within #671, it appears that the MIP-images zattrs do not include
wavelength_id
in theomero
metadata.Here is how this leads to a cellpose-task error:
The text was updated successfully, but these errors were encountered: