-
Notifications
You must be signed in to change notification settings - Fork 7
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
Get NGFF channel index from name #70
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ziw-liu
requested review from
talonchandler,
AhmetCanSolak,
edyoshikun and
JoOkuma
February 24, 2023 19:08
ziw-liu
added
enhancement
New feature or request
NGFF
OME-NGFF (OME-Zarr format)
labels
Feb 24, 2023
|
Hey @ziw-liu , I got this error running the changed example. WARNING:root:Image has 2 channels, while the dataset has 3.
Traceback (most recent call last):
File "/home/jordao/Softwares/iohub/examples/single_fov_ome_zarr.py", line 30, in <module>
dataset["img"] = tczyx
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/iohub/ngff.py", line 481, in __setitem__
self.create_image(key, value)
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/iohub/ngff.py", line 531, in create_image
self._group.array(
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/zarr/hierarchy.py", line 1187, in array
return self._write_op(self._array_nosync, name, data, **kwargs)
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/zarr/hierarchy.py", line 895, in _write_op
return f(*args, **kwargs)
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/zarr/hierarchy.py", line 1193, in _array_nosync
return array(data, store=self._store, path=path, chunk_store=self._chunk_store,
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/zarr/creation.py", line 394, in array
z = create(**kwargs)
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/zarr/creation.py", line 178, in create
init_array(store, shape=shape, chunks=chunks, dtype=dtype, compressor=compressor,
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/zarr/storage.py", line 437, in init_array
_init_array_metadata(store, shape=shape, chunks=chunks, dtype=dtype,
File "/home/jordao/miniconda3/envs/iohub/lib/python3.10/site-packages/zarr/storage.py", line 498, in _init_array_metadata
raise ContainsArrayError(path)
zarr.errors.ContainsArrayError: path 'img' contains an array |
@JoOkuma That's because you already created a zarr store with that position. You can do |
@edyoshikun got it, thanks |
JoOkuma
approved these changes
Feb 25, 2023
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.
LGTM!
This worked well on my side. Thanks @ziw-liu |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by #45.
Related to #58.