comparison Applications/StoneWebViewer/WebApplication/app.js @ 1950:6ffd65cfd2ee deep-learning

new branch: deep-learning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 12 Aug 2022 15:48:35 +0200
parents d3ae6858e77b
children 060d61913e39
comparison
equal deleted inserted replaced
1949:d3ae6858e77b 1950:6ffd65cfd2ee
461 461
462 selectedStudies: [], 462 selectedStudies: [],
463 series: [], 463 series: [],
464 studies: [], 464 studies: [],
465 seriesIndex: {}, // Maps "SeriesInstanceUID" to "index in this.series" 465 seriesIndex: {}, // Maps "SeriesInstanceUID" to "index in this.series"
466 virtualSeriesThumbnails: {} 466 virtualSeriesThumbnails: {},
467
468 deepLearningReady: false,
469 deepLearningProgress: 0 // Floating-point number in the range [0..1]
467 } 470 }
468 }, 471 },
469 computed: { 472 computed: {
470 getSelectedStudies() { 473 getSelectedStudies() {
471 var s = ''; 474 var s = '';
1100 }) 1103 })
1101 .catch(function (error) { 1104 .catch(function (error) {
1102 alert('Cannot find the study in Orthanc'); 1105 alert('Cannot find the study in Orthanc');
1103 }); 1106 });
1104 1107
1108 },
1109
1110 ApplyDeepLearning: function()
1111 {
1112 stone.ApplyDeepLearningModel(this.GetActiveCanvas());
1105 } 1113 }
1106 }, 1114 },
1107 1115
1108 mounted: function() { 1116 mounted: function() {
1109 this.SetViewportLayout('1x1'); 1117 this.SetViewportLayout('1x1');
1356 else { 1364 else {
1357 console.log('Unknown type of dynamic action in the Stone Web viewer: ' + e.data.type); 1365 console.log('Unknown type of dynamic action in the Stone Web viewer: ' + e.data.type);
1358 } 1366 }
1359 } 1367 }
1360 }); 1368 });
1369
1370
1371 window.addEventListener('DeepLearningInitialized', function() {
1372 stone.LoadDeepLearningModel('model.message');
1373 });
1374
1375 window.addEventListener('DeepLearningReady', function() {
1376 app.deepLearningReady = true;
1377 });