Mercurial > hg > orthanc-webviewer
comparison WebApplication/viewer.js @ 234:083d0cbcbac4 transcoding
improved error message
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 11 May 2020 16:02:34 +0200 |
parents | aee499712ac4 |
children | e376158e2dbb |
comparison
equal
deleted
inserted
replaced
233:e866849335fd | 234:083d0cbcbac4 |
---|---|
21 | 21 |
22 // Set the default compression | 22 // Set the default compression |
23 var compression = 'jpeg95'; | 23 var compression = 'jpeg95'; |
24 var isFirst = true; | 24 var isFirst = true; |
25 //var compression = 'deflate'; | 25 //var compression = 'deflate'; |
26 var unsupportedMessage = 'Error: The Orthanc core does not support the decoding of this image. Make sure that you have properly installed a suitable decoder plugin (e.g. the official GDCM decoder plugin).'; | |
26 | 27 |
27 | 28 |
28 // Prevent the access to IE | 29 // Prevent the access to IE |
29 if(navigator.appVersion.indexOf("MSIE ") != -1) | 30 if(navigator.appVersion.indexOf("MSIE ") != -1) |
30 { | 31 { |
381 } | 382 } |
382 | 383 |
383 result = image; | 384 result = image; |
384 }, | 385 }, |
385 error: function() { | 386 error: function() { |
386 alert('Error: This image is not supported by the Web viewer.'); | 387 alert(unsupportedMessage); |
387 return null; | 388 return null; |
388 } | 389 } |
389 }); | 390 }); |
390 | 391 |
391 var deferred = $.Deferred(); | 392 var deferred = $.Deferred(); |
428 volume.StudyDescription + '<br/>' + | 429 volume.StudyDescription + '<br/>' + |
429 volume.SeriesDescription + '<br/>'); | 430 volume.SeriesDescription + '<br/>'); |
430 } | 431 } |
431 }, | 432 }, |
432 failure: function() { | 433 failure: function() { |
433 alert('Error: This image is not supported by the Web viewer.'); | 434 alert(unsupportedMessage); |
434 } | 435 } |
435 }); | 436 }); |
436 | 437 |
437 if (instances.length == 0) | 438 if (instances.length == 0) |
438 { | 439 { |