feat(dicomJSON): Add Loading Other Display Sets and JSON Metadata Generation script (#3777)

This commit is contained in:
Alireza authored and GitHub committed 2023-11-10 16:51:23 -05:00
1 parent 5b513fd30e
commit 43b1c17209
9 files changed
+390 -3

No files matched your search

@@ -176,6 +176,7 @@ class DicomLoaderService {
authorizationHeaders,
wadoRoot,
wadoUri,
instance,
} = dataset;
// Retrieve wadors or just try to fetch wadouri
if (!someInvalidStrings(wadoRoot)) {
@@ -188,6 +189,13 @@ class DicomLoaderService {
);
} else if (!someInvalidStrings(wadoUri)) {
return fetchIt(wadoUri, { headers: authorizationHeaders });
} else if (!someInvalidStrings(instance?.url)) {
// make sure the url is absolute, remove the scope
// from it if it is not absolute. For instance it might be dicomweb:http://....
// and we need to remove the dicomweb: part
const url = instance.url;
const absoluteUrl = url.startsWith('http') ? url : url.substring(url.indexOf(':') + 1);
return fetchIt(absoluteUrl, { headers: authorizationHeaders });
}
}