We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I thought to open this issue to discuss. napari-aicsimageio does not support open folder right now. It would be good if it supported it.
Here is a possible implementation. Some notes:
aicsimage
aicsimages
def load_image_stacks_to_viewer(viewer:napari.Viewer, filenames:list[Path])->None: """Loads image stack""" # Stopping condition if len(filenames)==0: return None # Load images images:list[AICSImage] = [] for filename in filenames: image = AICSImage(filename) images.append(image) # Stopping condition - Check sizes reference_image_size = images[0].shape is_all_same_size = all([np.all(image.shape==reference_image_size) for image in images]) if not is_all_same_size: show_message_box(viewer.window, message="Stack cannot be compiled. All images need to be of the same size.", title='Load Images as Stack') return # Stack images data = [image.dask_data for image in images] image_stack = da.concatenate(data, axis=2) image_layer = viewer.add_image(image_stack, name=filenames[0].stem) image_layer.metadata['aicsimage'] = images image_layer.metadata['filename'] = filenames viewer.reset_view()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Use Case
I thought to open this issue to discuss. napari-aicsimageio does not support open folder right now. It would be good if it supported it.
Solution
Here is a possible implementation. Some notes:
aicsimage
is stillaicsimage
and notaicsimages
. Again, I like standardization. But in this case, it is returning a list of images.Alternatives
The text was updated successfully, but these errors were encountered: