diff --git a/extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx b/extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx index 0d4c72b50..81e70c19f 100644 --- a/extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx +++ b/extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx @@ -129,7 +129,7 @@ const CornerstoneViewportDownloadForm = ({ downloadViewport.setVolumes([{ volumeId: volumeIds[0] }]); } - if (segmentationRepresentations.length > 0) { + if (segmentationRepresentations?.length) { segmentationRepresentations.forEach(segRepresentation => { const { segmentationId, colorLUTIndex, type } = segRepresentation; if (type === Enums.SegmentationRepresentations.Labelmap) { diff --git a/platform/core/src/services/MeasurementService/MeasurementService.ts b/platform/core/src/services/MeasurementService/MeasurementService.ts index 97f978181..7bde5c587 100644 --- a/platform/core/src/services/MeasurementService/MeasurementService.ts +++ b/platform/core/src/services/MeasurementService/MeasurementService.ts @@ -102,6 +102,8 @@ enum MeasurementChangeType { export type MeasurementFilter = (measurement) => boolean; +const sourceMissing = new Set(); + /** * MeasurementService class that supports source management and measurement management. * Sources can be any library that can provide "annotations" (e.g. cornerstone-tools, cornerstone, etc.) @@ -497,7 +499,10 @@ class MeasurementService extends PubSubService { mapping => mapping.annotationType === annotationType ); if (!sourceMapping) { - console.log('No source mapping', source.uid, annotationType, source); + if (!sourceMissing.has(source.uid) ) { + console.log('No source mapping', source.uid, annotationType, source); + sourceMissing.add(source.uid); + } this.addUnmappedMeasurement(sourceAnnotationDetail, source); return; }