Merge branch 'v3-stable' into customizable-TS

This commit is contained in:
Salim Kanoun authored and GitHub committed 2023-05-29 23:26:36 +02:00
commit 56633a67d9
59 files changed
+1039 -409

No files matched your search

@@ -24,6 +24,7 @@ import {
} from './retrieveStudyMetadata.js';
import StaticWadoClient from './utils/StaticWadoClient';
import getDirectURL from '../utils/getDirectURL';
import { fixBulkDataURI } from './utils/fixBulkDataURI';
const { DicomMetaDictionary, DicomDict } = dcmjs.data;
@@ -432,13 +433,23 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) {
*/
const addRetrieveBulkData = instance => {
const naturalized = naturalizeDataset(instance);
// if we konw the server doesn't use bulkDataURI, then don't
if (!dicomWebConfig.bulkDataURI?.enabled) {
return naturalized;
}
Object.keys(naturalized).forEach(key => {
const value = naturalized[key];
// The value.Value will be set with the bulkdata read value
// in which case it isn't necessary to re-read this.
if (value && value.BulkDataURI && !value.Value) {
// Provide a method to fetch bulkdata
value.retrieveBulkData = () => {
// handle the scenarios where bulkDataURI is relative path
fixBulkDataURI(value, naturalized, dicomWebConfig);
const options = {
// The bulkdata fetches work with either multipart or
// singlepart, so set multipart to false to let the server