Skip to content

Viewer does not properly initialize point set display #398

Description

@tbirdso

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

Erroneous behavior can be seen in ITKExamples Draft PR 189

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions