comparison Sources/OrthancExplorer.js @ 62:b798387b085c

added 3DHOP viewer version 4.3
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 15 Jun 2024 16:08:52 +0200
parents c322c949bd8e
children 1fd6d0f8fdc9
comparison
equal deleted inserted replaced
61:5dc3f3dcc092 62:b798387b085c
25 const STL_PLUGIN_SOP_CLASS_UID_STL = '1.2.840.10008.5.1.4.1.1.104.3'; 25 const STL_PLUGIN_SOP_CLASS_UID_STL = '1.2.840.10008.5.1.4.1.1.104.3';
26 const STL_PLUGIN_SOP_CLASS_UID_RT_STRUCT = '1.2.840.10008.5.1.4.1.1.481.3'; 26 const STL_PLUGIN_SOP_CLASS_UID_RT_STRUCT = '1.2.840.10008.5.1.4.1.1.481.3';
27 const STL_PLUGIN_SOP_CLASS_UID_RAW = '1.2.840.10008.5.1.4.1.1.66'; 27 const STL_PLUGIN_SOP_CLASS_UID_RAW = '1.2.840.10008.5.1.4.1.1.66';
28 28
29 29
30 function AddStlViewer(target, name, callback) { 30 function AddViewer(target, name, callback) {
31 var li = $('<li>', { 31 var li = $('<li>', {
32 name: name, 32 name: name,
33 }).click(callback); 33 }).click(callback);
34 34
35 li.append($('<a>', { 35 li.append($('<a>', {
57 b.click(function() { 57 b.click(function() {
58 var viewers = $('<ul>') 58 var viewers = $('<ul>')
59 .attr('data-divider-theme', 'd') 59 .attr('data-divider-theme', 'd')
60 .attr('data-role', 'listview'); 60 .attr('data-role', 'listview');
61 61
62 AddStlViewer(viewers, 'Basic viewer built using Three.js', function() { 62 AddViewer(viewers, 'Basic viewer built using Three.js', function() {
63 window.open('../stl/app/three.html?instance=' + instanceId); 63 window.open('../stl/app/three.html?instance=' + instanceId);
64 }); 64 });
65 65
66 AddStlViewer(viewers, 'Online3DViewer', function() { 66 AddViewer(viewers, 'Online3DViewer', function() {
67 window.open('../stl/app/o3dv.html?instance=' + instanceId); 67 window.open('../stl/app/o3dv.html?instance=' + instanceId);
68 }); 68 });
69 69
70 // Launch the dialog 70 // Launch the dialog
71 $('#dialog').simpledialog2({ 71 $('#dialog').simpledialog2({
508 .button(); 508 .button();
509 509
510 b.insertAfter($('#' + parent)); 510 b.insertAfter($('#' + parent));
511 511
512 b.click(function() { 512 b.click(function() {
513 window.open('../stl/nexus/threejs.html?model=../../instances/' + instanceId + '/nexus'); 513 if (${IS_3DHOP_ENABLED}) {
514 var viewers = $('<ul>')
515 .attr('data-divider-theme', 'd')
516 .attr('data-role', 'listview');
517
518 AddViewer(viewers, 'Basic Nexus viewer', function() {
519 window.open('../stl/nexus/threejs.html?model=../../instances/' + instanceId + '/nexus');
520 });
521
522 AddViewer(viewers, '3DHOP', function() {
523 window.open('../stl/3dhop/3DHOP_all_tools.html?instance=' + instanceId);
524 });
525
526 // Launch the dialog
527 $('#dialog').simpledialog2({
528 mode: 'blank',
529 animate: false,
530 headerText: 'Choose Nexus viewer',
531 headerClose: true,
532 forceInput: false,
533 width: '100%',
534 blankContent: viewers
535 });
536 } else {
537 window.open('../stl/nexus/threejs.html?model=../../instances/' + instanceId + '/nexus');
538 }
514 }); 539 });
515 } 540 }
516 } 541 }
517 }); 542 });
518 } 543 }