Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Takes a csv file with 1 row per Mask (e.g. exported from OMERO with
Batch_ROI_Export
) and uses it toadd properties to the labels metadata in
ome-zarr
.You need to specify which column of the csv contains an ID that matches a specified ID of each properties dict.
E.g. if you have exported labels from OMERO with ome/omero-cli-zarr#50 then each properties dict will have e.g.
"omero:shapeId": 123
and this will correspond to theshape_id
column of the Batch_ROI_Export.csv.You also want to specify columns from the csv to use, e.g.
"area (pixels),X,Y,Width,Height"
.You can also specify the column types (as in https://github.com/ome/omero-metadata/) to specify the data-type for each column (string by default).
d
:DoubleColumn
, for floating point numbersl
:LongColumn
, for integer numberss
:StringColumn
, for textb
:BoolColumn
, for true/falseUse e.g.
#d
as a suffix in the column name to denote afloat
column, no spaces etc:If you have a Plate exported to ome-zarr as "251.zarr", then you can do this:
ome_zarr csv_to_labels plate251_ch1.csv shape_id "area (pixels)#d,well_label#s,Width#l,Height#l" 251.zarr omero:shapeId
Then you can open a Well (field 0) in napari, and the properties will be read by #61 cc @DragaDoncila and you will be able to see the properties from the csv (bottom left) when you mouse over a label
napari 251.zarr/A/1/0
You can then use the properties to update label colors:
TODO: