# HG changeset patch # User Sebastien Jodogne # Date 1689676790 -7200 # Node ID 1cc024bb662a1d179d340dc53d0e78970e0bc8b3 # Parent 5ee4448a8ff8fab0029c14eed0ec520473c44f07 added generate model button in Orthanc Explorer diff -r 5ee4448a8ff8 -r 1cc024bb662a Sources/OrthancExplorer.js --- a/Sources/OrthancExplorer.js Tue Jul 18 11:30:06 2023 +0200 +++ b/Sources/OrthancExplorer.js Tue Jul 18 12:39:50 2023 +0200 @@ -22,7 +22,8 @@ **/ -const SOP_CLASS_UID_STL = '1.2.840.10008.5.1.4.1.1.104.3'; +const STL_PLUGIN_SOP_CLASS_UID_STL = '1.2.840.10008.5.1.4.1.1.104.3'; +const STL_PLUGIN_SOP_CLASS_UID_RT_STRUCT = '1.2.840.10008.5.1.4.1.1.481.3'; function AddOpenStlViewerButton(instanceId, id, parent) { var b = $('') @@ -43,10 +44,114 @@ } +function AddGenerateFromRtStructButton(instanceId, id, parent) { + if (${HAS_CREATE_DICOM_STL}) { + + var b = $('') + .attr('id', id) + .attr('data-role', 'button') + .attr('href', '#') + .attr('data-icon', 'search') + .attr('data-theme', 'e') + .text('Generate 3D model') + .button(); + + b.insertAfter($('#' + parent)); + b.click(function() { + + $.ajax({ + url: '../stl/rt-struct/' + instanceId, + dataType: 'json', + success: function(s) { + + var options = $('