Thanks for the response Forrest,
The scene renders without errors before adding the widget to the widget manager. If you look at the live example which I am altering here @vtk-viewport, you will see a radio button that says “paint”
When that button is pressed, the following code is ran:
if (prevProps.painting !== this.props.painting) {
if (this.props.painting) {
this.viewWidget = this.widgetManager.addWidget(
this.paintWidget,
ViewTypes.SLICE
);
...
}
}
which is what throws the errors when paintWidget
is replaced with rectangleWidget
Do you think it may be worth trying to update the version of VTK in the repository?