# HG changeset patch # User Sebastien Jodogne # Date 1689692723 -7200 # Node ID 8b265e711351e0d34de6764b33bb1e29f4b46a20 # Parent d1267c6c33e1d8501485a269d30274e9e65f8172 added button "Attach NIfTI 3D model" in Orthanc Explorer diff -r d1267c6c33e1 -r 8b265e711351 Sources/OrthancExplorer.js --- a/Sources/OrthancExplorer.js Tue Jul 18 15:58:21 2023 +0200 +++ b/Sources/OrthancExplorer.js Tue Jul 18 17:05:23 2023 +0200 @@ -153,8 +153,6 @@ $('#stl-viewer-series').remove(); $('#stl-generate-rtstruct-series').remove(); - // Test whether this is a whole-slide image by check the SOP Class - // UID of one instance of the series GetResource('/series/' + seriesId, function(series) { if (series['Instances'].length == 1) { var instanceId = series['Instances'][0]; @@ -184,8 +182,6 @@ $('#stl-viewer-instance').remove(); $('#stl-generate-rtstruct-instance').remove(); - // Test whether this is a whole-slide image by check the SOP Class - // UID of one instance of the series $.ajax({ url: '/instances/' + instanceId + '/metadata/SopClassUid', success: function(sopClassUid) { @@ -201,3 +197,114 @@ } }); }); + + +$('#study').live('pagebeforeshow', function() { + if (${HAS_CREATE_DICOM_STL}) { + var studyId = $.mobile.pageData.uuid; + + $('#stl-attach-nifti-study').remove(); + + var b = $('') + .attr('id', 'stl-attach-nifti-study') + .attr('data-role', 'button') + .attr('href', '#') + .attr('data-icon', 'search') + .attr('data-theme', 'e') + .text('Attach NIfTI 3D model') + .button(); + + b.insertAfter($('#study-info')); + b.click(function() { + + var options = $('