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

Addition of cropping.py #229

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Addition of cropping.py #229

wants to merge 2 commits into from

Conversation

alishbaimran
Copy link

Sample script to index into either time, channels, z, y, and x into an existing ome-zarr store and create a new ome-zarr store with crops. Code is currently structured as a class with some helper methods but can be re-factored as some utils methods that are used in the script directly (without the class structure).

Copy link
Contributor

@edyoshikun edyoshikun left a comment

Choose a reason for hiding this comment

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

As discussed in our meeting with @talonchandler. I think the convenience functions like get_positions andget_channel_indices would be great to have inside iohub.
@ziw-liu what would be a good place to have these (iohub.ngff?)

chunks = (1, 1, 1, shape[3], shape[4])

# position keys
position_keys = [self.validate_position_key(path) for path, _ in positions]
Copy link
Contributor

Choose a reason for hiding this comment

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

could run everything in a single for loop

@ziw-liu
Copy link
Collaborator

ziw-liu commented Jul 2, 2024

As discussed in our meeting with @talonchandler. I think the convenience functions like get_positions andget_channel_indices would be great to have inside iohub. @ziw-liu what would be a good place to have these (iohub.ngff?)

Can you explain why is list(plate.positions()) needed as a separate API?
Also note that NGFFNode.get_channel_index() exists.

@JoOkuma
Copy link
Member

JoOkuma commented Jul 2, 2024

Feel free to ignore this comment because no one asked for my review.

Since the unified API was merged, I think it would be nice for this function to take a BaseFOVMapping as input and crop to HCS ome-Zarr. This could help crop any format without converting to ome-zarr and kind of "future proof".

@ziw-liu
Copy link
Collaborator

ziw-liu commented Jul 2, 2024

Feel free to ignore this comment because no one asked for my review.

Since the unified API was merged, I think it would be nice for this function to take a BaseFOVMapping as input and crop to HCS ome-Zarr. This could help crop any format without converting to ome-zarr and kind of "future proof".

The catch here is that OME-Zarr UAPI is still pending...

@ziw-liu ziw-liu added the documentation Improvements or additions to documentation label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants