After rendering MPR using ImageData, Volume, and VolumeMapper, I want to use lineWidget to measure distance but not display lines.
As shown in the figure, the blue markings indicate the starting and ending coordinates of the line. The length is displayed, but the line is not.
api.widgetManager = vtkWidgetManager.newInstance();
api.widgetManager.setRenderer(api.renderer);
api.widgets.lineWidget = vtkLineWidget.newInstance();
api.widgets.lineWidget.setVisibility(true);
api.widgetsHandles.lineHandle = api.widgetManager.addWidget(api.widgets.lineWidget);
api.widgetsHandles.lineHandle.onEndInteractionEvent(() => {
const text = ${api.widgets.lineWidget.getDistance().toFixed(2)}mm
;
api.widgets.lineWidget.getWidgetState().getText().setText(text);
console.log(‘lineWidget’, text);
});
api.setupSVG(api.widgets.lineWidget);
I need help!thanks!