fix(seg): Enhance segmentation tools and UI, refactor code, and update dependencies (#4915)

This commit is contained in:
Alireza authored and GitHub committed 2025-04-02 18:10:47 -04:00
1 parent 1dc00d3030
commit 8432d5f633
37 files changed
+1063 -1122

No files matched your search

@@ -92,6 +92,8 @@ function getMappedAnnotations(annotation, displaySetService) {
}
const annotations = [];
const addedModalities = new Set();
Object.keys(cachedStats).forEach(targetId => {
const targetStats = cachedStats[targetId];
@@ -106,6 +108,16 @@ function getMappedAnnotations(annotation, displaySetService) {
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality, modalityUnit, areaUnit } = targetStats;
// Skip if we've already added this modality
if (Modality && addedModalities.has(Modality)) {
return;
}
// Add modality to the set if it exists
if (Modality) {
addedModalities.add(Modality);
}
annotations.push({
SeriesInstanceUID,
SOPInstanceUID,