Mercurial > hg > orthanc-stone
annotate Applications/Samples/WebAssembly/RtViewer/RtViewerWasmWrapper.js @ 2125:2e050ec85379 deep-learning
integration mainline->deep-learning
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 30 May 2024 17:06:53 +0200 |
parents | 16c01cc201e7 |
children |
rev | line source |
---|---|
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
1 /** |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
2 * Stone of Orthanc |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
2124
16c01cc201e7
updated copyright, as Osimis is not active on Orthanc anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2114
diff
changeset
|
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
2114
c23eef785569
update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2077
diff
changeset
|
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
7 * |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
8 * This program is free software: you can redistribute it and/or |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
9 * modify it under the terms of the GNU Affero General Public License |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
10 * as published by the Free Software Foundation, either version 3 of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
11 * the License, or (at your option) any later version. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
12 * |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, but |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
14 * WITHOUT ANY WARRANTY; without even the implied warranty of |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
16 * Affero General Public License for more details. |
1596
4fb8fdf03314
removed annoying whitespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1589
diff
changeset
|
17 * |
1589
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
18 * You should have received a copy of the GNU Affero General Public License |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
20 **/ |
8c5f9864545f
adding missing headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1538
diff
changeset
|
21 |
1384
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
22 |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
23 const Stone = function() { |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
24 this._InitializeViewport = undefined; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
25 this._LoadOrthanc = undefined; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
26 this._LoadDicomWeb = undefined; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
27 }; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
28 |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
29 Stone.prototype.Setup = function(Module) { |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
30 this._InitializeViewport = Module.cwrap('InitializeViewport', null, [ 'string' ]); |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
31 this._LoadOrthanc = Module.cwrap('LoadOrthanc', null, [ 'string', 'int' ]); |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
32 this._LoadDicomWeb = Module.cwrap('LoadDicomWeb', null, [ 'string', 'string', 'string', 'string', 'int' ]); |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
33 }; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
34 |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
35 Stone.prototype.InitializeViewport = function(canvasId) { |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
36 this._InitializeViewport(canvasId); |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
37 }; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
38 |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
39 Stone.prototype.LoadOrthanc = function(instance, frame) { |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
40 this._LoadOrthanc(instance, frame); |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
41 }; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
42 |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
43 Stone.prototype.LoadDicomWeb = function(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame) { |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
44 this._LoadDicomWeb(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame); |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
45 }; |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
46 |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
47 var stone = new Stone(); |
24bcff8ea58f
RtViewer : SDL ok. Preparation for WASM builds ongoing
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff
changeset
|
48 |