fix(dicom-video): Update get direct func for dicom json to use url if present and fix config argument (#4017)

This commit is contained in:
Igor Octaviano authored and GitHub committed 2024-04-10 10:55:19 -04:00
1 parent be9bb06565
commit 4f99244d86
4 files changed
+10 -3

No files matched your search

@@ -166,7 +166,7 @@ function createDicomJSONApi(dicomJsonConfig) {
* or is already retrieved, or a promise to a URL for such use if a BulkDataURI
*/
directURL: params => {
return getDirectURL(wadoRoot, params);
return getDirectURL(dicomJsonConfig, params);
},
series: {
metadata: async ({ StudyInstanceUID, madeInClient = false, customSort } = {}) => {
@@ -10,6 +10,7 @@ import { utils } from '@ohif/core';
* @param {string} params.defaultType is the mime type of the response
* @param {string} params.singlepart is the type of the part to retrieve
* @param {string} params.fetchPart unknown?
* @param {string} params.url unknown?
* @returns an absolute URL to the resource, if the absolute URL can be retrieved as singlepart,
* or is already retrieved, or a promise to a URL for such use if a BulkDataURI
*/
@@ -21,7 +22,12 @@ const getDirectURL = (config, params) => {
defaultPath = '/pixeldata',
defaultType = 'video/mp4',
singlepart: fetchPart = 'video',
url = null,
} = params;
if (url) {
return url;
}
const value = instance[tag];
if (!value) {
return undefined;