Javi-r
(Javi R)
1
I want to upgrade this to vtk.js v28
const wobj = resliceCursorWidget.updateReslicePlane(
obj.reslice,
xyzToViewType[obj.id]
);
lineWidget.getManipulator().setOriginFrom(wobj.origin);
lineWidget.getManipulator().setNormalFrom(resliceCursorWidget.getWidgetState().getPlanes()[xyzToViewType[obj.id]].normal);
updateReslicePlane no longer returns wobj now only returns true or false
setOriginFrom and setNormalFrom no longer exist
Javi-r
(Javi R)
3
I have already read this document and I can’t find anything related to this.
The From 25.x to 26 has a section on ResliceCursor. Was that not your question?
jadh4v
(Shreeraj Jadhav)
5
You should be able to get the origin and normal like this:
const origin = resliceCursorWidget.getWidgetState().getCenter();
const planeNormal = resliceCursorWidget.getPlaneNormalFromViewType(xyzToViewType[obj.id]);
And regarding the lineWidget, perhaps you want to do:
lineWidget.getManipulator().setWidgetOrigin(...);
lineWidget.getManipulator().setWidgetNormal(...);