Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
) / 2
const yRadius = Math.sqrt(
square(handles.perpendicularPoint.x - center.x) +
square(handles.perpendicularPoint.y - center.y),
)
const theta = Math.atan2(
handles.end.y - handles.start.y,
handles.end.x - handles.start.x,
)
ellipseCoordinates.xRadius = xRadius
ellipseCoordinates.yRadius = yRadius
ellipseCoordinates.center = center
// Retrieve the array of pixels that the ellipse bounds cover
const pixels = cornerstone.getPixels(
element,
ellipseCoordinates.left,
ellipseCoordinates.top,
ellipseCoordinates.width,
ellipseCoordinates.height,
)
// Calculate the mean & standard deviation from the pixels and the ellipse details.
const ellipseMeanStdDev = calculateRotatedEllipseStatistics(
pixels,
ellipseCoordinates,
theta,
)
let meanStdDevSUV