You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observed an error when attempting to view an itk.Image with itkwidgets==1.0a35.
I am not 100% certain that the error lies in itkwidgets. The stack trace includes ngff_zarr, dask_image, and scipy.
Full Exception Message
> itkwidgets.view(subimage)
Traceback (most recent call last):
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\interactiveshell.py", line 3508, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "C:\Users\tom.birdsong\AppData\Local\Temp\ipykernel_9092\2030550360.py", line 2, in <module>
itkwidgets.view(subimage)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\itkwidgets\viewer.py", line 465, in view
viewer = Viewer(data=data, **kwargs)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\itkwidgets\viewer.py", line 136, in __init__
data = build_init_data(input_data)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\itkwidgets\_initialization_params.py", line 88, in build_init_data
result = _get_viewer_image(data, label=False)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\itkwidgets\integrations\__init__.py", line 78, in _get_viewer_image
multiscales = to_multiscales(ngff_image, method=method)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\ngff_zarr\to_multiscales.py", line 317, in to_multiscales
images = _downsample_dask_image(
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\ngff_zarr\methods\_dask_image.py", line 396, in _downsample_dask_image
downscaled_array = dask_image.ndinterp.affine_transform(
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\dask_image\ndinterp\__init__.py", line 93, in affine_transform
ndimage_affine_transform(np.zeros([0] * image.ndim),
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\scipy\ndimage\_interpolation.py", line 599, in affine_transform
offset = _ni_support._normalize_sequence(offset, input.ndim)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\scipy\ndimage\_ni_support.py", line 63, in _normalize_sequence
if not is_str and isinstance(input, Iterable):
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\abc.py", line 98, in __instancecheck__
return _abc_instancecheck(cls, instance)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\abc.py", line 102, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\abc.py", line 102, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\typing_extensions.py", line 583, in __subclasscheck__
return super().__subclasscheck__(other)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\abc.py", line 102, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\typing_extensions.py", line 639, in _proto_hook
raise TypeError("Instance and class checks can only be used with"
TypeError: Instance and class checks can only be used with @runtime_checkable protocols
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\interactiveshell.py", line 2105, in showtraceback
stb = self.InteractiveTB.structured_traceback(
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\ultratb.py", line 1396, in structured_traceback
return FormattedTB.structured_traceback(
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\ultratb.py", line 1287, in structured_traceback
return VerboseTB.structured_traceback(
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\ultratb.py", line 1140, in structured_traceback
formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\ultratb.py", line 1055, in format_exception_as_a_whole
frames.append(self.format_record(record))
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\ultratb.py", line 955, in format_record
frame_info.lines, Colors, self.has_colors, lvals
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\IPython\core\ultratb.py", line 778, in lines
return self._sd.lines
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\stack_data\utils.py", line 144, in cached_property_wrapper
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\stack_data\core.py", line 734, in lines
pieces = self.included_pieces
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\stack_data\utils.py", line 144, in cached_property_wrapper
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\stack_data\core.py", line 681, in included_pieces
pos = scope_pieces.index(self.executing_piece)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\stack_data\utils.py", line 144, in cached_property_wrapper
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\stack_data\core.py", line 660, in executing_piece
return only(
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\executing\executing.py", line 182, in only
if isinstance(it, Sized):
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\typing.py", line 769, in __instancecheck__
return self.__subclasscheck__(type(obj))
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\typing.py", line 774, in __subclasscheck__
return issubclass(cls, self.__origin__)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\abc.py", line 102, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\abc.py", line 102, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\typing_extensions.py", line 583, in __subclasscheck__
return super().__subclasscheck__(other)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\abc.py", line 102, in __subclasscheck__
return _abc_subclasscheck(cls, subclass)
File "C:\Users\tom.birdsong\Anaconda3\envs\venv-itk\lib\site-packages\typing_extensions.py", line 639, in _proto_hook
raise TypeError("Instance and class checks can only be used with"
TypeError: Instance and class checks can only be used with @runtime_checkable protocols
Overview
Observed an error when attempting to view an
itk.Image
withitkwidgets==1.0a35
.I am not 100% certain that the error lies in
itkwidgets
. The stack trace includesngff_zarr
,dask_image
, andscipy.
Full Exception Message
Platform Information
Windows 10
Python 3.8.5
itk == 5.4rc1
itkwidgets == 1.0a35
dask == 2023.5.0
2022.8.0dask-image == 2023.3.0
2021.12.0ngff-zarr == 0.4.6
scipy == 1.10.1
Additional Details
The subimage was extracted from a requested/buffered region in a larger image using
itk.extract_image_filter
.EDIT: Updated platform information.
The text was updated successfully, but these errors were encountered: