about LineWidget?

First you need to ensure your line widget handles are correctly placed (i.e. in the same plane than your slice). You can check it with: o1 = widget.getWidgetState().getHandle1().getOrigin().

This is because I doubt that relying on camera.getFocalPoint in manipulator.setUserOrigin(…camera.getFocalPoint()); is what you really want

Then you slightly modify their origin to see if that makes them show up:
widget.getWidgetState().getHandle1().setOrigin(o1[0] - cd[0], o1[1] - cd[1], o1[2] - cd[2]) where cd is the camera direction.

1 Like