OHIF-135: providing all data required by cornerstoneWADOImageLoader to wadors instances
This commit is contained in:
1 parent
3d99821117
commit
9ad0b670b3
7 files changed
+194
-106
No files matched your search
@@ -0,0 +1,17 @@
|
||||
export function getWADORSImageUrl(instance, frame) {
|
||||
let wadorsuri = instance.wadorsuri;
|
||||
|
||||
if (!wadorsuri) {
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to sum 1 because WADO-RS frame number is 1-based
|
||||
frame = (frame || 0) + 1;
|
||||
|
||||
// Replaces /frame/1 by /frame/{frame}
|
||||
// TODO: Maybe should be better to export the WADOProxy to be able to use it on client
|
||||
// Example: WADOProxy.convertURL(baseWadoRsUri + '/frame/' + frame)
|
||||
wadorsuri = wadorsuri.replace(/(%2Fframes%2F)(\d+)/, `$1${frame}`);
|
||||
|
||||
return Meteor.absoluteUrl(wadorsuri);
|
||||
}
|
||||
Reference in new issue
Block a user