comparison Samples/WebAssembly/RtViewer/RtViewerWasmWrapper.js @ 1384:24bcff8ea58f

RtViewer : SDL ok. Preparation for WASM builds ongoing
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 27 Apr 2020 10:01:48 +0200
parents
children
comparison
equal deleted inserted replaced
1383:ab871499ed30 1384:24bcff8ea58f
1
2 const Stone = function() {
3 this._InitializeViewport = undefined;
4 this._LoadOrthanc = undefined;
5 this._LoadDicomWeb = undefined;
6 };
7
8 Stone.prototype.Setup = function(Module) {
9 this._InitializeViewport = Module.cwrap('InitializeViewport', null, [ 'string' ]);
10 this._LoadOrthanc = Module.cwrap('LoadOrthanc', null, [ 'string', 'int' ]);
11 this._LoadDicomWeb = Module.cwrap('LoadDicomWeb', null, [ 'string', 'string', 'string', 'string', 'int' ]);
12 };
13
14 Stone.prototype.InitializeViewport = function(canvasId) {
15 this._InitializeViewport(canvasId);
16 };
17
18 Stone.prototype.LoadOrthanc = function(instance, frame) {
19 this._LoadOrthanc(instance, frame);
20 };
21
22 Stone.prototype.LoadDicomWeb = function(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame) {
23 this._LoadDicomWeb(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame);
24 };
25
26 var stone = new Stone();
27