BUG: Fix keyword param point_set -> point_sets#607
BUG: Fix keyword param point_set -> point_sets#607thewtex merged 8 commits intoInsightSoftwareConsortium:mainfrom
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
There was a problem hiding this comment.
I think this should be point_set -- so adjustments may need to be made to the view code?
In 0.X, we could pass a list of point sets (and geometries), however in 1.X, I would like to support a single point set and geometry for view because it avoids ambiguities with NumPy-derived data types and lists and it provide a more reasonable way to specify parameters -- they can just be passed as kwargs to view. To add more data the scene, viewer = view(point_set1); viewer.add_point_set(point_set2) Does that make sense?
|
@thewtex Makes sense! I'll just update this PR to make those fixes instead |
e918fab to
af07afc
Compare
|
@thewtex Any preference on the default behavior for detecting the input type for numpy arrays, zarr groups, dask arrays, PyTorch tensors, or xarray DataArrays or Datasets? In all of these cases the default is to treat the data as an image if not explicitly passed in with the Also right now the behavior in the |
|
@bnmajor thanks!
In detecting the type without an explicit kwarg, can we have
Thinking about transitions, |
itkwidgets/_type_aliases.py
Outdated
|
|
||
| Image = Union[np.ndarray, itkwasm.Image, zarr.Group] | ||
| Point_Sets = Union[np.ndarray, itkwasm.PointSet, zarr.Group] | ||
| Point_Set = Union[np.ndarray, itkwasm.PointSet, zarr.Group] |
There was a problem hiding this comment.
unrelated to your changes here, but can we please fix regardless: Point_Set -> PointSet 🙏
Assume data with two dimensions and shape (N, 2) or (N, 3) is a point set, all other data is assumed to be an image.
Provides an example of inferring that the data is a point set without having to explicitly use the keyword argument.
Add an example of add_point_set usage.
af07afc to
4c2ac86
Compare
Sure thing! Updated with those changes now 👍
Awesome. This branch now relies on Kitware/itk-vtk-viewer#643. Once that is in the itk-vtk-viewer version will need to be bumped before this branch is ready. |
No description provided.