-
Notifications
You must be signed in to change notification settings - Fork 1
single-scale ome-ngff (0.4) metadata #66
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
base: main
Are you sure you want to change the base?
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.
Pull Request Overview
This PR adds single-scale OME-NGFF (0.4) metadata support when creating zarr arrays. The changes enable proper OME-NGFF metadata generation and improve the blockwise processing workflow.
- Adds a new function to generate OME-NGFF v0.4 compliant metadata for single-scale datasets
- Updates the blockwise processor to use NestedDirectoryStore and apply metadata to zarr groups
- Improves progress tracking and error handling in the processing pipeline
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| cellmap_flow/utils/ds.py | Adds generate_singlescale_metadata function for OME-NGFF v0.4 metadata creation |
| cellmap_flow/cli/fly_model.py | Adds input_size and output_size configuration parameters |
| cellmap_flow/blockwise/blockwise_processor.py | Updates zarr storage to NestedDirectoryStore, adds metadata generation, and improves progress tracking |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
cellmap_flow/utils/ds.py
Outdated
| } | ||
| ] | ||
|
|
||
| z_attrs["multiscales"][0]["name"] = "" |
Copilot
AI
Sep 15, 2025
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 name field is set to an empty string. Consider making this configurable through a parameter or providing a meaningful default name.
| z_attrs["multiscales"][0]["name"] = "" | |
| z_attrs["multiscales"][0]["name"] = ds_name |
| translation=[0.0,]*3, | ||
| units=['nanometer',]*3, |
Copilot
AI
Sep 15, 2025
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 hardcoded values for translation and units should be made configurable or derived from existing configuration parameters to maintain consistency.
| def check_block(tmp_dir, block: daisy.Block) -> bool: | ||
| return (tmp_dir / f"{block.block_id[1]}").exists() |
Copilot
AI
Sep 15, 2025
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 magic index [1] for block.block_id is unclear. Consider adding a comment explaining what this index represents or using a named constant.
|
Hi @yuriyzubov {
"multiscales": [
{
"axes": [
{
"name": "z",
"type": "space",
"unit": [
"nanometer",
"nanometer",
"nanometer"
]
},
{
"name": "y",
"type": "space",
"unit": [
"nanometer",
"nanometer",
"nanometer"
]
},
{
"name": "x",
"type": "space",
"unit": [
"nanometer",
"nanometer",
"nanometer"
]
}
],
"coordinateTransformations": [
{
"scale": [
1.0,
1.0,
1.0
],
"type": "scale"
}
],
"datasets": [
{
"coordinateTransformations": [
{
"scale": [
16,
16,
16
],
"type": "scale"
},
{
"translation": [
0.0,
0.0,
0.0
],
"type": "translation"
}
],
"path": "s0"
}
],
"name": "",
"version": "0.4"
}
] |
don't convert zg.attrs to list Co-authored-by: Copilot <[email protected]>

add single-scale ome-ngff (0.4) metadata when creating a zarr array.