Hello @sisobus, thanks for this great tool.
I am trying to integrate this tool into an application that uses cornerstone already and I have the drawings passed from another API with the points being cx
, cy
, radiusX
, radiusY
, and rotation
. My question is how can I render these points?
Currently, this is how I do it but can't seem to render it well, the area and other values remain at zero.
const measurementData = {
visible: true,
active: true,
invalidated: true,
handles: {
end: {
x: cx,
y: cy,
highlight: true,
active: true,
key: 'end',
},
initialRotation: rotation,
perpendicularPoint: {
x: radiusX,
y: radiusY,
highlight: true,
active: false,
isFirst: true,
key: 'perpendicular',
},
textBox: {
active: false,
hasMoved: false,
movesIndependently: false,
drawnIndependently: true,
allowedOutsideImage: true,
hasBoundingBox: true,
},
},
};
cornerstoneTools.setToolActive('RotatedEllipticalRoi', {
mouseButtonMask: 1,
});
cornerstoneTools.addToolState(
element,
'RotatedEllipticalRoi',
measurementData
);
This is how it is rendered, any advice to make this work?
Drawing manually with the tool does actually produce nice results, as seen here.