comparison Samples/WebAssembly/SingleFrameViewer/WasmWrapper.js @ 1354:c0e4eb14c912 broker

SingleFrameViewer WASM working OK
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 15 Apr 2020 12:59:15 +0200
parents
children
comparison
equal deleted inserted replaced
1353:af65bce18951 1354:c0e4eb14c912
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