|
|
@@ -320,13 +320,16 @@ export function deleteSelectedMark(currentViewportId: string): void {
|
|
|
const viewport =
|
|
|
cornerstone.getEnabledElementByViewportId(currentViewportId).viewport;
|
|
|
const allAnnotations = cornerstoneTools.annotation.state.getAllAnnotations();
|
|
|
+
|
|
|
+ // 删除所有 LabelTool 创建的标记(包括 L/R 标记、预定义标记、自定义标记、时间戳标记)
|
|
|
for (const annotation of allAnnotations) {
|
|
|
- if (annotation.data.text === 'L' || annotation.data.text === 'R') {
|
|
|
+ if (annotation.metadata?.toolName === LabelTool.toolName ) {
|
|
|
cornerstoneTools.annotation.state.removeAnnotation(
|
|
|
annotation.annotationUID!
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
viewport.render();
|
|
|
}
|
|
|
|