Napari plugin for loading Bitplane Imaris files .ims

Overview

napari-imaris-loader

License PyPI Python Version tests codecov

Napari plugin for loading Bitplane Imaris files '.ims'.

Notes:

For this plugin to work "File/Preferences/Experimental/Render Images Asynchronously" must be selected.

Features

  • Multiscale Rendering
    • Image pyramids which are present in the native IMS format are automatically added to napari during file loading.
  • Chunks are implemented by dask and matched to the chunk sizes stored in each dataset. (Napari appears to only ask for 2D chunks - unclear how helpful this feature is currently)
  • Successfully handles multi-terabyte multi-channel datasets (see unknowns).

Known Issues / limitations

  • Currently, this is only an image loader, and there are no features for loading or viewing objects
  • Napari sometimes throws errors indicating that it expected a 3D or 5D array but receives the other.
    • This sometimes but relatively rarely causes napari to crash
    • The IMS class used in the reader represents all arrays to napari as a 5D dask.array (tczyx). This is necessary because IMS only stores data as 3D arrays separated by time and color. For example a 1 Timepoint / 1 Color, 3D 100x1024x1024px volume would have dimensions (1,1,100,1024,1024) and would be handed to napari as a 5D array rather than 3D. Working on a fix for this.
    • Would like to enable Asynchronous Tiling of Images, but this results in more instability and causes crashes.
  • The lowest resolution level in the IMS file is often too small for detailed 3D renderings.
    • Currently this is limited by the lowest resolution level being used by napari for 3D.
  • Contrast_Limits are currently determined by dtype and not the actual data.
    • float: [0,1], uint8: [0,254], uint16: [0,65534]
    • Future implementations may use the HistogramMax parameter to determine this.
  • 3D rendering works, but it is suggested to turn on 1 channel at a time starting from the highest channel to avoid some OpenGL errors and misalignment errors.
    • For example: Turn on only Channel 1, activate 3D rendering, then turn on Channel 0.

Unknowns

  • Time series data has not been tested, but it has been designed to work.

This napari plugin was generated with Cookiecutter using with @napari's cookiecutter-napari-plugin template.

Installation

You can install napari-imaris-loader via pip:

pip install napari-imaris-loader

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the BSD-3 license, "napari-imaris-loader" is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Comments
  • contrastLimits possibly unbound in reader

    contrastLimits possibly unbound in reader

    this line here can lead to a possible error local variable 'contrastLimits' referenced before assignment depending on the dtype

    https://github.com/CBI-PITT/napari-imaris-loader/blob/fccb04f4dafda8e3f16a38150db88faaa5597fc6/napari_imaris_loader/reader.py#L106

    opened by tlambert03 4
  • The plugin crashed while opening a ims file

    The plugin crashed while opening a ims file

    Dear,

    I installed your plugin on a freshly napari installed and got an error while opening an ims file:

    ---------------------------------------------------------------------------
    IndexError                                Traceback (most recent call last)
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\_qt\qt_viewer.py in _open_files_dialog(self=)
        636 
        637         if (filenames != []) and (filenames is not None):
    --> 638             self.viewer.open(filenames)
            self.viewer.open = ), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[], scale_bar=ScaleBar(visible=False, colored=False, ticks=True, position=, font_size=10.0, unit=None), text_overlay=TextOverlay(visible=False, color= (4,) float64, font_size=10.0, position=, text=''), help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'Control-Shift-C': >})>
            filenames = ['C:/Users/u0094799/Desktop/2021_11_Imaging_workshop_Leuven/Napari/large_2d/CD1.1_15_1001_2.ims']
        639             update_open_history(filenames[0])
        640 
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\components\viewer_model.py in open(self=Viewer(axes=Axes(visible=False, labels=True, col..._viewer.QtViewer object at 0x000002645B31D8B0>>}), path=['C:/Users/u0094799/Desktop/2021_11_Imaging_workshop_Leuven/Napari/large_2d/CD1.1_15_1001_2.ims'], stack=False, plugin=None, layer_type=None, **kwargs={})
        883             for _path in pbr:
        884                 added.extend(
    --> 885                     self._add_layers_with_plugins(
            self._add_layers_with_plugins = ), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[], scale_bar=ScaleBar(visible=False, colored=False, ticks=True, position=, font_size=10.0, unit=None), text_overlay=TextOverlay(visible=False, color= (4,) float64, font_size=10.0, position=, text=''), help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'Control-Shift-C': >})>
            _path = 'C:/Users/u0094799/Desktop/2021_11_Imaging_workshop_Leuven/Napari/large_2d/CD1.1_15_1001_2.ims'
            kwargs = {}
            plugin = None
            layer_type = None
        886                         _path, kwargs, plugin=plugin, layer_type=layer_type
        887                     )
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\components\viewer_model.py in _add_layers_with_plugins(self=Viewer(axes=Axes(visible=False, labels=True, col..._viewer.QtViewer object at 0x000002645B31D8B0>>}), path_or_paths='C:/Users/u0094799/Desktop/2021_11_Imaging_workshop_Leuven/Napari/large_2d/CD1.1_15_1001_2.ims', kwargs={}, plugin='napari-imaris-loader', layer_type=None)
        956             # actually add the layer
        957             with layer_source(path=filename, reader_plugin=plugin):
    --> 958                 added.extend(self._add_layer_from_data(*_data))
            added.extend = 
            self._add_layer_from_data = ), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[], scale_bar=ScaleBar(visible=False, colored=False, ticks=True, position=, font_size=10.0, unit=None), text_overlay=TextOverlay(visible=False, color= (4,) float64, font_size=10.0, position=, text=''), help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'Control-Shift-C': >})>
            _data = ([dask.array, dask.array, dask.array, dask.array], {'scale': [(2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311)], 'contrast_limits': [0, 65534], 'name': ['Channel 0', 'Channel 1', 'Channel 2', 'Channel 3', 'Channel 4', 'Channel 5'], 'metadata': {'fileName': 'C:\\Users\\u0094799\\Desktop\\2021_11_Imaging_workshop_Leuven\\Napari\\large_2d\\CD1.1_15_1001_2.ims', 'resolutionLevels': 4}, 'channel_axis': 0, 'multiscale': True}, 'image')
        959         return added
        960 
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\components\viewer_model.py in _add_layer_from_data(self=Viewer(axes=Axes(visible=False, labels=True, col..._viewer.QtViewer object at 0x000002645B31D8B0>>}), data=[dask.array, dask.array, dask.array, dask.array], meta={'channel_axis': 0, 'contrast_limits': [0, 65534], 'metadata': {'fileName': r'C:\Users\u0094799\Desktop\2021_11_Imaging_workshop_Leuven\Napari\large_2d\CD1.1_15_1001_2.ims', 'resolutionLevels': 4}, 'multiscale': True, 'name': ['Channel 0', 'Channel 1', 'Channel 2', 'Channel 3', 'Channel 4', 'Channel 5'], 'scale': [(2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311)]}, layer_type='image')
       1030         try:
       1031             add_method = getattr(self, 'add_' + layer_type)
    -> 1032             layer = add_method(data, **(meta or {}))
            layer = undefined
            add_method = ), dims=Dims(ndim=2, ndisplay=2, last_used=0, range=((0, 2, 1), (0, 2, 1)), current_step=(0, 0), order=(0, 1), axis_labels=('0', '1')), grid=GridCanvas(stride=1, shape=(-1, -1), enabled=False), layers=[], scale_bar=ScaleBar(visible=False, colored=False, ticks=True, position=, font_size=10.0, unit=None), text_overlay=TextOverlay(visible=False, color= (4,) float64, font_size=10.0, position=, text=''), help='', status='Ready', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_move_callbacks=[], mouse_drag_callbacks=[], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'Control-Shift-C': >})>
            data = [dask.array, dask.array, dask.array, dask.array]
            meta = {'scale': [(2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311)], 'contrast_limits': [0, 65534], 'name': ['Channel 0', 'Channel 1', 'Channel 2', 'Channel 3', 'Channel 4', 'Channel 5'], 'metadata': {'fileName': 'C:\\Users\\u0094799\\Desktop\\2021_11_Imaging_workshop_Leuven\\Napari\\large_2d\\CD1.1_15_1001_2.ims', 'resolutionLevels': 4}, 'channel_axis': 0, 'multiscale': True}
       1033         except TypeError as exc:
       1034             if 'unexpected keyword argument' not in str(exc):
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\components\viewer_model.py in add_image(self=Viewer(axes=Axes(visible=False, labels=True, col..._viewer.QtViewer object at 0x000002645B31D8B0>>}), data=[dask.array, dask.array, dask.array, dask.array], channel_axis=0, rgb=None, colormap=None, contrast_limits=[0, 65534], gamma=1, interpolation='nearest', rendering='mip', iso_threshold=0.5, attenuation=0.05, name=['Channel 0', 'Channel 1', 'Channel 2', 'Channel 3', 'Channel 4', 'Channel 5'], metadata={'fileName': r'C:\Users\u0094799\Desktop\2021_11_Imaging_workshop_Leuven\Napari\large_2d\CD1.1_15_1001_2.ims', 'resolutionLevels': 4}, scale=[(2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311), (2.0, 0.311, 0.311)], translate=None, rotate=None, shear=None, affine=None, opacity=1, blending=None, visible=True, multiscale=True, cache=True, experimental_slicing_plane=None, experimental_clipping_planes=None)
        723             layer_list = list()
        724             for image, i_kwargs, _ in layerdata_list:
    --> 725                 layer = Image(image, **i_kwargs)
            layer = undefined
            global Image = 
            image = [dask.array, dask.array, dask.array, dask.array]
            i_kwargs = {'rgb': None, 'colormap': 'cyan', 'contrast_limits': [0, 65534], 'gamma': 1, 'interpolation': 'nearest', 'rendering': 'mip', 'iso_threshold': 0.5, 'attenuation': 0.05, 'name': 'Channel 0', 'metadata': {'fileName': 'C:\\Users\\u0094799\\Desktop\\2021_11_Imaging_workshop_Leuven\\Napari\\large_2d\\CD1.1_15_1001_2.ims', 'resolutionLevels': 4}, 'scale': (2.0, 0.311, 0.311), 'translate': None, 'rotate': None, 'shear': None, 'affine': None, 'opacity': 1, 'blending': 'additive', 'visible': True, 'multiscale': True, 'cache': True, 'experimental_slicing_plane': None, 'experimental_clipping_planes': None}
        726                 self.layers.append(layer)
        727                 layer_list.append(layer)
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\image\image.py in __init__(self=, data=[dask.array, dask.array, dask.array, dask.array], rgb=False, colormap='cyan', contrast_limits=[0, 65534], gamma=1, interpolation='nearest', rendering='mip', iso_threshold=0.5, attenuation=0.05, name='Channel 0', metadata={'fileName': r'C:\Users\u0094799\Desktop\2021_11_Imaging_workshop_Leuven\Napari\large_2d\CD1.1_15_1001_2.ims', 'resolutionLevels': 4}, scale=(2.0, 0.311, 0.311), translate=None, rotate=None, shear=None, affine=None, opacity=1, blending='additive', visible=True, multiscale=True, cache=True, experimental_slicing_plane=None, experimental_clipping_planes=None)
        330 
        331         # Trigger generation of view slice and thumbnail
    --> 332         self._update_dims()
            self._update_dims = >
        333 
        334     def _new_empty_slice(self):
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\base\base.py in _update_dims(self=, event=None)
        639         self._ndim = ndim
        640 
    --> 641         self.refresh()
            self.refresh = >
        642 
        643     @property
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\base\base.py in refresh(self=, event=None)
       1107         """Refresh all layer data based on current view slice."""
       1108         if self.visible:
    -> 1109             self.set_view_slice()
            self.set_view_slice = >
       1110             self.events.set_data()
       1111             self._update_thumbnail()
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\base\base.py in set_view_slice(self=)
        900     def set_view_slice(self):
        901         with self.dask_optimized_slicing():
    --> 902             self._set_view_slice()
            self._set_view_slice = >
        903 
        904     @abstractmethod
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\image\image.py in _set_view_slice(self=)
        698             self, image_indices, image, thumbnail_source
        699         )
    --> 700         self._load_slice(data)
            self._load_slice = >
            data = 
        701         if self._keep_autoscale or self._should_calc_clims:
        702             self.reset_contrast_limits()
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\image\image.py in _load_slice(self=, data=)
        719         data : Slice
        720         """
    --> 721         if self._slice.load(data):
            self._slice.load = >
            data = 
        722             # The load was synchronous.
        723             self._on_data_loaded(data, sync=True)
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\image\_image_slice.py in load(self=, data=)
        121         """
        122         self.loaded = False  # False until self._on_loaded is calls
    --> 123         return self.loader.load(data)
            self.loader.load = >
            data = 
        124 
        125     def on_loaded(self, data: ImageSliceData) -> bool:
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\image\_image_loader.py in load(self=, data=)
         20             True if load happened synchronously.
         21         """
    ---> 22         data.load_sync()
            data.load_sync = >
         23         return True
         24 
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\napari\layers\image\_image_slice_data.py in load_sync(self=)
         42     def load_sync(self) -> None:
         43         """Call asarray on our images to load them."""
    ---> 44         self.image = np.asarray(self.image)
            self.image = dask.array
            global np.asarray = 
         45 
         46         if self.thumbnail_source is not None:
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\numpy\core\_asarray.py in asarray(a=dask.array, dtype=None, order=None, like=None)
        100         return _asarray_with_like(a, dtype=dtype, order=order, like=like)
        101 
    --> 102     return array(a, dtype, copy=False, order=order)
            global array = 
            a = dask.array
            dtype = None
            global copy = undefined
            order = None
        103 
        104 
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\array\core.py in __array__(self=dask.array, dtype=None, **kwargs={})
       1532 
       1533     def __array__(self, dtype=None, **kwargs):
    -> 1534         x = self.compute()
            x = undefined
            self.compute = >
       1535         if dtype and x.dtype != dtype:
       1536             x = x.astype(dtype)
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\base.py in compute(self=dask.array, **kwargs={})
        286         dask.base.compute
        287         """
    --> 288         (result,) = compute(self, traverse=False, **kwargs)
            result = undefined
            global compute = 
            self = dask.array
            global traverse = undefined
            kwargs = {}
        289         return result
        290 
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\base.py in compute(*args=(dask.array,), **kwargs={})
        568         postcomputes.append(x.__dask_postcompute__())
        569 
    --> 570     results = schedule(dsk, keys, **kwargs)
            results = undefined
            schedule = 
            dsk = HighLevelGraph with 4 layers.
    
     0. array-c9ee8e0f4c10c6c23a4318f58ff94a46
     1. getitem-46da6b34d2c45791bf57c6feccb4b594
     2. getitem-a90b1329abe5c89d9750e440ffd497ad
     3. getitem-74d10f3e832693dd7fd89549fa7725a5
    
            keys = [[[('getitem-74d10f3e832693dd7fd89549fa7725a5', 0, 0)]]]
            kwargs = {}
        571     return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])
        572 
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\threaded.py in get(dsk=HighLevelGraph with 4 layers.
     3. getitem-74d10f3e832693dd7fd89549fa7725a5
    , result=[[[('getitem-74d10f3e832693dd7fd89549fa7725a5', 0, 0)]]], cache=None, num_workers=None, pool=, **kwargs={})
         77             pool = MultiprocessingPoolExecutor(pool)
         78 
    ---> 79     results = get_async(
            results = undefined
            global get_async = 
            pool.submit = >
            pool._max_workers = 16
            dsk = HighLevelGraph with 4 layers.
    
     0. array-c9ee8e0f4c10c6c23a4318f58ff94a46
     1. getitem-46da6b34d2c45791bf57c6feccb4b594
     2. getitem-a90b1329abe5c89d9750e440ffd497ad
     3. getitem-74d10f3e832693dd7fd89549fa7725a5
    
            result = [[[('getitem-74d10f3e832693dd7fd89549fa7725a5', 0, 0)]]]
            cache = None
            global get_id = undefined
            global _thread_get_id = 
            global pack_exception = 
            kwargs = {}
         80         pool.submit,
         81         pool._max_workers,
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\local.py in get_async(submit=>, num_workers=16, dsk={('getitem-74d10f3e832693dd7fd89549fa7725a5', 0, 0): (, ('getitem-a90b1329abe5c89d9750e440ffd497ad', 0, 0, 0), (0, slice(None, None, None), slice(None, None, None))), ('getitem-a90b1329abe5c89d9750e440ffd497ad', 0, 0, 0): (, ('getitem-46da6b34d2c45791bf57c6feccb4b594', 0, 0, 0, 0), (0, slice(None, None, None), slice(None, None, None), slice(None, None, None))), ('getitem-46da6b34d2c45791bf57c6feccb4b594', 0, 0, 0, 0): (, ('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0), (0, slice(None, None, None), slice(None, None, None), slice(None, None, None), slice(None, None, None))), ('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0): (, 'array-original-c9ee8e0f4c10c6c23a4318f58ff94a46', (slice(0, 1, None), slice(0, 1, None), slice(0, 21, None), slice(0, 128, None), slice(0, 128, None))), 'array-original-c9ee8e0f4c10c6c23a4318f58ff94a46': }, result=[[[('getitem-74d10f3e832693dd7fd89549fa7725a5', 0, 0)]]], cache=None, get_id=, rerun_exceptions_locally=False, pack_exception=, raise_exception=, callbacks=set(), dumps=, loads=, chunksize=1, **kwargs={})
        505                             _execute_task(task, data)  # Re-execute locally
        506                         else:
    --> 507                             raise_exception(exc, tb)
            raise_exception = 
            exc = IndexError('too many indices for array: array is 3-dimensional, but 5 were indexed')
            tb = 
        508                     res, worker_id = loads(res_info)
        509                     state["cache"][key] = res
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\local.py in reraise(exc=IndexError('too many indices for array: array is 3-dimensional, but 5 were indexed'), tb=)
        313     if exc.__traceback__ is not tb:
        314         raise exc.with_traceback(tb)
    --> 315     raise exc
            exc = IndexError('too many indices for array: array is 3-dimensional, but 5 were indexed')
        316 
        317 
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\local.py in execute_task(key=('getitem-46da6b34d2c45791bf57c6feccb4b594', 0, 0, 0, 0), task_info=((, ('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0), (0, slice(None, None, None), slice(None, None, None), slice(None, None, None), slice(None, None, None))), {('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0):  (21, 128, 128) uint16}), dumps=, loads=, get_id=, pack_exception=)
        218     try:
        219         task, data = loads(task_info)
    --> 220         result = _execute_task(task, data)
            result = (IndexError('too many indices for array: array is 3-dimensional, but 5 were indexed'), )
            global _execute_task = 
            task = (, ('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0), (0, slice(None, None, None), slice(None, None, None), slice(None, None, None), slice(None, None, None)))
            data = {('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0):  (21, 128, 128) uint16}
        221         id = get_id()
        222         result = dumps((result, id))
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\core.py in _execute_task(arg=(, ('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0), (0, slice(None, None, None), slice(None, None, None), slice(None, None, 
    
    
    None), slice(None, None, None))), cache={('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0):  (21, 128, 128) uint16}, dsk=None)
        117         # temporaries by their reference count and can execute certain
        118         # operations in-place.
    --> 119         return func(*(_execute_task(a, cache) for a in args))
            func = 
            global _execute_task = 
            global a = undefined
            cache = {('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0):  (21, 128, 128) uint16}
            args = (('array-c9ee8e0f4c10c6c23a4318f58ff94a46', 0, 0, 0, 0, 0), (0, slice(None, None, None), slice(None, None, None), slice(None, None, None), slice(None, None, None)))
        120     elif not ishashable(arg):
        121         return arg
    
    c:\gbw_myprograms\anaconda3\envs\napari-env2\lib\site-packages\dask\array\chunk.py in getitem(obj= (21, 128, 128) uint16, index=(0, slice(None, None, None), slice(None, None, None), slice(None, None, None), slice(None, None, None)))
        420 
        421     """
    --> 422     result = obj[index]
            result = undefined
            obj =  (21, 128, 128) uint16
            index = (0, slice(None, None, None), slice(None, None, None), slice(None, None, None), slice(None, None, None))
        423     try:
        424         if not result.flags.owndata and obj.size >= 2 * result.size:
    
    IndexError: too many indices for array: array is 3-dimensional, but 5 were indexed
    

    Best, Benjamin

    opened by bpavie 3
  • too many indices for array error for imaris demo images

    too many indices for array error for imaris demo images

    Tested with napari 0.4.12 and napari-imaris-loader 0.0.5.

    Loading any ims files from Imaris demo datasets throw the following error and can't be opened in napari: IndexError: too many indices for array: array is 3-dimensional, but 5 were indexed

    opened by chili-chiu 3
  • installation problem

    installation problem

    Dear developper,

    I am very interested by your imaris loader, nevertheless, I did'nt sucess to install it. I have installed the imaris loader on my napari env (windows), On my napari env, I then launch napari.

    When I try to open an ims file with the open function of napari, it doesn't work, any idea of the problem ?

    11:00:40 ERROR PluginError: Error in plugin 'builtins', hook 'napari_get_reader' Cause was: ValueError('Could not load "" \nReason: "cannot find loader for this HDF5 file"\nPlease see documentation at: http://pillow.readthedocs.io/en/latest/installation.html#external-libraries') in file: C:\Users\mathi\anaconda3\envs\napari-env\lib\site-packages\imageio\plugins\pillow.py at line: 680 author: napari team email: [email protected] package: napari url: https://napari.org/ version: 0.4.0

    opened by matfallet 2
  • Add napari to requirements

    Add napari to requirements

    Hi team,

    My name is Draga and I am a CZI contractor working on napari.

    As part of our work on the new napari plugin engine, we’ve been running some automated tests to see whether plugins will be easily converted to the new plugin engine. While running these tests, we noticed that your plugin fails to be imported after installation in a fresh environment due to a missing requirement. You can see details in this github action run.

    This PR therefore adds napari to your install requirements so that users can install your plugin more confidently.

    Note that this may not be a complete list - to check whether your plugin can be easily installed on other machines, we recommend using GitHub workflows to test your plugin in a fresh environment - the napari plugin cookiecutter provides an example of such a workflow.

    If you believe this PR has been opened in error, please feel free to close it and let us know where we went wrong!

    opened by DragaDoncila 2
  • Some IMS files through a TypeError error when loading channel axis??

    Some IMS files through a TypeError error when loading channel axis??

    I also just tested the ims file that are provided with Imaris. All of these files work for me with the exceptions of "R18Demo.ims" and "SwimmingAlgae.ims" which are throwing an error that I have not seen before during load.

    TypeError: Received sequence for argument 'name', did you mean to specify a 'channel_axis'?

    opened by AlanMWatson 1
  • Image scale off when loading some IMS files

    Image scale off when loading some IMS files

    Identified by @chili-chiu:

    "The image scale seems to be off though. For example PlantCell.ims should have (x,y,z) = (0.25, 0.25, 1.5) um, but once opened in napari the scale shows (z,y,x) = (5.92, 1, 1) ."

    opened by AlanMWatson 1
  • Fix IndexError when reducing data color dimension

    Fix IndexError when reducing data color dimension

    07:40:15 ERROR PluginError: Error in plugin 'napari-imaris-loader', hook 'napari_get_reader' Cause was: IndexError('tuple index out of range') in file: /home/iana/bio/napari-imaris-loader/napari_imaris_loader/reader.py at line: 148 author: Alan M Watson email: [email protected] package: napari-imaris-loader url: https://github.com/AlanMWatson/napari-imaris-loader version: 0.1.2.dev0+g4e3df16.d20211109

    opened by noisysky 0
Owner
Alan Watson
Alan Watson
A plugin to simplify creating multi-page Dash apps

Multi-Page Dash App Plugin A plugin to simplify creating multi-page Dash apps. This is a preview of functionality that will of Dash 2.1. Background Th

Plotly 19 Dec 9, 2022
Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft

uvtt2fgu Utility to extract Fantasy Grounds Unity Line-of-sight and lighting files from a Univeral VTT file exported from Dungeondraft This program wo

Andre Kostur 29 Dec 5, 2022
A small utility that sorts your files.

FileSorter A small utility that sorts your files. TODO: Scan directory to find files(thanks @corruptmemry for this!) Split extensions to determine fil

null 2 Jun 16, 2022
Edit SRT files to delay subtitle time-stamps.

subtitle-delay A program written in Python that directly edits SRT file to delay the subtitles. Features: Will throw an error if delaying with negativ

null 8 Jul 17, 2022
This code renames subtitle file names to your video files names, so you don't need to rename them manually.

Rename Subtitle This code renames your subtitle file names to your video file names so you don't need to do it manually Note: It only works for series

Mostafa Kazemi 4 Sep 12, 2021
produces PCA on genotypes from fasta files (popPhyl's ID format)

popPhyl_PCA Performs PCA of genotypes. Works in two steps. 1. Input file A single fasta file containing different loci, in different populations/speci

camille roux 2 Oct 8, 2021
A tool written in python to generate basic repo files from github

A tool written in python to generate basic repo files from github

Riley 7 Dec 2, 2021
A simple language and reference decompiler/compiler for MHW THK Files

Leviathon A simple language and reference decompiler/compiler for MHW THK Files. Project Goals The project aims to define a language specification for

null 11 Jan 7, 2023
This tool analyzes the json files generated by stream-lnd-htlcs to find hidden channel demand.

analyze_lnd_htlc Introduction Rebalancing channels is an important part of running a Lightning Network node. While it would be great if all channels c

Marimox 4 Dec 8, 2022
iOS Snapchat parser for chats and cached files

ParseSnapchat iOS Snapchat parser for chats and cached files Tested on Windows and Linux install required libraries: pip install -r requirements.txt c

null 11 Dec 5, 2022
Lock files using python and cmd

Python_Lock_Files Lock files using python and cmd license feel free to do whatever you want to with these files, i dont take any responsibility tho, u

null 1 Nov 1, 2021
These scripts look for non-printable unicode characters in all text files in a source tree

find-unicode-control These scripts look for non-printable unicode characters in all text files in a source tree. find_unicode_control.py should work w

Siddhesh Poyarekar 25 Aug 30, 2022
Find unused resource keys in properties files in a Salesforce Commerce Cloud project and get rid of them.

Find Unused Resource Keys Find unused resource keys in properties files in a Salesforce Commerce Cloud project and get rid of them. It looks through a

Noël 5 Jan 8, 2022
A utility tool to create .env files

A utility tool to create .env files dump-env takes an .env.template file and some optional environmental variables to create a new .env file from thes

wemake.services 89 Dec 8, 2022
Python program for analyzing the output files of phonopy.

PhononTools Description Python program to analyze the results generated by phonopy. Using the .yaml and .dat files that phonopy generates one can plot

Harry LaBollita 8 Nov 27, 2022
Data Utilities e.g. for importing files to onetask

Use this repository to easily convert your source files (csv, txt, excel, json, html) into record-oriented JSON files that can be uploaded into onetask.

onetask.ai 1 Jul 18, 2022
A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct.

torcp A script copies movie and TV files to your GD drive, or create Hard Link in a seperate dir, in Emby-happy struct. Usage: python3 torcp.py -h Exa

ccf2012 105 Dec 22, 2022
A script to check for common mistakes in LaTeX source files of scientific papers.

LaTeX Paper Linter This script checks for common mistakes in LaTeX source files of scientific papers. Usage python3 paperlint.py <file.tex> [-i/x <inc

Michael Schwarz 12 Nov 16, 2022
python package for generating typescript grpc-web stubs from protobuf files.

grpc-web-proto-compile NOTE: This package has been superseded by romnn/proto-compile, which provides the same functionality but offers a lot more flex

Roman Dahm 0 Sep 5, 2021