Skip to content

Commit

Permalink
Use refSeriesUID and not study to find ref layer
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Sep 4, 2024
1 parent adb84b2 commit bc3560d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/app/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -1960,14 +1960,15 @@ export class App {
throw new Error('Cannot initialise layer with missing data, id: ' +
dataId);
}
const studyInstanceUID =
data.annotationGroup.getMetaValue('StudyInstanceUID');
const refSeriesSeq =
data.annotationGroup.getMetaValue('ReferencedSeriesSequence');
const refSeriesInstanceUID = refSeriesSeq.value[0].SeriesInstanceUID;
const viewLayers = layerGroup.searchViewLayers({
StudyInstanceUID: studyInstanceUID
SeriesInstanceUID: refSeriesInstanceUID
});
if (viewLayers.length === 0) {
console.warn(
'No loaded data that matches the measurement study UID');
'No loaded data that matches the measurement reference series UID');
return;
}
const refViewLayer = viewLayers[0];
Expand Down

0 comments on commit bc3560d

Please sign in to comment.