comparison OrthancServer/OrthancExplorer/explorer.js @ 4804:ae643f664628

new option returnUnsupportedImage for /preview & /rendered routes
author Alain Mazy <am@osimis.io>
date Thu, 28 Oct 2021 13:05:56 +0200
parents 72a850947b11
children 70d2a97ca8cb 7053502fbf97
comparison
equal deleted inserted replaced
4803:1eca4378d761 4804:ae643f664628
1111 error: function() { 1111 error: function() {
1112 GetResource('/instances/' + pageData.uuid + '/frames', function(frames) { 1112 GetResource('/instances/' + pageData.uuid + '/frames', function(frames) {
1113 if (frames.length == 1) 1113 if (frames.length == 1)
1114 { 1114 {
1115 // Viewing a single-frame image 1115 // Viewing a single-frame image
1116 jQuery.slimbox('../instances/' + pageData.uuid + '/preview', '', { 1116 jQuery.slimbox('../instances/' + pageData.uuid + '/preview?returnUnsupportedImage', '', {
1117 overlayFadeDuration : 1, 1117 overlayFadeDuration : 1,
1118 resizeDuration : 1, 1118 resizeDuration : 1,
1119 imageFadeDuration : 1 1119 imageFadeDuration : 1
1120 }); 1120 });
1121 } 1121 }
1123 { 1123 {
1124 // Viewing a multi-frame image 1124 // Viewing a multi-frame image
1125 1125
1126 images = []; 1126 images = [];
1127 for (var i = 0; i < frames.length; i++) { 1127 for (var i = 0; i < frames.length; i++) {
1128 images.push([ '../instances/' + pageData.uuid + '/frames/' + i + '/preview' ]); 1128 images.push([ '../instances/' + pageData.uuid + '/frames/' + i + '/preview?returnUnsupportedImage' ]);
1129 } 1129 }
1130 1130
1131 jQuery.slimbox(images, 0, { 1131 jQuery.slimbox(images, 0, {
1132 overlayFadeDuration : 1, 1132 overlayFadeDuration : 1,
1133 resizeDuration : 1, 1133 resizeDuration : 1,
1153 GetResource('/series/' + pageData.uuid + '/instances', function(instances) { 1153 GetResource('/series/' + pageData.uuid + '/instances', function(instances) {
1154 Sort(instances, function(x) { return x.IndexInSeries; }, true, false); 1154 Sort(instances, function(x) { return x.IndexInSeries; }, true, false);
1155 1155
1156 images = []; 1156 images = [];
1157 for (var i = 0; i < instances.length; i++) { 1157 for (var i = 0; i < instances.length; i++) {
1158 images.push([ '../instances/' + instances[i].ID + '/preview', 1158 images.push([ '../instances/' + instances[i].ID + '/preview?returnUnsupportedImage',
1159 (i + 1).toString() + '/' + instances.length.toString() ]) 1159 (i + 1).toString() + '/' + instances.length.toString() ])
1160 } 1160 }
1161 1161
1162 jQuery.slimbox(images, 0, { 1162 jQuery.slimbox(images, 0, {
1163 overlayFadeDuration : 1, 1163 overlayFadeDuration : 1,