-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Running ccfwidgets with something very close to the default usage. Passing in an array of points to the CCFWidget constructor yields an error that I don't fully understand. I'm not familiar enough with the itk widgets to parse through it. This is with ccfwidget==0.5.3 and itkwidgets==0.32.6. A similar error with different error text is thrown with itkwidgets==0.32.4
The line:
ccf = CCFWidget(markers=[points])
where points is a numpy array with shape (1920, 3)
ccf = CCFWidget(markers=[points])
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
Cell In[7], line 1
----> 1 ccf = CCFWidget(markers=[points])
File /opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/ccfwidget/widget_ccf.py:122, in CCFWidget.__init__(self, tree, swc_morphologies, markers, marker_sizes, marker_opacities, marker_colors, selected_allen_ids, selected_acronyms, rotate, **kwargs)
118 camera = np.array([[ 1.3441567e+03, -2.1723846e+04, 1.7496496e+04],
119 [ 6.5500000e+03, 3.9750000e+03, 5.6750000e+03],
120 [ 3.6606243e-01, -4.4908229e-01, -8.1506038e-01]], dtype=np.float32)
121 size_limit_3d = [256,256,256]
--> 122 self.itk_viewer = view(image=self._image,
123 label_image=self._label_image,
124 opacity_gaussians=opacity_gaussians,
125 label_image_blend=0.65,
126 point_sets=markers.copy(),
127 camera=camera,
128 ui_collapsed=True,
129 shadow=False,
130 size_limit_3d=size_limit_3d,
131 background=(0.85,)*3,
132 units="μm",
133 gradient_opacity=0.1)
134 # Todo: initialization should work
135 self.itk_viewer.opacity_gaussians = opacity_gaussians
File /opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/itkwidgets/widget_viewer.py:1090, in view(image, label_image, label_image_names, label_image_weights, label_image_blend, cmap, lut, select_roi, interpolation, gradient_opacity, opacity_gaussians, channels, slicing_planes, shadow, blend_mode, point_sets, point_set_colors, point_set_opacities, point_set_representations, point_set_sizes, geometries, geometry_colors, geometry_opacities, ui_collapsed, rotate, annotations, axes, mode, **kwargs)
1087 if image is None and len(images): # only one image is rendered
1088 image = images[0]
-> 1090 viewer = Viewer(image=image,
1091 label_image=label_image,
1092 label_image_names=label_image_names,
1093 label_image_blend=label_image_blend,
1094 label_image_weights=label_image_weights,
1095 cmap=cmap,
1096 lut=lut,
1097 select_roi=select_roi,
1098 interpolation=interpolation,
1099 gradient_opacity=gradient_opacity,
1100 opacity_gaussians=opacity_gaussians,
1101 slicing_planes=slicing_planes,
1102 shadow=shadow,blend_mode=blend_mode,
1103 point_sets=point_sets,
1104 point_set_colors=point_set_colors,
1105 point_set_opacities=point_set_opacities,
1106 point_set_representations=point_set_representations,
1107 point_set_sizes=point_set_sizes,
1108 geometries=geometries,geometry_colors=geometry_colors,
1109 geometry_opacities=geometry_opacities,
1110 rotate=rotate,ui_collapsed=ui_collapsed,
1111 annotations=annotations,axes=axes,mode=mode,
1112 **kwargs)
1113 return viewer
File /opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/itkwidgets/widget_viewer.py:403, in Viewer.__init__(self, **kwargs)
401 if size[dim] > self.size_limit_3d[dim]:
402 self._downsampling = True
--> 403 self._update_rendered_image()
404 if self._downsampling:
405 self.observe(self._on_roi_changed, ['roi'])
File /opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/itkwidgets/widget_viewer.py:520, in Viewer._update_rendered_image(self)
517 return
519 if self.image:
--> 520 self.shrinker.UpdateLargestPossibleRegion()
521 if self.label_image:
522 self.label_image_shrinker.UpdateLargestPossibleRegion()
RuntimeError: /work/ITK-source/ITK/Modules/Core/Common/src/itkDataObject.cxx:[367](https://github.com/AllenInstitute/openscope_databook/actions/runs/5283149469/jobs/9559011685#step:9:368):
Requested region is (at least partially) outside the largest possible region.
----------------------------- Captured stderr call -----------------------------
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: suspicious return value (3) from SVDC
/work/ITK-source/ITK/Modules/ThirdParty/VNL/src/vxl/core/vnl/algo/vnl_svd.hxx: M is 3x3
M = [ ...
nan nan nan
nan nan nan
nan nan nan ]Metadata
Metadata
Assignees
Labels
No labels