view Samples/WebAssembly/SingleFrameViewer/WasmWrapper.js @ 1370:28eb7106ef44 broker

Changes to GuiAdapter to allow it to work correctly with both new and old Emscripten event selection rules that are defined by the DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR linker flag. Doc has been added to GuiAdapter.cpp, should you require more info on what has been done.
author Benjamin Golinvaux <bgo@osimis.io>
date Mon, 20 Apr 2020 13:08:43 +0200
parents c0e4eb14c912
children
line wrap: on
line source


const Stone = function() {
  this._InitializeViewport = undefined;
  this._LoadOrthanc = undefined;
  this._LoadDicomWeb = undefined;
};

Stone.prototype.Setup = function(Module) {
  this._InitializeViewport = Module.cwrap('InitializeViewport', null, [ 'string' ]);
  this._LoadOrthanc = Module.cwrap('LoadOrthanc', null, [ 'string', 'int' ]);
  this._LoadDicomWeb = Module.cwrap('LoadDicomWeb', null, [ 'string', 'string', 'string', 'string', 'int' ]);
};

Stone.prototype.InitializeViewport = function(canvasId) {
  this._InitializeViewport(canvasId);
};

Stone.prototype.LoadOrthanc = function(instance, frame) {
  this._LoadOrthanc(instance, frame);
};

Stone.prototype.LoadDicomWeb = function(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame) {
  this._LoadDicomWeb(server, studyInstanceUid, seriesInstanceUid, sopInstanceUid, frame);
};

var stone = new Stone();