-
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
label properties #50
label properties #50
Conversation
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.
One minor question, otherwise, 👍
src/omero_zarr/masks.py
Outdated
"omero:roiId": mask.roi.id.val, | ||
} | ||
if mask.textValue: | ||
properties[mask_value]["text"] = unwrap(mask.textValue) |
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.
If we assume that omero:
is a "safe"-prefix for the moment, i.e. we can do what we want there, then probably the only question I have is the naming of the text
field. @DragaDoncila proposed class
in ome/ome-zarr-py#61. @will-moore, from your POV, would we post-process text
into class
where appropriate? Should it then be omero:text
?
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 don't think we have to specify that this text came from OMERO in order to understand it. Similar to color - it might have come from OMERO, but we don't really care - we just want to know that the label has a color (or some text).
But these properties don't have defined keys in the spec (like flexible key-value pairs in OMERO) so I think we're "safe" to do what we want, without any prefix?
On the other hand I guess there's no harm to record the state that OMERO masks were in at the time of export, so I'm happy to use omero:text
. I think class
was just an example, rather than a reserved word?
Otherwise, tested via:
|
Skip acquisitions key if no plate acquisition exists
That last commit is needed if we want to stitch together multiple Images + Labels, e.g. into a Plate as at ome/ome-zarr-py@4306bbb I noticed from that code, that (even before this change) we are only exporting 1 |
# Unused metadata: the{ZTC}, x, y, width, height, textValue | ||
# Using ROI ID allows stitching label from multiple images | ||
# into a Plate and not creating duplicates from different iamges. | ||
# All shapes will be the same value (color) for each ROI |
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.
This sounds correct since we only support a UNION
interpretation of shapes within a single ROI.
Set version in plate/well metadata
Ran successfully together with gh-53 after solving the merge conflict on Plate:2551. Waiting for labels to upload to visually verify. |
Adds
properties
to labels.zattrs
exported from OMERO.See functionality tests below. But first question is probably what we want to name these properties and if we want them included by default or only with a cli argument?
To Test - need an Image or Plate with masks
omero zarr export Image or Plate
omero zarr masks (same Image or Plate)
image/labels/0/.zattrs
in a text editor to see properties.napari path/to/image
withome-zarr-py
at Add support for label properties in zattrs and plugin ome-zarr-py#61 installed should display properties when you mouse-over a mask.