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

Porting create_empty_zarr to iohub #234

Merged
merged 38 commits into from
Sep 27, 2024
Merged

Porting create_empty_zarr to iohub #234

merged 38 commits into from
Sep 27, 2024

Conversation

edyoshikun
Copy link
Contributor

@edyoshikun edyoshikun commented Jul 16, 2024

This PR adds shrimPy utility functions relevant to iohub listed below:

  • create_empty_zarr: enables the creation of an empty zarr
  • process_single_position: function that can apply a czyx in czyx out function to a zarr store.

TODO:

@mattersoflight
Copy link
Collaborator

mattersoflight commented Jul 16, 2024

TODO:
Implement tests via hypothesis

@ziw-liu ziw-liu added enhancement New feature or request NGFF OME-NGFF (OME-Zarr format) labels Jul 17, 2024
@ieivanov
Copy link
Contributor

Heads up, I'll have a bunch of comments and edits here, WIP

@ieivanov ieivanov changed the base branch from main to mp_utils_port_v1 July 18, 2024 23:36
@ieivanov ieivanov changed the base branch from mp_utils_port_v1 to main July 18, 2024 23:41
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
@ieivanov
Copy link
Contributor

P.S. I'm leaving a bunch of comments here so we can agree on the structure, but I'm also happy to implement some of these suggestions, I'm not asking others (Ed) to implement all of these.

Copy link
Member

@JoOkuma JoOkuma left a comment

Choose a reason for hiding this comment

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

The functions to process_ and transform_ the data could be made for general and work on arbitrary axes with some changes. We did this here in ultrack

Is it really necessary to have a function to process a single position?

From my POV, these "apply" functions should take an arbitrary BaseFOVMapping as input and write an ome-zarr.

We could write a wrapper of the BaseFOV that creates a "trivial" BaseFOVMapping that behaves as an HCS, so there's a single implementation for both cases and supporting multiple file types as input.

iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff_utils.py Outdated Show resolved Hide resolved
ziw-liu and others added 2 commits July 31, 2024 11:33
* unify comment format

* fix typing and docstring

* create ngff sub-package
and refactor display util file

* refactor ngff meta file

* refactor ngff

* export transformation model

* fix type hint

* bump ome-zarr target in docstring

* migrate to pydantic v2

* isort

* fix validators

* remove union type

* fix dependency

* update docstring

* typing improvements

* Update iohub/ngff/models.py

Co-authored-by: Jordão Bragantini <[email protected]>

* fix style

* update module docstring to specify their content

---------

Co-authored-by: Jordão Bragantini <[email protected]>
@ieivanov
Copy link
Contributor

ieivanov commented Aug 7, 2024

Related: czbiohub-sf/shrimPy#123

JoOkuma and others added 3 commits September 17, 2024 11:19
* Fixing pyramid scaling factor

* fix pyramid test

* fix test again
* adding the ImageArray

* precommit

* black
iohub/ngff_utils.py Outdated Show resolved Hide resolved
iohub/ngff/utils.py Outdated Show resolved Hide resolved
iohub/ngff/utils.py Outdated Show resolved Hide resolved
iohub/ngff/utils.py Outdated Show resolved Hide resolved
iohub/ngff/utils.py Outdated Show resolved Hide resolved
iohub/ngff/utils.py Outdated Show resolved Hide resolved
Copy link
Contributor

@talonchandler talonchandler left a comment

Choose a reason for hiding this comment

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

Ready to go from me!

@ieivanov ieivanov merged commit d6f7956 into main Sep 27, 2024
7 checks passed
@ieivanov ieivanov deleted the mp_utils_port branch September 27, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request NGFF OME-NGFF (OME-Zarr format)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants