fix: Re IDC2797, fix double parsing of SR qualitative annotations (#2830)
This commit is contained in:
1 parent
49de44ba34
commit
9f813e0ea0
1 file changed
+3
-9
@@ -131,7 +131,7 @@ const checkIfCanAddMeasurementsToDisplaySet = (
|
|||||||
measurements.forEach(measurement => {
|
measurements.forEach(measurement => {
|
||||||
const { coords } = measurement;
|
const { coords } = measurement;
|
||||||
|
|
||||||
coords.forEach(coord => {
|
coords.forEach((coord, index) => {
|
||||||
if (coord.ReferencedSOPSequence !== undefined) {
|
if (coord.ReferencedSOPSequence !== undefined) {
|
||||||
const imageIndex = SOPInstanceUIDs.findIndex(
|
const imageIndex = SOPInstanceUIDs.findIndex(
|
||||||
SOPInstanceUID =>
|
SOPInstanceUID =>
|
||||||
@@ -142,17 +142,11 @@ const checkIfCanAddMeasurementsToDisplaySet = (
|
|||||||
const imageId = imageIds[imageIndex];
|
const imageId = imageIds[imageIndex];
|
||||||
const imageMetadata = images[imageIndex].getData().metadata;
|
const imageMetadata = images[imageIndex].getData().metadata;
|
||||||
|
|
||||||
const coords = measurement.coords;
|
if (coord.GraphicType === 'TEXT') {
|
||||||
for (let i = 0; i < coords.length; i++) {
|
|
||||||
const coord = coords[i];
|
|
||||||
if (coord.GraphicType !== 'TEXT') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
imageDisplaySet.SRLabels.push({
|
imageDisplaySet.SRLabels.push({
|
||||||
ReferencedSOPInstanceUID:
|
ReferencedSOPInstanceUID:
|
||||||
coord.ReferencedSOPSequence.ReferencedSOPInstanceUID,
|
coord.ReferencedSOPSequence.ReferencedSOPInstanceUID,
|
||||||
labels: measurement.labels[i],
|
labels: measurement.labels[index],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user