Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit d51ce4f

Browse files
joao-f-medeirosswederik
authored andcommitted
fix(StudyMetadata): Gets the modality information from first series item (#55)
* fix(StudyMetadata): Gets the modality information from first display set item * fix(StudyMetadata): Includes condition to not change modality when received from other plugins
1 parent 33fba8e commit d51ce4f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/classes/metadata/StudyMetadata.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,17 @@ function _getDisplaySetFromSopClassModule(
635635
headers,
636636
});
637637

638-
return plugin.getDisplaySetFromSeries(series, study, dicomWebClient, headers);
638+
let displaySet = plugin.getDisplaySetFromSeries(
639+
series,
640+
study,
641+
dicomWebClient,
642+
headers
643+
);
644+
if (displaySet && !displaySet.modality) {
645+
const instance = series.getFirstInstance();
646+
displaySet.modality = instance.getRawValue('x00080060');
647+
}
648+
return displaySet;
639649
}
640650

641651
/**

0 commit comments

Comments
 (0)