InsightSoftwareConsortium / InsightSoftwareConsortium/itkwidgets

Viewer does not properly initialize point set display

Open
#398 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
624
Forks
83
PR merge metrics
No merged PRs in 30d

Description

### Overview
Trying to display an ITK 2D point set with "view" fails to show data with the "points" representation. The itkwidgets UI overlay can be used to set points to "sphere" representation which allows data to be displayed. An uncaught TypeError is present in the console.

### Console Error
> Uncaught (in promise) TypeError: Cannot read property 'length' of null
at initialize_itkVtkViewer (viewer.js:932)
at initialize_viewer (viewer.js:1852)
at O (viewer.js:286)
at viewer.js:1285

### Steps to Reproduce
1. Generate an ITK point set of type `itk.PointSet[itk.F,2]`
2. Create a itkwidgets viewer object in Jupyter Notebook with `view(point_sets=[point_set])`

### Expected Behavior:
The point set "points" representation is visible.

### Observed Behavior:
The "points" representation is not visible. The "spheres" representation can be manually selected to make points visible.

### Other notes:
Bug not observed in example using numpy arrays instead of ITK point sets: [https://github.com/InsightSoftwareConsortium/itkwidgets/blob/master/examples/NumPyArrayPointSet.ipynb](https://github.com/InsightSoftwareConsortium/itkwidgets/blob/master/examples/NumPyArrayPointSet.ipynb)

Erroneous behavior can be seen in [ITKExamples Draft PR 189](https://github.com/InsightSoftwareConsortium/ITKExamples/pull/189)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.