Fix/duplicate redundant log measurement mapping (#5760)
* Remove all but one log message for mappings. * fix: NPE when no segmentations list returned.
This commit is contained in:
parent
a4c99e6926
commit
5807889f79
@ -129,7 +129,7 @@ const CornerstoneViewportDownloadForm = ({
|
|||||||
downloadViewport.setVolumes([{ volumeId: volumeIds[0] }]);
|
downloadViewport.setVolumes([{ volumeId: volumeIds[0] }]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (segmentationRepresentations.length > 0) {
|
if (segmentationRepresentations?.length) {
|
||||||
segmentationRepresentations.forEach(segRepresentation => {
|
segmentationRepresentations.forEach(segRepresentation => {
|
||||||
const { segmentationId, colorLUTIndex, type } = segRepresentation;
|
const { segmentationId, colorLUTIndex, type } = segRepresentation;
|
||||||
if (type === Enums.SegmentationRepresentations.Labelmap) {
|
if (type === Enums.SegmentationRepresentations.Labelmap) {
|
||||||
|
|||||||
@ -102,6 +102,8 @@ enum MeasurementChangeType {
|
|||||||
|
|
||||||
export type MeasurementFilter = (measurement) => boolean;
|
export type MeasurementFilter = (measurement) => boolean;
|
||||||
|
|
||||||
|
const sourceMissing = new Set();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MeasurementService class that supports source management and measurement management.
|
* MeasurementService class that supports source management and measurement management.
|
||||||
* Sources can be any library that can provide "annotations" (e.g. cornerstone-tools, cornerstone, etc.)
|
* 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
|
mapping => mapping.annotationType === annotationType
|
||||||
);
|
);
|
||||||
if (!sourceMapping) {
|
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);
|
this.addUnmappedMeasurement(sourceAnnotationDetail, source);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user