fix(seg): Enhance segmentation tools and UI, refactor code, and update dependencies (#4915)
This commit is contained in:
1 parent
1dc00d3030
commit
8432d5f633
37 files changed
+1063
-1122
No files matched your search
@@ -84,7 +84,7 @@ const Bidirectional = {
|
||||
function getMappedAnnotations(annotation, displaySetService) {
|
||||
const { metadata, data } = annotation;
|
||||
const { cachedStats } = data;
|
||||
const { referencedImageId, referencedSeriesInstanceUID } = metadata;
|
||||
const { referencedImageId } = metadata;
|
||||
const targets = Object.keys(cachedStats);
|
||||
|
||||
if (!targets.length) {
|
||||
|
||||
@@ -93,6 +93,7 @@ function getMappedAnnotations(annotation, displaySetService) {
|
||||
}
|
||||
|
||||
const annotations = [];
|
||||
const addedModalities = new Set();
|
||||
Object.keys(cachedStats).forEach(targetId => {
|
||||
const targetStats = cachedStats[targetId];
|
||||
|
||||
@@ -108,6 +109,12 @@ function getMappedAnnotations(annotation, displaySetService) {
|
||||
const { mean, stdDev, max, area, Modality, areaUnit, modalityUnit, perimeter, radiusUnit } =
|
||||
targetStats;
|
||||
|
||||
if (Modality && addedModalities.has(Modality)) {
|
||||
return;
|
||||
}
|
||||
|
||||
addedModalities.add(Modality);
|
||||
|
||||
annotations.push({
|
||||
SeriesInstanceUID,
|
||||
SOPInstanceUID,
|
||||
|
||||
@@ -93,6 +93,8 @@ function getMappedAnnotations(annotation, displaySetService) {
|
||||
}
|
||||
|
||||
const annotations = [];
|
||||
const addedModalities = new Set();
|
||||
|
||||
Object.keys(cachedStats).forEach(targetId => {
|
||||
const targetStats = cachedStats[targetId];
|
||||
|
||||
@@ -107,6 +109,16 @@ function getMappedAnnotations(annotation, displaySetService) {
|
||||
const { SeriesNumber } = displaySet;
|
||||
const { mean, stdDev, max, area, Modality, areaUnit, modalityUnit } = 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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user