In an inferior vtk.js version I used a function from widgetState (vtkResliceCursorWidget), to hide the sphere in the center I did that:
const widget = vtkResliceCursorWidget.newInstance();
const widgetState = widget.getWidgetState();
widgetState.setOpacity(1);
widgetState.setSphereRadius(10);
widgetState.setLineThickness(1);
widgetState.setShowCenter(false); // I do that to hide the sphere in the center
I was satisfied with the result, as I see the cursor change whenever I hover the mouse over the center even if the we set the showCenter to false, Like below (I have changed the icon of the cursor when we hover):
Now I have upgraded vtk.js, I changed the functions above to do the same thing, now the equivelent is:
widget = vtkResliceCursorWidget.newInstance();
const widgetState = widget.getWidgetState();
const t = 1;
widgetState.getStatesWithLabel('line').forEach((handle) => handle.setScale3(t,t,t));
widgetState.getStatesWithLabel('handles').forEach((handle) => handle.setOpacity(150));
widgetState.getStatesWithLabel('rotation').forEach((handle) => handle.setScale1(10));
widgetState.getCenterHandle().setVisible(false); // to hide the sphere in the center
widgetState.getCenterHandle().setScale1(20);
Now we don’t see the cursor change when we hover over the center (the showCenter is false) like below:
NB: When I set the ShowCenter
to true I see the cursor hover change, I don’t want to see the center sphere