Giter Club home page Giter Club logo

label-creator's People

Contributors

mbphys avatar

label-creator's Issues

Error with napari-0.4.13

When using the Label-Creator under napari-0.4.13, an error message occurs. With napari-0.4.12 it works.

Traceback:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/utils/_magicgui.py in _on_future_ready()
    240 
    241         def _on_future_ready():
--> 242             add_layer_data_tuples_to_viewer(gui, future.result(), return_type)
        global add_layer_data_tuples_to_viewer = 
        global gui = undefined
        global future.result = undefined
        global return_type = undefined
    243             _FUTURES.discard(future)
    244 

~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/utils/_magicgui.py in add_layer_data_tuples_to_viewer(gui=})) -> concurrent.futures._base.Future>, result=[( (1, 20368, 22170) uint8, {'blending': 'additive', 'experimental_clipping_planes': [], 'experimental_slicing_plane': {'enabled': False, 'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'thickness': 1.0}, 'metadata': {'ome_types': }, 'multiscale': False, 'name': '0 :: ScanRegion1 :: DAPI_Label', 'opacity': 1.0, 'rendering': 'mip', 'rotate': [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], 'scale':  (3,) float64, ...}, 'labels')], return_type=concurrent.futures._base.Future[typing.NewType..new_type])
    148                     pass
    149             # otherwise create a new layer from the layer data
--> 150             viewer._add_layer_from_data(*layer_datum)
        viewer._add_layer_from_data = ), dims=Dims(ndim=3, ndisplay=2, last_used=0, range=((0.0, 4.0, 4.0), (0.0, 132392.0, 6.5), (0.0, 144105.0, 6.5)), current_step=(0, 10184, 11085), order=(0, 1, 2), axis_labels=('0', '1', '2')), 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=''), overlays=Overlays(interaction_box=InteractionBox(points=None, show=False, show_handle=False, show_vertices=False, selection_box_drag=None, selection_box_final=None, transform_start=, transform_drag=, transform_final=, transform=, allow_new_selection=True, selected_vertex=None)), help='', status='0 :: ScanRegion1 :: DAPI [     0 148970 146788]', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_move_callbacks=[.mouse_move at 0x7f081e812b80>], mouse_drag_callbacks=[.mouse_drag at 0x7f081e812700>], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'Shift': .hold_to_lock_aspect_ratio at 0x7f081e8125e0>, 'Control-Shift-R': , 'Control-Shift-A': })>
        layer_datum = ( (1, 20368, 22170) uint8, {'name': '0 :: ScanRegion1 :: DAPI_Label', 'metadata': {'ome_types': }, 'scale':  (3,) float64, 'translate':  (3,) float64, 'rotate': [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], 'shear': [0.0, 0.0, 0.0], 'opacity': 1.0, 'blending': 'additive', 'visible': True, 'experimental_clipping_planes': [], 'multiscale': False, 'rendering': 'mip', 'experimental_slicing_plane': {'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'enabled': False, 'thickness': 1.0}}, 'labels')
    151 
    152 

~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/components/viewer_model.py in _add_layer_from_data(self=Viewer(axes=Axes(visible=False, labels=True, col...ings._transform_active_layer at 0x7f081e899550>}), data= (1, 20368, 22170) uint8, meta={'blending': 'additive', 'experimental_clipping_planes': [], 'experimental_slicing_plane': {'enabled': False, 'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'thickness': 1.0}, 'metadata': {'ome_types': }, 'multiscale': False, 'name': '0 :: ScanRegion1 :: DAPI_Label', 'opacity': 1.0, 'rendering': 'mip', 'rotate': [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], 'scale':  (3,) float64, ...}, layer_type='labels')
   1052         try:
   1053             add_method = getattr(self, 'add_' + layer_type)
-> 1054             layer = add_method(data, **(meta or {}))
        layer = undefined
        add_method = ), dims=Dims(ndim=3, ndisplay=2, last_used=0, range=((0.0, 4.0, 4.0), (0.0, 132392.0, 6.5), (0.0, 144105.0, 6.5)), current_step=(0, 10184, 11085), order=(0, 1, 2), axis_labels=('0', '1', '2')), 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=''), overlays=Overlays(interaction_box=InteractionBox(points=None, show=False, show_handle=False, show_vertices=False, selection_box_drag=None, selection_box_final=None, transform_start=, transform_drag=, transform_final=, transform=, allow_new_selection=True, selected_vertex=None)), help='', status='0 :: ScanRegion1 :: DAPI [     0 148970 146788]', tooltip=Tooltip(visible=False, text=''), theme='dark', title='napari', mouse_move_callbacks=[.mouse_move at 0x7f081e812b80>], mouse_drag_callbacks=[.mouse_drag at 0x7f081e812700>], mouse_double_click_callbacks=[], mouse_wheel_callbacks=[], _persisted_mouse_event={}, _mouse_drag_gen={}, _mouse_wheel_gen={}, keymap={'Shift': .hold_to_lock_aspect_ratio at 0x7f081e8125e0>, 'Control-Shift-R': , 'Control-Shift-A': })>
        data =  (1, 20368, 22170) uint8
        meta = {'name': '0 :: ScanRegion1 :: DAPI_Label', 'metadata': {'ome_types': }, 'scale':  (3,) float64, 'translate':  (3,) float64, 'rotate': [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], 'shear': [0.0, 0.0, 0.0], 'opacity': 1.0, 'blending': 'additive', 'visible': True, 'experimental_clipping_planes': [], 'multiscale': False, 'rendering': 'mip', 'experimental_slicing_plane': {'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'enabled': False, 'thickness': 1.0}}
   1055         except TypeError as exc:
   1056             if 'unexpected keyword argument' not in str(exc):

~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/components/viewer_model.py in add_labels(self=Viewer(axes=Axes(visible=False, labels=True, col...ings._transform_active_layer at 0x7f081e899550>}), data= (1, 20368, 22170) uint8, num_colors=50, features=None, properties=None, color=None, seed=0.5, name='0 :: ScanRegion1 :: DAPI_Label', metadata={'ome_types': }, scale= (3,) float64, translate= (3,) float64, rotate=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], shear=[0.0, 0.0, 0.0], affine=None, opacity=1.0, blending='additive', rendering='mip', visible=True, multiscale=False, cache=True, experimental_slicing_plane={'enabled': False, 'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'thickness': 1.0}, experimental_clipping_planes=[])
      2 
      3 import inspect
----> 4 import itertools
        global itertools = undefined
      5 import os
      6 import warnings

~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/layers/labels/labels.py in __init__(self=, data= (1, 20368, 22170) uint8, num_colors=50, features=None, properties=None, color=None, seed=0.5, name='0 :: ScanRegion1 :: DAPI_Label', metadata={'ome_types': }, scale= (3,) float64, translate= (3,) float64, rotate=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], shear=[0.0, 0.0, 0.0], affine=None, opacity=1.0, blending='additive', rendering='mip', visible=True, multiscale=False, cache=True, experimental_slicing_plane={'enabled': False, 'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'thickness': 1.0}, experimental_clipping_planes=[])
    256         self._color_lookup_func = None
    257 
--> 258         super().__init__(
        global super.__init__ = undefined
        data =  (1, 20368, 22170) uint8
        global rgb = undefined
        global colormap = undefined
        self._random_colormap = Colormap(colors= (50, 4) float64, name='label_colormap', interpolation=, controls= (51,) float64)
        global contrast_limits = undefined
        global interpolation = undefined
        rendering = 'mip'
        global iso_threshold = undefined
        name = '0 :: ScanRegion1 :: DAPI_Label'
        metadata = {'ome_types': }
        scale =  (3,) float64
        translate =  (3,) float64
        rotate = [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]
        shear = [0.0, 0.0, 0.0]
        affine = None
        opacity = 1.0
        blending = 'additive'
        visible = True
        multiscale = False
        cache = True
        experimental_slicing_plane = {'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'enabled': False, 'thickness': 1.0}
        experimental_clipping_planes = []
    259             data,
    260             rgb=False,

~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/layers/image/image.py in __init__(self=, data= (1, 20368, 22170) uint8, rgb=False, colormap=Colormap(colors= (50, 4) ..., controls= (51,) float64), contrast_limits=[0.0, 1.0], gamma=1, interpolation='nearest', rendering='mip', iso_threshold=0, attenuation=0.05, name='0 :: ScanRegion1 :: DAPI_Label', metadata={'ome_types': }, scale= (3,) float64, translate= (3,) float64, rotate=[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], shear=[0.0, 0.0, 0.0], affine=None, opacity=1.0, blending='additive', visible=True, multiscale=False, cache=True, experimental_slicing_plane={'enabled': False, 'normal': (1.0, 0.0, 0.0), 'position': (0.0, 0.0, 0.0), 'thickness': 1.0}, experimental_clipping_planes=[])
    340         }
    341         self.interpolation = interpolation
--> 342         self.rendering = rendering
        self.rendering = undefined
        rendering = 'mip'
    343         if experimental_slicing_plane is not None:
    344             self.experimental_slicing_plane = experimental_slicing_plane

~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/layers/labels/labels.py in rendering(self=, rendering='mip')
    340     @rendering.setter
    341     def rendering(self, rendering):
--> 342         self._rendering = LabelsRendering(rendering)
        self._rendering = undefined
        global LabelsRendering = 
        rendering = 'mip'
    343         self.events.rendering()
    344 

~/anaconda3/envs/nap_dev/lib/python3.9/site-packages/napari/utils/misc.py in __call__(cls=, value='mip', names=None, module=None, qualname=None, type=None, start=1)
    262         if names is None:
    263             if isinstance(value, str):
--> 264                 return super().__call__(value.lower())
        global super.__call__ = undefined
        value.lower = 
    265             elif isinstance(value, cls):
    266                 return value

~/anaconda3/envs/nap_dev/lib/python3.9/enum.py in __call__(cls=, value='mip', names=None, module=None, qualname=None, type=None, start=1)
    382         """
    383         if names is None:  # simple value lookup
--> 384             return cls.__new__(cls, value)
        cls.__new__ = 
        cls = 
        value = 'mip'
    385         # otherwise, functional API: we're creating a new Enum type
    386         return cls._create_(

~/anaconda3/envs/nap_dev/lib/python3.9/enum.py in __new__(cls=, value='mip')
    700                 ve_exc = ValueError("%r is not a valid %s" % (value, cls.__qualname__))
    701                 if result is None and exc is None:
--> 702                     raise ve_exc
        ve_exc = None
    703                 elif exc is None:
    704                     exc = TypeError(

ValueError: 'mip' is not a valid LabelsRendering

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.