comparison Sources/OrthancExplorer.js @ 0:39585ba26f20

initial commit
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 15 Jun 2023 09:48:46 +0200
parents
children 8c1fe0ca24f5
comparison
equal deleted inserted replaced
-1:000000000000 0:39585ba26f20
1 /**
2 * SPDX-FileCopyrightText: 2023 Sebastien Jodogne, UCLouvain, Belgium
3 * SPDX-License-Identifier: GPL-3.0-or-later
4 */
5
6 /**
7 * OHIF plugin for Orthanc
8 * Copyright (C) 2023 Sebastien Jodogne, UCLouvain, Belgium
9 *
10 * This program is free software: you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation, either version 3 of the
13 * License, or (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 **/
23
24
25 $('#study').live('pagebeforeshow', function() {
26 var studyId = $.mobile.pageData.uuid;
27
28 $.ajax({
29 url: '../studies/' + studyId,
30 dataType: 'json',
31 success: function(s) {
32 var studyInstanceUid = s.MainDicomTags.StudyInstanceUID;
33
34 $('#ohif-button').remove();
35
36 var b = $('<a>')
37 .attr('id', 'ohif-button')
38 .attr('data-role', 'button')
39 .attr('href', '#')
40 .attr('data-icon', 'search')
41 .attr('data-theme', 'e')
42 .text('Open OHIF viewer')
43 .button();
44
45 b.insertAfter($('#study-info'));
46 b.click(function() {
47 window.open('../ohif/viewer?StudyInstanceUIDs=' + studyInstanceUid);
48 });
49 }
50 });
51 });