Skip to content
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

Support importing zarr volumes #75

Merged
merged 7 commits into from
May 30, 2024
Merged

Support importing zarr volumes #75

merged 7 commits into from
May 30, 2024

Conversation

jgadling
Copy link
Contributor

@jgadling jgadling commented May 29, 2024

This adds support for ingesting ome-zarr volumes as well as MRC volumes. I added some basic test coverage and a starting point for the next ingestion config, to test it.

I upgraded to the latest version of ome_zarr_py to support reading/writing zarrs with fsspec parameters, which is necessary to make the library work properly with our moto-based test setup (see ome/ome-zarr-py#349)

I also added a wrapper around reading volume info so that the neuroglancer config importer doesn't read MRC headers directly (it could eventually support zarr volumes instead of MRC volumes). This might be a little too basic, but I'm happy to rethink it!

return max(self.get_dimensions().values())

def get_center_coords(self) -> List[int]:
return [np.round(np.mean([getattr(self, f"{d}end"), getattr(self, f"{d}start")])) for d in "xyz"]


class ZarrReader:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the key image generator uses it.

@jgadling jgadling merged commit b583d17 into main May 30, 2024
2 checks passed
@jgadling jgadling deleted the jgadling/import-zarr branch May 30, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants