cornerstone3D icon indicating copy to clipboard operation
cornerstone3D copied to clipboard

[Bug] A problem in ProbeTool affects the normal use of EraserTool.

Open Steven-DD opened this issue 1 year ago • 2 comments

Describe the Bug

When using EraserTool, it does not correctly clear the markers generated by ProbeTool。

Steps to Reproduce

  1. using ProbeTool
  2. using EraserTool
  3. trying to delete probe markers

The current behavior

EraserTool not working,it does not correctly clear the markers

The expected behavior

EraserTool can correctly remove the markers.

Looking at the source code for ProbeTool I noticed a comment on lines 128-129, I'm wondering if there's a specific reason for this, if it doesn't have an effect I'll remove this code on the version I'm using

isPointNearTool is used in EraserTool, which needs to return a correct result, not like this

in ProbeTool // Not necessary for this tool but needs to be defined since it's an abstract // method from the parent class. isPointNearTool(): boolean { return false; }

in EraserTool for (const annotation of interactableAnnotations) { if ( toolInstance.isPointNearTool( element, annotation, currentPoints.canvas, 10, interactionType ) ) { annotationsToRemove.push(annotation.annotationUID); } } }

AnnotationEraserTool ProbeTool.ts

OS

Windows 11

Node version

18

Browser

edge

Steven-DD avatar Jun 05 '24 07:06 Steven-DD

I think i know what is going on

sedghi avatar Jun 06 '24 16:06 sedghi

Is there a solution now

lqpmq90923 avatar Sep 06 '24 05:09 lqpmq90923