I am rendering a image of the current active viewport by using code similar to:
const enabledElement = cornerstone.getEnabledElementByViewportId('default');
const canvas = enabledElement.viewport.canvas;
const dataURL = canvas.toDataURL('base64');
I want to process this image and get some points back from that processing. These points will, naturally, be in the space of the rendered image.
I have tried to transform these points back into world coordinates by using:
const extractedPoint = [...]
const worldPoint = enabledElement.viewport.canvasToWorld(extractedPoint);
This results in a world coordinate that makes no sense.
How should I go about this?