From f980722f026b34e48db3f80738a3484e460506cd Mon Sep 17 00:00:00 2001 From: nanli-emory Date: Thu, 16 May 2024 16:12:16 -0400 Subject: [PATCH] fixed the issue with segmentation in drawing point and ellipse --- core/extension/osd-segment-overlay.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/core/extension/osd-segment-overlay.js b/core/extension/osd-segment-overlay.js index 1f3223c43..4690a4f58 100644 --- a/core/extension/osd-segment-overlay.js +++ b/core/extension/osd-segment-overlay.js @@ -382,7 +382,7 @@ segment.provenance.analysis.coordinate && segment.provenance.analysis.coordinate == 'image'){ convertX = this._viewer.imagingHelper.dataToPhysicalX.bind(this._viewer.imagingHelper); - convertY = this._viewer.imagingHelper.dataToPhysicalY.bind(this._viewer.imagingHelper); + convertY = this._viewer.imagingHelper.dataToPhysicalY.bind(this._viewer.imagingHelper); } this._display_ctx_.lineJoin = style.lineJoin; this._display_ctx_.lineCap = style.lineCap; @@ -398,17 +398,22 @@ // if(polygon.geometry.type == 'Point') { this._display_ctx_.arc( - convertX(points[0]) + this._offset[0], - convertY(points[1]) + this._offset[1], - this._display_ctx_.radius * 2, 0, 2 * Math.PI + convertX(polygon.geometry.coordinates[0]) + this._offset[0], + convertY(polygon.geometry.coordinates[1]) + this._offset[1], + 1 + //this._display_ctx_.radius * 2 + , 0, 2 * Math.PI ); } else if (polygon.geometry.type == 'Ellipse') { + // + + let convertDistance = this._viewer.imagingHelper.logicalToPhysicalDistance.bind(this._viewer.imagingHelper); this._display_ctx_.ellipse( - convertX(points[0]) + this._offset[0], - convertY(points[1]) + this._offset[1], - convertX(radius[0]), - convertX(radius[1]), + convertX(polygon.geometry.coordinates[0]) + this._offset[0], + convertY(polygon.geometry.coordinates[1]) + this._offset[1], + convertDistance(polygon.geometry.radius[0]), + convertDistance(polygon.geometry.radius[1]), polygon.geometry.rotation, 0, 2 * Math.PI