Mercurial > hg > orthanc-stone
comparison Samples/WebAssembly/SingleFrameViewer/SingleFrameViewerApp.js @ 1393:27e0a00bd3e8
RtViewer SingleFrameViewer OK : wasm SDL single viewport
other viewports ongoing
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 29 Apr 2020 15:54:18 +0200 |
parents | 240531afdd2d |
children |
comparison
equal
deleted
inserted
replaced
1392:ffdb82850e98 | 1393:27e0a00bd3e8 |
---|---|
1 | 1 |
2 // This object wraps the functions exposed by the wasm module | 2 // This object wraps the functions exposed by the wasm module |
3 | 3 |
4 const WasmModuleWrapper = function() { | 4 const WasmModuleWrapper = function() { |
5 this._InitializeViewport = undefined; | 5 this._InitializeViewport = undefined; |
6 this._LoadOrthanc = undefined; | 6 this._LoadFromOrthanc = undefined; |
7 this._LoadDicomWeb = undefined; | |
8 }; | 7 }; |
9 | 8 |
10 WasmModuleWrapper.prototype.Setup = function(Module) { | 9 WasmModuleWrapper.prototype.Setup = function(Module) { |
11 this._InitializeViewport = Module.cwrap('InitializeViewport', null, [ 'string' ]); | 10 this._InitializeViewport = Module.cwrap('InitializeViewport', null, [ 'string' ]); |
12 this._LoadFromOrthanc = Module.cwrap('LoadFromOrthanc', null, [ 'string', 'int' ]); | 11 this._LoadFromOrthanc = Module.cwrap('LoadFromOrthanc', null, [ 'string', 'int' ]); |
13 this._LoadFromDicomWeb = Module.cwrap('LoadFromDicomWeb', null, [ 'string', 'string', 'string', 'string', 'int' ]); | |
14 }; | 12 }; |
15 | 13 |
16 WasmModuleWrapper.prototype.InitializeViewport = function(canvasId) { | 14 WasmModuleWrapper.prototype.InitializeViewport = function(canvasId) { |
17 this._InitializeViewport(canvasId); | 15 this._InitializeViewport(canvasId); |
18 }; | 16 }; |
19 | 17 |
20 WasmModuleWrapper.prototype.LoadFromOrthanc = function(instance, frame) { | 18 WasmModuleWrapper.prototype.LoadFromOrthanc = function(instance, frame) { |
21 this._LoadFromOrthanc(instance, frame); | 19 this._LoadFromOrthanc(instance, frame); |
22 }; | |
23 | |
24 WasmModuleWrapper.prototype.LoadFromDicomWeb = function(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame) { | |
25 this._LoadFromDicomWeb(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame); | |
26 }; | 20 }; |
27 | 21 |
28 var wasmModuleWrapper = new WasmModuleWrapper(); | 22 var wasmModuleWrapper = new WasmModuleWrapper(); |
29 | 23 |
30 $(document).ready(function() { | 24 $(document).ready(function() { |