hellfire 0.19.4 → 0.19.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -945,18 +945,18 @@ var TOGGLE_OVERLAY_TEXT = 'TOGGLE_OVERLAY_TEXT';
945
945
  var ACTIVE_DICOM_FUNCTION = 'ACTIVE_DICOM_FUNCTION';
946
946
  var SET_CINE_SPEED = 'SET_CINE_SPEED';
947
947
  var SET_CINE_DIREACTION = 'SET_CINE_DIREACTION';
948
- var TOGGLE_VIEW_MODE = 'TOGGLE_VIEW_MODE';
949
948
  var RESET_TOOLS_STATE = 'RESET_TOOLS_STATE';
950
949
  var SET_VR_MODE = 'SET_VR_MODE';
951
950
  var TOGGLE_MEASURE = 'TOGGLE_MEASURE';
952
951
  var SET_CENTESIS_PATH = 'SET_CENTESIS_PATH';
953
952
  var SET_IO_ON = 'SET_IO_ON';
954
- var SET_IO_OFF = 'SET_IO_OFF'; // ---------- Reducers ----------
953
+ var SET_IO_OFF = 'SET_IO_OFF';
954
+ var SET_VIEW_MODE = 'SET_VIEW_MODE'; // ---------- Reducers ----------
955
955
 
956
956
  var initialState$1 = {
957
957
  activeTool: 'Wwwc',
958
958
  originActiveTool: 'Wwwc',
959
- // seriesMode序列模式 imageMode图像模式
959
+ // seriesMode序列模式 imageMode图像模式 allImageMode全部模式
960
960
  mode: 'seriesMode',
961
961
  showOverlayText: true,
962
962
  cineFps: 3,
@@ -1050,11 +1050,10 @@ var _default$3 = function _default() {
1050
1050
  });
1051
1051
  }
1052
1052
 
1053
- case TOGGLE_VIEW_MODE:
1053
+ case SET_VIEW_MODE:
1054
1054
  {
1055
- var mode = state.mode === 'seriesMode' ? 'imageMode' : 'seriesMode';
1056
1055
  return _objectSpread$1(_objectSpread$1({}, state), {}, {
1057
- mode: mode
1056
+ mode: action.payload
1058
1057
  });
1059
1058
  }
1060
1059
 
@@ -1169,11 +1168,12 @@ function setCineDireaction(payload) {
1169
1168
  type: SET_CINE_DIREACTION,
1170
1169
  payload: payload
1171
1170
  };
1172
- } // 切换图像查看模式
1171
+ } // 设置查看模式
1173
1172
 
1174
- function toggleViewMode() {
1173
+ function setViewMode(payload) {
1175
1174
  return {
1176
- type: TOGGLE_VIEW_MODE
1175
+ type: SET_VIEW_MODE,
1176
+ payload: payload
1177
1177
  };
1178
1178
  } // 重置工具栏状态(切换study时调用)
1179
1179
 
@@ -1225,20 +1225,20 @@ function closeIO() {
1225
1225
  reactHotLoader.register(ACTIVE_DICOM_FUNCTION, "ACTIVE_DICOM_FUNCTION", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1226
1226
  reactHotLoader.register(SET_CINE_SPEED, "SET_CINE_SPEED", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1227
1227
  reactHotLoader.register(SET_CINE_DIREACTION, "SET_CINE_DIREACTION", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1228
- reactHotLoader.register(TOGGLE_VIEW_MODE, "TOGGLE_VIEW_MODE", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1229
1228
  reactHotLoader.register(RESET_TOOLS_STATE, "RESET_TOOLS_STATE", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1230
1229
  reactHotLoader.register(SET_VR_MODE, "SET_VR_MODE", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1231
1230
  reactHotLoader.register(TOGGLE_MEASURE, "TOGGLE_MEASURE", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1232
1231
  reactHotLoader.register(SET_CENTESIS_PATH, "SET_CENTESIS_PATH", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1233
1232
  reactHotLoader.register(SET_IO_ON, "SET_IO_ON", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1234
1233
  reactHotLoader.register(SET_IO_OFF, "SET_IO_OFF", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1234
+ reactHotLoader.register(SET_VIEW_MODE, "SET_VIEW_MODE", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1235
1235
  reactHotLoader.register(initialState$1, "initialState", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1236
1236
  reactHotLoader.register(setActiveTool, "setActiveTool", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1237
1237
  reactHotLoader.register(toggleOverlayText, "toggleOverlayText", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1238
1238
  reactHotLoader.register(activeDicomFunction, "activeDicomFunction", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1239
1239
  reactHotLoader.register(setCineFps, "setCineFps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1240
1240
  reactHotLoader.register(setCineDireaction, "setCineDireaction", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1241
- reactHotLoader.register(toggleViewMode, "toggleViewMode", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1241
+ reactHotLoader.register(setViewMode, "setViewMode", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1242
1242
  reactHotLoader.register(resetToolsState, "resetToolsState", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1243
1243
  reactHotLoader.register(setVRMode, "setVRMode", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
1244
1244
  reactHotLoader.register(toggleMeasure, "toggleMeasure", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/redux/tools/action.js");
@@ -10277,318 +10277,913 @@ var getOrientationMarkerPositions = function getOrientationMarkerPositions(canva
10277
10277
  leaveModule && leaveModule(module);
10278
10278
  })();
10279
10279
 
10280
- (function () {
10281
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
10282
- enterModule && enterModule(module);
10283
- })();
10284
-
10285
- function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }
10286
-
10287
- function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
10280
+ var runtime_1 = createCommonjsModule(function (module) {
10281
+ /**
10282
+ * Copyright (c) 2014-present, Facebook, Inc.
10283
+ *
10284
+ * This source code is licensed under the MIT license found in the
10285
+ * LICENSE file in the root directory of this source tree.
10286
+ */
10288
10287
 
10289
- var __signature__$E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
10290
- return a;
10291
- };
10292
- var BaseTool$5 = cornerstoneTools.importInternal('base/BaseTool');
10293
- var getPixelSpacing$5 = cornerstoneTools.importInternal('util/getPixelSpacing');
10294
- var devicePixelRatio$1 = getDevicePixelRatio();
10288
+ var runtime = (function (exports) {
10295
10289
 
10296
- var RulerOverlayTool = /*#__PURE__*/function (_BaseTool) {
10297
- inherits(RulerOverlayTool, _BaseTool);
10290
+ var Op = Object.prototype;
10291
+ var hasOwn = Op.hasOwnProperty;
10292
+ var undefined$1; // More compressible than void 0.
10293
+ var $Symbol = typeof Symbol === "function" ? Symbol : {};
10294
+ var iteratorSymbol = $Symbol.iterator || "@@iterator";
10295
+ var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
10296
+ var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
10298
10297
 
10299
- var _super = _createSuper$c(RulerOverlayTool);
10298
+ function define(obj, key, value) {
10299
+ Object.defineProperty(obj, key, {
10300
+ value: value,
10301
+ enumerable: true,
10302
+ configurable: true,
10303
+ writable: true
10304
+ });
10305
+ return obj[key];
10306
+ }
10307
+ try {
10308
+ // IE 8 has a broken Object.defineProperty that only works on DOM objects.
10309
+ define({}, "");
10310
+ } catch (err) {
10311
+ define = function(obj, key, value) {
10312
+ return obj[key] = value;
10313
+ };
10314
+ }
10300
10315
 
10301
- function RulerOverlayTool() {
10302
- var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
10316
+ function wrap(innerFn, outerFn, self, tryLocsList) {
10317
+ // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
10318
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
10319
+ var generator = Object.create(protoGenerator.prototype);
10320
+ var context = new Context(tryLocsList || []);
10303
10321
 
10304
- classCallCheck(this, RulerOverlayTool);
10322
+ // The ._invoke method unifies the implementations of the .next,
10323
+ // .throw, and .return methods.
10324
+ generator._invoke = makeInvokeMethod(innerFn, self, context);
10305
10325
 
10306
- var defaultProps = {
10307
- name: 'RulerOverlay',
10308
- mixins: ['enabledOrDisabledBinaryTool']
10309
- };
10310
- return _super.call(this, props, defaultProps);
10326
+ return generator;
10311
10327
  }
10328
+ exports.wrap = wrap;
10312
10329
 
10313
- createClass(RulerOverlayTool, [{
10314
- key: "enabledCallback",
10315
- value: function enabledCallback(element) {
10316
- this.forceImageUpdate(element);
10317
- }
10318
- }, {
10319
- key: "disabledCallback",
10320
- value: function disabledCallback(element) {
10321
- this.forceImageUpdate(element);
10322
- }
10323
- }, {
10324
- key: "forceImageUpdate",
10325
- value: function forceImageUpdate(element) {
10326
- var enabledElement = cornerstone.getEnabledElement(element);
10327
-
10328
- if (enabledElement.image) {
10329
- cornerstone.updateImage(element);
10330
- }
10330
+ // Try/catch helper to minimize deoptimizations. Returns a completion
10331
+ // record like context.tryEntries[i].completion. This interface could
10332
+ // have been (and was previously) designed to take a closure to be
10333
+ // invoked without arguments, but in all the cases we care about we
10334
+ // already have an existing method we want to call, so there's no need
10335
+ // to create a new function object. We can even get away with assuming
10336
+ // the method takes exactly one argument, since that happens to be true
10337
+ // in every case, so we don't have to touch the arguments object. The
10338
+ // only additional allocation required is the completion record, which
10339
+ // has a stable shape and so hopefully should be cheap to allocate.
10340
+ function tryCatch(fn, obj, arg) {
10341
+ try {
10342
+ return { type: "normal", arg: fn.call(obj, arg) };
10343
+ } catch (err) {
10344
+ return { type: "throw", arg: err };
10331
10345
  }
10332
- }, {
10333
- key: "drawRuler",
10334
- value: function drawRuler(canvas, rowHeightInCanvas, rulerSpace) {
10335
- var context = canvas.getContext('2d');
10336
- var canvasHeight = canvas.height;
10337
- var canvasWidth = canvas.width;
10338
- context.setTransform(1, 0, 0, 1, 0, 0);
10339
- context.beginPath();
10340
- context.strokeStyle = 'white';
10341
- context.fillStyle = 'white';
10342
- context.lineWidth = 2 * devicePixelRatio$1;
10343
- context.font = 12 * devicePixelRatio$1 + 'px Arial';
10344
- var marginX = 40 * devicePixelRatio$1;
10345
- var tickMajor = 10 * devicePixelRatio$1;
10346
- var tickMinor = 7 * devicePixelRatio$1;
10347
- var tickPatch = 5 * devicePixelRatio$1;
10348
- var anchor = {
10349
- x: canvasWidth - marginX,
10350
- y: canvasHeight / 2
10351
- };
10352
- var rulerLength;
10353
- var text;
10354
-
10355
- if (rulerSpace / rowHeightInCanvas < 0.5) {
10356
- rulerLength = canvasHeight * rulerSpace / rowHeightInCanvas;
10357
- text = rulerSpace + ' cm';
10358
- } else {
10359
- rulerLength = canvasHeight * 0.5;
10360
- text = (rowHeightInCanvas * 5).toFixed(2) + ' mm';
10361
- }
10346
+ }
10362
10347
 
10363
- context.moveTo(anchor.x, anchor.y - rulerLength * 0.5 - devicePixelRatio$1);
10364
- context.lineTo(anchor.x, anchor.y + rulerLength * 0.5 + devicePixelRatio$1);
10365
- var point;
10348
+ var GenStateSuspendedStart = "suspendedStart";
10349
+ var GenStateSuspendedYield = "suspendedYield";
10350
+ var GenStateExecuting = "executing";
10351
+ var GenStateCompleted = "completed";
10366
10352
 
10367
- if (rulerLength / rulerSpace > 4 * devicePixelRatio$1) {
10368
- point = rulerSpace > 10 ? 10 + 1 : rulerSpace + 1;
10369
- } else if (rulerLength / rulerSpace > 1 * devicePixelRatio$1 && rulerSpace % 2 === 0) {
10370
- point = 3;
10371
- } else {
10372
- point = 2;
10373
- }
10353
+ // Returning this object from the innerFn has the same effect as
10354
+ // breaking out of the dispatch switch statement.
10355
+ var ContinueSentinel = {};
10374
10356
 
10375
- lodash$1.range(point).map(function (i) {
10376
- var tick = (i - (point - 1) / 2) / (point - 1);
10377
- var tickLength;
10357
+ // Dummy constructor functions that we use as the .constructor and
10358
+ // .constructor.prototype properties for functions that return Generator
10359
+ // objects. For full spec compliance, you may wish to configure your
10360
+ // minifier not to mangle the names of these two functions.
10361
+ function Generator() {}
10362
+ function GeneratorFunction() {}
10363
+ function GeneratorFunctionPrototype() {}
10378
10364
 
10379
- switch (tick) {
10380
- case 0:
10381
- {
10382
- tickLength = tickMinor;
10383
- }
10365
+ // This is a polyfill for %IteratorPrototype% for environments that
10366
+ // don't natively support it.
10367
+ var IteratorPrototype = {};
10368
+ IteratorPrototype[iteratorSymbol] = function () {
10369
+ return this;
10370
+ };
10384
10371
 
10385
- case -0.5:
10386
- case 0.5:
10387
- {
10388
- tickLength = tickMajor;
10389
- }
10372
+ var getProto = Object.getPrototypeOf;
10373
+ var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
10374
+ if (NativeIteratorPrototype &&
10375
+ NativeIteratorPrototype !== Op &&
10376
+ hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
10377
+ // This environment has a native %IteratorPrototype%; use it instead
10378
+ // of the polyfill.
10379
+ IteratorPrototype = NativeIteratorPrototype;
10380
+ }
10390
10381
 
10391
- default:
10392
- {
10393
- tickLength = tickPatch;
10394
- }
10395
- }
10382
+ var Gp = GeneratorFunctionPrototype.prototype =
10383
+ Generator.prototype = Object.create(IteratorPrototype);
10384
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
10385
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
10386
+ GeneratorFunction.displayName = define(
10387
+ GeneratorFunctionPrototype,
10388
+ toStringTagSymbol,
10389
+ "GeneratorFunction"
10390
+ );
10396
10391
 
10397
- var y = anchor.y + rulerLength * tick;
10398
- context.moveTo(anchor.x, y);
10399
- context.lineTo(anchor.x - tickLength, y);
10392
+ // Helper for defining the .next, .throw, and .return methods of the
10393
+ // Iterator interface in terms of a single ._invoke method.
10394
+ function defineIteratorMethods(prototype) {
10395
+ ["next", "throw", "return"].forEach(function(method) {
10396
+ define(prototype, method, function(arg) {
10397
+ return this._invoke(method, arg);
10400
10398
  });
10399
+ });
10400
+ }
10401
10401
 
10402
- context.fillText(text, canvasWidth - marginX - 16 * devicePixelRatio$1, canvasHeight / 2 - rulerLength / 2 - 6 * devicePixelRatio$1);
10403
- context.stroke();
10402
+ exports.isGeneratorFunction = function(genFun) {
10403
+ var ctor = typeof genFun === "function" && genFun.constructor;
10404
+ return ctor
10405
+ ? ctor === GeneratorFunction ||
10406
+ // For the native GeneratorFunction constructor, the best we can
10407
+ // do is to check its .name property.
10408
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
10409
+ : false;
10410
+ };
10411
+
10412
+ exports.mark = function(genFun) {
10413
+ if (Object.setPrototypeOf) {
10414
+ Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
10415
+ } else {
10416
+ genFun.__proto__ = GeneratorFunctionPrototype;
10417
+ define(genFun, toStringTagSymbol, "GeneratorFunction");
10404
10418
  }
10405
- }, {
10406
- key: "renderToolData",
10407
- value: function renderToolData(evt) {
10408
- var eventData = evt.detail;
10409
- var canvas = eventData.canvasContext.canvas;
10410
- var image = eventData.image,
10411
- viewport = eventData.viewport;
10412
- var dicom = cornerstone.metaData.get('dicomInfo', image.imageId);
10413
- var canvasHeight = canvas.height;
10414
- var scale = viewport.scale;
10419
+ genFun.prototype = Object.create(Gp);
10420
+ return genFun;
10421
+ };
10415
10422
 
10416
- var _getPixelSpacing = getPixelSpacing$5(image),
10417
- rowPixelSpacing = _getPixelSpacing.rowPixelSpacing,
10418
- colPixelSpacing = _getPixelSpacing.colPixelSpacing;
10423
+ // Within the body of any async function, `await x` is transformed to
10424
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
10425
+ // `hasOwn.call(value, "__await")` to determine if the yielded value is
10426
+ // meant to be awaited.
10427
+ exports.awrap = function(arg) {
10428
+ return { __await: arg };
10429
+ };
10419
10430
 
10420
- var rows = dicom.Rows.value[0];
10421
- var cols = dicom.Columns.value[0];
10422
- var rowHeight = rows * rowPixelSpacing / 10; // cm
10431
+ function AsyncIterator(generator, PromiseImpl) {
10432
+ function invoke(method, arg, resolve, reject) {
10433
+ var record = tryCatch(generator[method], generator, arg);
10434
+ if (record.type === "throw") {
10435
+ reject(record.arg);
10436
+ } else {
10437
+ var result = record.arg;
10438
+ var value = result.value;
10439
+ if (value &&
10440
+ typeof value === "object" &&
10441
+ hasOwn.call(value, "__await")) {
10442
+ return PromiseImpl.resolve(value.__await).then(function(value) {
10443
+ invoke("next", value, resolve, reject);
10444
+ }, function(err) {
10445
+ invoke("throw", err, resolve, reject);
10446
+ });
10447
+ }
10423
10448
 
10424
- if (lodash$1.isNaN(rowHeight)) {
10425
- return;
10449
+ return PromiseImpl.resolve(value).then(function(unwrapped) {
10450
+ // When a yielded Promise is resolved, its final value becomes
10451
+ // the .value of the Promise<{value,done}> result for the
10452
+ // current iteration.
10453
+ result.value = unwrapped;
10454
+ resolve(result);
10455
+ }, function(error) {
10456
+ // If a rejected Promise was yielded, throw the rejection back
10457
+ // into the async generator function so it can be handled there.
10458
+ return invoke("throw", error, resolve, reject);
10459
+ });
10426
10460
  }
10461
+ }
10427
10462
 
10428
- var rowHeightInCanvas;
10463
+ var previousPromise;
10429
10464
 
10430
- if (rows >= cols) {
10431
- rowHeightInCanvas = rowHeight / (rows * scale / canvasHeight);
10432
- } else {
10433
- rowHeightInCanvas = rowHeight / (rows * (rowPixelSpacing / colPixelSpacing) * scale / canvasHeight);
10465
+ function enqueue(method, arg) {
10466
+ function callInvokeWithMethodAndArg() {
10467
+ return new PromiseImpl(function(resolve, reject) {
10468
+ invoke(method, arg, resolve, reject);
10469
+ });
10434
10470
  }
10435
10471
 
10436
- for (var _i = 0, _arr = [100, 50, 20, 10, 5, 1]; _i < _arr.length; _i++) {
10437
- var rulerLength = _arr[_i];
10438
-
10439
- if (rowHeightInCanvas / 2 / rulerLength > 1 || rulerLength === 1) {
10440
- this.drawRuler(canvas, rowHeightInCanvas, rulerLength);
10441
- return;
10442
- }
10443
- }
10444
- }
10445
- }, {
10446
- key: "__reactstandin__regenerateByEval",
10447
- // @ts-ignore
10448
- value: function __reactstandin__regenerateByEval(key, code) {
10449
- // @ts-ignore
10450
- this[key] = eval(code);
10472
+ return previousPromise =
10473
+ // If enqueue has been called before, then we want to wait until
10474
+ // all previous Promises have been resolved before calling invoke,
10475
+ // so that results are always delivered in the correct order. If
10476
+ // enqueue has not been called before, then it is important to
10477
+ // call invoke immediately, without waiting on a callback to fire,
10478
+ // so that the async generator function has the opportunity to do
10479
+ // any necessary setup in a predictable way. This predictability
10480
+ // is why the Promise constructor synchronously invokes its
10481
+ // executor callback, and why async functions synchronously
10482
+ // execute code before the first await. Since we implement simple
10483
+ // async functions in terms of async generators, it is especially
10484
+ // important to get this right, even though it requires care.
10485
+ previousPromise ? previousPromise.then(
10486
+ callInvokeWithMethodAndArg,
10487
+ // Avoid propagating failures to Promises returned by later
10488
+ // invocations of the iterator.
10489
+ callInvokeWithMethodAndArg
10490
+ ) : callInvokeWithMethodAndArg();
10451
10491
  }
10452
- }]);
10453
-
10454
- return RulerOverlayTool;
10455
- }(BaseTool$5);
10456
-
10457
- (function () {
10458
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
10459
10492
 
10460
- if (!reactHotLoader) {
10461
- return;
10493
+ // Define the unified helper method that is used to implement .next,
10494
+ // .throw, and .return (see defineIteratorMethods).
10495
+ this._invoke = enqueue;
10462
10496
  }
10463
10497
 
10464
- reactHotLoader.register(BaseTool$5, "BaseTool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
10465
- reactHotLoader.register(getPixelSpacing$5, "getPixelSpacing", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
10466
- reactHotLoader.register(devicePixelRatio$1, "devicePixelRatio", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
10467
- reactHotLoader.register(RulerOverlayTool, "RulerOverlayTool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
10468
- })();
10469
-
10470
- (function () {
10471
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
10472
- leaveModule && leaveModule(module);
10473
- })();
10474
-
10475
- (function () {
10476
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
10477
- enterModule && enterModule(module);
10478
- })();
10479
-
10480
- function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
10481
-
10482
- function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
10483
-
10484
- var __signature__$F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
10485
- return a;
10486
- };
10487
- var taskPool = [];
10488
- var numRequest = 0;
10489
- var maxRequest = 4; // 最大并发数 可配置
10490
-
10491
- var retry = 3; // 重试次数 可配置
10498
+ defineIteratorMethods(AsyncIterator.prototype);
10499
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
10500
+ return this;
10501
+ };
10502
+ exports.AsyncIterator = AsyncIterator;
10492
10503
 
10493
- var taskTimer;
10494
- var executeCallback;
10495
- var cachedTask = {};
10496
- var errorCache = {}; // 出错的task集合
10504
+ // Note that simple async functions are implemented on top of
10505
+ // AsyncIterator objects; they just return a Promise for the value of
10506
+ // the final result produced by the iterator.
10507
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
10508
+ if (PromiseImpl === void 0) PromiseImpl = Promise;
10497
10509
 
10498
- var currentTopPriority = 1; // 当前最高的优先级(除了及时触发的)
10510
+ var iter = new AsyncIterator(
10511
+ wrap(innerFn, outerFn, self, tryLocsList),
10512
+ PromiseImpl
10513
+ );
10499
10514
 
10500
- function initConfig(config) {
10501
- console.log('Init Config');
10502
- maxRequest = config.maxRequest || maxRequest;
10503
- retry = config.retry || retry;
10504
- executeCallback = config.executeCallback || null;
10505
- }
10515
+ return exports.isGeneratorFunction(outerFn)
10516
+ ? iter // If outerFn is a generator, return the full iterator.
10517
+ : iter.next().then(function(result) {
10518
+ return result.done ? result.value : iter.next();
10519
+ });
10520
+ };
10506
10521
 
10507
- function clear() {
10508
- console.log('重置所有状态');
10509
- stopTaskTimer();
10510
- taskPool = [];
10511
- numRequest = 0;
10512
- maxRequest = 4;
10513
- retry = 3;
10514
- cachedTask = {};
10515
- errorCache = {};
10516
- executeCallback = null;
10517
- } // 预加载池的添加
10522
+ function makeInvokeMethod(innerFn, self, context) {
10523
+ var state = GenStateSuspendedStart;
10518
10524
 
10525
+ return function invoke(method, arg) {
10526
+ if (state === GenStateExecuting) {
10527
+ throw new Error("Generator is already running");
10528
+ }
10519
10529
 
10520
- function addTaskIntoPool(task) {
10521
- return new Promise(function (resolve, reject) {
10522
- var cache = cachedTask[task.key];
10530
+ if (state === GenStateCompleted) {
10531
+ if (method === "throw") {
10532
+ throw arg;
10533
+ }
10523
10534
 
10524
- var subscribe = function subscribe(executeRes) {
10525
- if (executeRes.success) {
10526
- resolve(executeRes.res);
10527
- } else {
10528
- reject(executeRes.err);
10535
+ // Be forgiving, per 25.3.3.3.3 of the spec:
10536
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
10537
+ return doneResult();
10529
10538
  }
10530
- };
10531
10539
 
10532
- var priority = task.priority || task.priority === 0 || 1;
10540
+ context.method = method;
10541
+ context.arg = arg;
10533
10542
 
10534
- if (cache && cache.executed) {
10535
- delete cachedTask[task.key];
10536
- cache = null;
10537
- }
10543
+ while (true) {
10544
+ var delegate = context.delegate;
10545
+ if (delegate) {
10546
+ var delegateResult = maybeInvokeDelegate(delegate, context);
10547
+ if (delegateResult) {
10548
+ if (delegateResult === ContinueSentinel) continue;
10549
+ return delegateResult;
10550
+ }
10551
+ }
10538
10552
 
10539
- if (cache) {
10540
- cache.priority = priority;
10541
- var callbacks = cache.callbacks || [];
10542
- callbacks.push(subscribe);
10543
- } else {
10544
- /**
10545
- * 1.首次加载
10546
- * 2.出错过的task重新被触发load
10547
- */
10548
- var errorTask = errorCache[task.key];
10553
+ if (context.method === "next") {
10554
+ // Setting context._sent for legacy support of Babel's
10555
+ // function.sent implementation.
10556
+ context.sent = context._sent = context.arg;
10549
10557
 
10550
- var _task = errorTask || task;
10558
+ } else if (context.method === "throw") {
10559
+ if (state === GenStateSuspendedStart) {
10560
+ state = GenStateCompleted;
10561
+ throw context.arg;
10562
+ }
10551
10563
 
10552
- if (!errorTask) {
10553
- cachedTask[task.key] = task;
10554
- }
10564
+ context.dispatchException(context.arg);
10555
10565
 
10556
- _task.priority = priority;
10557
- _task.callbacks = [subscribe];
10558
- _task.retry = retry;
10559
- taskPool.push(_task);
10560
- }
10561
- });
10562
- } // 执行下载
10566
+ } else if (context.method === "return") {
10567
+ context.abrupt("return", context.arg);
10568
+ }
10563
10569
 
10570
+ state = GenStateExecuting;
10564
10571
 
10565
- function executeTask() {
10566
- if (taskPool.length > 0) {
10567
- sortTaskPool();
10568
- var executeRequest = maxRequest - numRequest;
10572
+ var record = tryCatch(innerFn, self, context);
10573
+ if (record.type === "normal") {
10574
+ // If an exception is thrown from innerFn, we leave state ===
10575
+ // GenStateExecuting and loop back for another invocation.
10576
+ state = context.done
10577
+ ? GenStateCompleted
10578
+ : GenStateSuspendedYield;
10569
10579
 
10570
- if (executeRequest > 0) {
10571
- var _loop = function _loop(i) {
10572
- var task = taskPool.shift();
10580
+ if (record.arg === ContinueSentinel) {
10581
+ continue;
10582
+ }
10573
10583
 
10574
- if (!task) {
10575
- console.warn("Miss task execute", task);
10576
10584
  return {
10577
- v: void 0
10585
+ value: record.arg,
10586
+ done: context.done
10578
10587
  };
10579
- }
10580
10588
 
10581
- numRequest++;
10582
- task.execute().then(function (res) {
10583
- if (executeCallback) {
10584
- executeCallback(task, taskPool.length);
10585
- }
10589
+ } else if (record.type === "throw") {
10590
+ state = GenStateCompleted;
10591
+ // Dispatch the exception by looping back around to the
10592
+ // context.dispatchException(context.arg) call above.
10593
+ context.method = "throw";
10594
+ context.arg = record.arg;
10595
+ }
10596
+ }
10597
+ };
10598
+ }
10586
10599
 
10587
- numRequest--;
10588
- task.callbacks && task.callbacks.map(function (callback) {
10589
- callback({
10590
- success: true,
10591
- res: res
10600
+ // Call delegate.iterator[context.method](context.arg) and handle the
10601
+ // result, either by returning a { value, done } result from the
10602
+ // delegate iterator, or by modifying context.method and context.arg,
10603
+ // setting context.delegate to null, and returning the ContinueSentinel.
10604
+ function maybeInvokeDelegate(delegate, context) {
10605
+ var method = delegate.iterator[context.method];
10606
+ if (method === undefined$1) {
10607
+ // A .throw or .return when the delegate iterator has no .throw
10608
+ // method always terminates the yield* loop.
10609
+ context.delegate = null;
10610
+
10611
+ if (context.method === "throw") {
10612
+ // Note: ["return"] must be used for ES3 parsing compatibility.
10613
+ if (delegate.iterator["return"]) {
10614
+ // If the delegate iterator has a return method, give it a
10615
+ // chance to clean up.
10616
+ context.method = "return";
10617
+ context.arg = undefined$1;
10618
+ maybeInvokeDelegate(delegate, context);
10619
+
10620
+ if (context.method === "throw") {
10621
+ // If maybeInvokeDelegate(context) changed context.method from
10622
+ // "return" to "throw", let that override the TypeError below.
10623
+ return ContinueSentinel;
10624
+ }
10625
+ }
10626
+
10627
+ context.method = "throw";
10628
+ context.arg = new TypeError(
10629
+ "The iterator does not provide a 'throw' method");
10630
+ }
10631
+
10632
+ return ContinueSentinel;
10633
+ }
10634
+
10635
+ var record = tryCatch(method, delegate.iterator, context.arg);
10636
+
10637
+ if (record.type === "throw") {
10638
+ context.method = "throw";
10639
+ context.arg = record.arg;
10640
+ context.delegate = null;
10641
+ return ContinueSentinel;
10642
+ }
10643
+
10644
+ var info = record.arg;
10645
+
10646
+ if (! info) {
10647
+ context.method = "throw";
10648
+ context.arg = new TypeError("iterator result is not an object");
10649
+ context.delegate = null;
10650
+ return ContinueSentinel;
10651
+ }
10652
+
10653
+ if (info.done) {
10654
+ // Assign the result of the finished delegate to the temporary
10655
+ // variable specified by delegate.resultName (see delegateYield).
10656
+ context[delegate.resultName] = info.value;
10657
+
10658
+ // Resume execution at the desired location (see delegateYield).
10659
+ context.next = delegate.nextLoc;
10660
+
10661
+ // If context.method was "throw" but the delegate handled the
10662
+ // exception, let the outer generator proceed normally. If
10663
+ // context.method was "next", forget context.arg since it has been
10664
+ // "consumed" by the delegate iterator. If context.method was
10665
+ // "return", allow the original .return call to continue in the
10666
+ // outer generator.
10667
+ if (context.method !== "return") {
10668
+ context.method = "next";
10669
+ context.arg = undefined$1;
10670
+ }
10671
+
10672
+ } else {
10673
+ // Re-yield the result returned by the delegate method.
10674
+ return info;
10675
+ }
10676
+
10677
+ // The delegate iterator is finished, so forget it and continue with
10678
+ // the outer generator.
10679
+ context.delegate = null;
10680
+ return ContinueSentinel;
10681
+ }
10682
+
10683
+ // Define Generator.prototype.{next,throw,return} in terms of the
10684
+ // unified ._invoke helper method.
10685
+ defineIteratorMethods(Gp);
10686
+
10687
+ define(Gp, toStringTagSymbol, "Generator");
10688
+
10689
+ // A Generator should always return itself as the iterator object when the
10690
+ // @@iterator function is called on it. Some browsers' implementations of the
10691
+ // iterator prototype chain incorrectly implement this, causing the Generator
10692
+ // object to not be returned from this call. This ensures that doesn't happen.
10693
+ // See https://github.com/facebook/regenerator/issues/274 for more details.
10694
+ Gp[iteratorSymbol] = function() {
10695
+ return this;
10696
+ };
10697
+
10698
+ Gp.toString = function() {
10699
+ return "[object Generator]";
10700
+ };
10701
+
10702
+ function pushTryEntry(locs) {
10703
+ var entry = { tryLoc: locs[0] };
10704
+
10705
+ if (1 in locs) {
10706
+ entry.catchLoc = locs[1];
10707
+ }
10708
+
10709
+ if (2 in locs) {
10710
+ entry.finallyLoc = locs[2];
10711
+ entry.afterLoc = locs[3];
10712
+ }
10713
+
10714
+ this.tryEntries.push(entry);
10715
+ }
10716
+
10717
+ function resetTryEntry(entry) {
10718
+ var record = entry.completion || {};
10719
+ record.type = "normal";
10720
+ delete record.arg;
10721
+ entry.completion = record;
10722
+ }
10723
+
10724
+ function Context(tryLocsList) {
10725
+ // The root entry object (effectively a try statement without a catch
10726
+ // or a finally block) gives us a place to store values thrown from
10727
+ // locations where there is no enclosing try statement.
10728
+ this.tryEntries = [{ tryLoc: "root" }];
10729
+ tryLocsList.forEach(pushTryEntry, this);
10730
+ this.reset(true);
10731
+ }
10732
+
10733
+ exports.keys = function(object) {
10734
+ var keys = [];
10735
+ for (var key in object) {
10736
+ keys.push(key);
10737
+ }
10738
+ keys.reverse();
10739
+
10740
+ // Rather than returning an object with a next method, we keep
10741
+ // things simple and return the next function itself.
10742
+ return function next() {
10743
+ while (keys.length) {
10744
+ var key = keys.pop();
10745
+ if (key in object) {
10746
+ next.value = key;
10747
+ next.done = false;
10748
+ return next;
10749
+ }
10750
+ }
10751
+
10752
+ // To avoid creating an additional object, we just hang the .value
10753
+ // and .done properties off the next function object itself. This
10754
+ // also ensures that the minifier will not anonymize the function.
10755
+ next.done = true;
10756
+ return next;
10757
+ };
10758
+ };
10759
+
10760
+ function values(iterable) {
10761
+ if (iterable) {
10762
+ var iteratorMethod = iterable[iteratorSymbol];
10763
+ if (iteratorMethod) {
10764
+ return iteratorMethod.call(iterable);
10765
+ }
10766
+
10767
+ if (typeof iterable.next === "function") {
10768
+ return iterable;
10769
+ }
10770
+
10771
+ if (!isNaN(iterable.length)) {
10772
+ var i = -1, next = function next() {
10773
+ while (++i < iterable.length) {
10774
+ if (hasOwn.call(iterable, i)) {
10775
+ next.value = iterable[i];
10776
+ next.done = false;
10777
+ return next;
10778
+ }
10779
+ }
10780
+
10781
+ next.value = undefined$1;
10782
+ next.done = true;
10783
+
10784
+ return next;
10785
+ };
10786
+
10787
+ return next.next = next;
10788
+ }
10789
+ }
10790
+
10791
+ // Return an iterator with no values.
10792
+ return { next: doneResult };
10793
+ }
10794
+ exports.values = values;
10795
+
10796
+ function doneResult() {
10797
+ return { value: undefined$1, done: true };
10798
+ }
10799
+
10800
+ Context.prototype = {
10801
+ constructor: Context,
10802
+
10803
+ reset: function(skipTempReset) {
10804
+ this.prev = 0;
10805
+ this.next = 0;
10806
+ // Resetting context._sent for legacy support of Babel's
10807
+ // function.sent implementation.
10808
+ this.sent = this._sent = undefined$1;
10809
+ this.done = false;
10810
+ this.delegate = null;
10811
+
10812
+ this.method = "next";
10813
+ this.arg = undefined$1;
10814
+
10815
+ this.tryEntries.forEach(resetTryEntry);
10816
+
10817
+ if (!skipTempReset) {
10818
+ for (var name in this) {
10819
+ // Not sure about the optimal order of these conditions:
10820
+ if (name.charAt(0) === "t" &&
10821
+ hasOwn.call(this, name) &&
10822
+ !isNaN(+name.slice(1))) {
10823
+ this[name] = undefined$1;
10824
+ }
10825
+ }
10826
+ }
10827
+ },
10828
+
10829
+ stop: function() {
10830
+ this.done = true;
10831
+
10832
+ var rootEntry = this.tryEntries[0];
10833
+ var rootRecord = rootEntry.completion;
10834
+ if (rootRecord.type === "throw") {
10835
+ throw rootRecord.arg;
10836
+ }
10837
+
10838
+ return this.rval;
10839
+ },
10840
+
10841
+ dispatchException: function(exception) {
10842
+ if (this.done) {
10843
+ throw exception;
10844
+ }
10845
+
10846
+ var context = this;
10847
+ function handle(loc, caught) {
10848
+ record.type = "throw";
10849
+ record.arg = exception;
10850
+ context.next = loc;
10851
+
10852
+ if (caught) {
10853
+ // If the dispatched exception was caught by a catch block,
10854
+ // then let that catch block handle the exception normally.
10855
+ context.method = "next";
10856
+ context.arg = undefined$1;
10857
+ }
10858
+
10859
+ return !! caught;
10860
+ }
10861
+
10862
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10863
+ var entry = this.tryEntries[i];
10864
+ var record = entry.completion;
10865
+
10866
+ if (entry.tryLoc === "root") {
10867
+ // Exception thrown outside of any try block that could handle
10868
+ // it, so set the completion value of the entire function to
10869
+ // throw the exception.
10870
+ return handle("end");
10871
+ }
10872
+
10873
+ if (entry.tryLoc <= this.prev) {
10874
+ var hasCatch = hasOwn.call(entry, "catchLoc");
10875
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
10876
+
10877
+ if (hasCatch && hasFinally) {
10878
+ if (this.prev < entry.catchLoc) {
10879
+ return handle(entry.catchLoc, true);
10880
+ } else if (this.prev < entry.finallyLoc) {
10881
+ return handle(entry.finallyLoc);
10882
+ }
10883
+
10884
+ } else if (hasCatch) {
10885
+ if (this.prev < entry.catchLoc) {
10886
+ return handle(entry.catchLoc, true);
10887
+ }
10888
+
10889
+ } else if (hasFinally) {
10890
+ if (this.prev < entry.finallyLoc) {
10891
+ return handle(entry.finallyLoc);
10892
+ }
10893
+
10894
+ } else {
10895
+ throw new Error("try statement without catch or finally");
10896
+ }
10897
+ }
10898
+ }
10899
+ },
10900
+
10901
+ abrupt: function(type, arg) {
10902
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10903
+ var entry = this.tryEntries[i];
10904
+ if (entry.tryLoc <= this.prev &&
10905
+ hasOwn.call(entry, "finallyLoc") &&
10906
+ this.prev < entry.finallyLoc) {
10907
+ var finallyEntry = entry;
10908
+ break;
10909
+ }
10910
+ }
10911
+
10912
+ if (finallyEntry &&
10913
+ (type === "break" ||
10914
+ type === "continue") &&
10915
+ finallyEntry.tryLoc <= arg &&
10916
+ arg <= finallyEntry.finallyLoc) {
10917
+ // Ignore the finally entry if control is not jumping to a
10918
+ // location outside the try/catch block.
10919
+ finallyEntry = null;
10920
+ }
10921
+
10922
+ var record = finallyEntry ? finallyEntry.completion : {};
10923
+ record.type = type;
10924
+ record.arg = arg;
10925
+
10926
+ if (finallyEntry) {
10927
+ this.method = "next";
10928
+ this.next = finallyEntry.finallyLoc;
10929
+ return ContinueSentinel;
10930
+ }
10931
+
10932
+ return this.complete(record);
10933
+ },
10934
+
10935
+ complete: function(record, afterLoc) {
10936
+ if (record.type === "throw") {
10937
+ throw record.arg;
10938
+ }
10939
+
10940
+ if (record.type === "break" ||
10941
+ record.type === "continue") {
10942
+ this.next = record.arg;
10943
+ } else if (record.type === "return") {
10944
+ this.rval = this.arg = record.arg;
10945
+ this.method = "return";
10946
+ this.next = "end";
10947
+ } else if (record.type === "normal" && afterLoc) {
10948
+ this.next = afterLoc;
10949
+ }
10950
+
10951
+ return ContinueSentinel;
10952
+ },
10953
+
10954
+ finish: function(finallyLoc) {
10955
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10956
+ var entry = this.tryEntries[i];
10957
+ if (entry.finallyLoc === finallyLoc) {
10958
+ this.complete(entry.completion, entry.afterLoc);
10959
+ resetTryEntry(entry);
10960
+ return ContinueSentinel;
10961
+ }
10962
+ }
10963
+ },
10964
+
10965
+ "catch": function(tryLoc) {
10966
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
10967
+ var entry = this.tryEntries[i];
10968
+ if (entry.tryLoc === tryLoc) {
10969
+ var record = entry.completion;
10970
+ if (record.type === "throw") {
10971
+ var thrown = record.arg;
10972
+ resetTryEntry(entry);
10973
+ }
10974
+ return thrown;
10975
+ }
10976
+ }
10977
+
10978
+ // The context.catch method must only be called with a location
10979
+ // argument that corresponds to a known catch block.
10980
+ throw new Error("illegal catch attempt");
10981
+ },
10982
+
10983
+ delegateYield: function(iterable, resultName, nextLoc) {
10984
+ this.delegate = {
10985
+ iterator: values(iterable),
10986
+ resultName: resultName,
10987
+ nextLoc: nextLoc
10988
+ };
10989
+
10990
+ if (this.method === "next") {
10991
+ // Deliberately forget the last sent value so that we don't
10992
+ // accidentally pass it on to the delegate.
10993
+ this.arg = undefined$1;
10994
+ }
10995
+
10996
+ return ContinueSentinel;
10997
+ }
10998
+ };
10999
+
11000
+ // Regardless of whether this script is executing as a CommonJS module
11001
+ // or not, return the runtime object so that we can declare the variable
11002
+ // regeneratorRuntime in the outer scope, which allows this module to be
11003
+ // injected easily by `bin/regenerator --include-runtime script.js`.
11004
+ return exports;
11005
+
11006
+ }(
11007
+ // If this script is executing as a CommonJS module, use module.exports
11008
+ // as the regeneratorRuntime namespace. Otherwise create a new empty
11009
+ // object. Either way, the resulting object will be used to initialize
11010
+ // the regeneratorRuntime variable at the top of this file.
11011
+ module.exports
11012
+ ));
11013
+
11014
+ try {
11015
+ regeneratorRuntime = runtime;
11016
+ } catch (accidentalStrictMode) {
11017
+ // This module should not be running in strict mode, so the above
11018
+ // assignment should always work unless something is misconfigured. Just
11019
+ // in case runtime.js accidentally runs in strict mode, we can escape
11020
+ // strict mode using a global Function call. This could conceivably fail
11021
+ // if a Content Security Policy forbids using Function, but in that case
11022
+ // the proper solution is to fix the accidental strict mode problem. If
11023
+ // you've misconfigured your bundler to force strict mode and applied a
11024
+ // CSP to forbid Function, and you're not willing to fix either of those
11025
+ // problems, please detail your unique predicament in a GitHub issue.
11026
+ Function("r", "regeneratorRuntime = r")(runtime);
11027
+ }
11028
+ });
11029
+
11030
+ var regenerator = runtime_1;
11031
+
11032
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
11033
+ try {
11034
+ var info = gen[key](arg);
11035
+ var value = info.value;
11036
+ } catch (error) {
11037
+ reject(error);
11038
+ return;
11039
+ }
11040
+
11041
+ if (info.done) {
11042
+ resolve(value);
11043
+ } else {
11044
+ Promise.resolve(value).then(_next, _throw);
11045
+ }
11046
+ }
11047
+
11048
+ function _asyncToGenerator(fn) {
11049
+ return function () {
11050
+ var self = this,
11051
+ args = arguments;
11052
+ return new Promise(function (resolve, reject) {
11053
+ var gen = fn.apply(self, args);
11054
+
11055
+ function _next(value) {
11056
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
11057
+ }
11058
+
11059
+ function _throw(err) {
11060
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
11061
+ }
11062
+
11063
+ _next(undefined);
11064
+ });
11065
+ };
11066
+ }
11067
+
11068
+ var asyncToGenerator = _asyncToGenerator;
11069
+
11070
+ (function () {
11071
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11072
+ enterModule && enterModule(module);
11073
+ })();
11074
+
11075
+ function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
11076
+
11077
+ function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
11078
+
11079
+ var __signature__$E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11080
+ return a;
11081
+ };
11082
+ var taskPool = [];
11083
+ var numRequest = 0;
11084
+ var maxRequest = 4; // 最大并发数 可配置
11085
+
11086
+ var retry = 3; // 重试次数 可配置
11087
+
11088
+ var taskTimer;
11089
+ var executeCallback;
11090
+ var cachedTask = {};
11091
+ var errorCache = {}; // 出错的task集合
11092
+
11093
+ var currentTopPriority = 1; // 当前最高的优先级(除了及时触发的)
11094
+
11095
+ function initConfig(config) {
11096
+ console.log('Init Config');
11097
+ maxRequest = config.maxRequest || maxRequest;
11098
+ retry = config.retry || retry;
11099
+ executeCallback = config.executeCallback || null;
11100
+ }
11101
+
11102
+ function clear() {
11103
+ console.log('重置所有状态');
11104
+ stopTaskTimer();
11105
+ taskPool = [];
11106
+ numRequest = 0;
11107
+ maxRequest = 4;
11108
+ retry = 3;
11109
+ cachedTask = {};
11110
+ errorCache = {};
11111
+ executeCallback = null;
11112
+ } // 预加载池的添加
11113
+
11114
+
11115
+ function addTaskIntoPool(task) {
11116
+ return new Promise(function (resolve, reject) {
11117
+ var cache = cachedTask[task.key];
11118
+
11119
+ var subscribe = function subscribe(executeRes) {
11120
+ if (executeRes.success) {
11121
+ resolve(executeRes.res);
11122
+ } else {
11123
+ reject(executeRes.err);
11124
+ }
11125
+ };
11126
+
11127
+ var priority = task.priority || task.priority === 0 || 1;
11128
+
11129
+ if (cache && cache.executed) {
11130
+ delete cachedTask[task.key];
11131
+ cache = null;
11132
+ }
11133
+
11134
+ if (cache) {
11135
+ cache.priority = priority;
11136
+ var callbacks = cache.callbacks || [];
11137
+ callbacks.push(subscribe);
11138
+ } else {
11139
+ /**
11140
+ * 1.首次加载
11141
+ * 2.出错过的task重新被触发load
11142
+ */
11143
+ var errorTask = errorCache[task.key];
11144
+
11145
+ var _task = errorTask || task;
11146
+
11147
+ if (!errorTask) {
11148
+ cachedTask[task.key] = task;
11149
+ }
11150
+
11151
+ _task.priority = priority;
11152
+ _task.callbacks = [subscribe];
11153
+ _task.retry = retry;
11154
+ taskPool.push(_task);
11155
+ }
11156
+ });
11157
+ } // 执行下载
11158
+
11159
+
11160
+ function executeTask() {
11161
+ if (taskPool.length > 0) {
11162
+ sortTaskPool();
11163
+ var executeRequest = maxRequest - numRequest;
11164
+
11165
+ if (executeRequest > 0) {
11166
+ var _loop = function _loop(i) {
11167
+ var task = taskPool.shift();
11168
+
11169
+ if (!task) {
11170
+ console.warn("Miss task execute", task);
11171
+ return {
11172
+ v: void 0
11173
+ };
11174
+ }
11175
+
11176
+ numRequest++;
11177
+ task.execute().then(function (res) {
11178
+ if (executeCallback) {
11179
+ executeCallback(task, taskPool.length);
11180
+ }
11181
+
11182
+ numRequest--;
11183
+ task.callbacks && task.callbacks.map(function (callback) {
11184
+ callback({
11185
+ success: true,
11186
+ res: res
10592
11187
  });
10593
11188
  });
10594
11189
  task.executed = true;
@@ -10707,7 +11302,7 @@ function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if
10707
11302
 
10708
11303
  function _objectSpread$6(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$6(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$6(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
10709
11304
 
10710
- var __signature__$G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11305
+ var __signature__$F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
10711
11306
  return a;
10712
11307
  };
10713
11308
  var lastScrollSeriesUid = null;
@@ -10826,279 +11421,16 @@ function buildImageRequestTask(imageId) {
10826
11421
  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10827
11422
  return _objectSpread$6(_objectSpread$6({
10828
11423
  key: imageId
10829
- }, config), {}, {
10830
- execute: function execute() {
10831
- return cornerstone.loadAndCacheImage(imageId);
10832
- }
10833
- });
10834
- }
10835
-
10836
- function resetTaskPool() {
10837
- clear();
10838
- }
10839
-
10840
- (function () {
10841
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
10842
-
10843
- if (!reactHotLoader) {
10844
- return;
10845
- }
10846
-
10847
- reactHotLoader.register(lastScrollSeriesUid, "lastScrollSeriesUid", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10848
- reactHotLoader.register(highLevelPriority, "highLevelPriority", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10849
- reactHotLoader.register(initTaskPool, "initTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10850
- reactHotLoader.register(addLoadImageTask, "addLoadImageTask", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10851
- reactHotLoader.register(tryToClearPixelData, "tryToClearPixelData", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10852
- reactHotLoader.register(addTaskPool, "addTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10853
- reactHotLoader.register(changePriorityBySeries, "changePriorityBySeries", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10854
- reactHotLoader.register(loadAndCacheImagePlus, "loadAndCacheImagePlus", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10855
- reactHotLoader.register(buildImageRequestTask, "buildImageRequestTask", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10856
- reactHotLoader.register(resetTaskPool, "resetTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10857
- })();
10858
-
10859
- (function () {
10860
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
10861
- leaveModule && leaveModule(module);
10862
- })();
10863
-
10864
- (function () {
10865
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
10866
- enterModule && enterModule(module);
10867
- })();
10868
-
10869
- function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
10870
-
10871
- function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$7(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
10872
-
10873
- var __signature__$H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
10874
- return a;
10875
- };
10876
- var triggerEvent$2 = cornerstoneTools.importInternal('util/triggerEvent');
10877
- var external$9 = cornerstoneTools.external,
10878
- getToolState$5 = cornerstoneTools.getToolState,
10879
- loadHandlerManager = cornerstoneTools.loadHandlerManager,
10880
- EVENTS$2 = cornerstoneTools.EVENTS;
10881
- /**
10882
- * Scrolls through the stack to the image index requested.
10883
- * @export @public @method
10884
- * @name scrollToIndex
10885
- *
10886
- * @param {type} element The element to scroll through.
10887
- * @param {type} newImageIdIndex The target image index.
10888
- * @param {type} options {eventTrigger,backToStart,backToEnd} 是否触发事件 回到开头 回到结尾
10889
- * @returns {void}
10890
- */
10891
-
10892
- var _default$h = function _default(element, newImageIdIndex, options, callback) {
10893
- var _options = _objectSpread$7({
10894
- eventTrigger: true,
10895
- backToStart: false,
10896
- backToEnd: false
10897
- }, options);
10898
-
10899
- var toolData = getToolState$5(element, 'stack');
10900
-
10901
- if (!toolData || !toolData.data || !toolData.data.length) {
10902
- return;
10903
- }
10904
-
10905
- var cornerstone = external$9.cornerstone; // If we have more than one stack, check if we have a stack renderer defined
10906
-
10907
- var stackRenderer;
10908
-
10909
- if (toolData.data.length > 1) {
10910
- var stackRendererData = getToolState$5(element, 'stackRenderer');
10911
-
10912
- if (stackRendererData && stackRendererData.data && stackRendererData.data.length) {
10913
- stackRenderer = stackRendererData.data[0];
10914
- }
10915
- }
10916
-
10917
- var stackData = toolData.data[0]; // Allow for negative indexing
10918
-
10919
- if (newImageIdIndex < 0) {
10920
- newImageIdIndex += stackData.imageIds.length;
10921
- }
10922
-
10923
- var startLoadingHandler = loadHandlerManager.getStartLoadHandler(element);
10924
- var endLoadingHandler = loadHandlerManager.getEndLoadHandler(element);
10925
- var errorLoadingHandler = loadHandlerManager.getErrorLoadingHandler(element);
10926
-
10927
- function doneCallback(image) {
10928
- if (stackData.currentImageIdIndex !== newImageIdIndex) {
10929
- return;
10930
- } // Check if the element is still enabled in Cornerstone,
10931
- // If an error is thrown, stop here.
10932
-
10933
-
10934
- try {
10935
- // TODO: Add 'isElementEnabled' to Cornerstone?
10936
- cornerstone.getEnabledElement(element);
10937
- } catch (error) {
10938
- return;
10939
- }
10940
-
10941
- if (stackRenderer) {
10942
- stackRenderer.currentImageIdIndex = newImageIdIndex;
10943
- stackRenderer.render(element, toolData.data);
10944
- } else {
10945
- cornerstone.displayImage(element, image);
10946
- }
10947
-
10948
- if (endLoadingHandler) {
10949
- endLoadingHandler(element, image);
10950
- }
10951
-
10952
- if (callback) {
10953
- callback({
10954
- type: 'done',
10955
- element: element
10956
- });
10957
- }
10958
- }
10959
-
10960
- function failCallback(error) {
10961
- var imageId = stackData.imageIds[newImageIdIndex];
10962
-
10963
- if (errorLoadingHandler) {
10964
- errorLoadingHandler(element, imageId, error);
10965
- }
10966
-
10967
- if (callback) {
10968
- callback({
10969
- type: 'fail',
10970
- element: element,
10971
- imageId: imageId,
10972
- error: error
10973
- });
10974
- }
10975
- }
10976
-
10977
- if (newImageIdIndex === stackData.currentImageIdIndex) {
10978
- return;
10979
- }
10980
-
10981
- if (startLoadingHandler) {
10982
- startLoadingHandler(element);
10983
- }
10984
-
10985
- var eventData = _objectSpread$7({
10986
- newImageIdIndex: newImageIdIndex,
10987
- direction: newImageIdIndex - stackData.currentImageIdIndex
10988
- }, _options);
10989
-
10990
- stackData.currentImageIdIndex = newImageIdIndex;
10991
- var newImageId = stackData.imageIds[newImageIdIndex]; // Retry image loading in cases where previous image promise
10992
- // Was rejected, if the option is set
10993
-
10994
- /*
10995
- Const config = stackScroll.getConfiguration();
10996
- TODO: Revisit this. It appears that Core's imageCache is not
10997
- keeping rejected promises anywhere, so we have no way to know
10998
- if something was previously rejected.
10999
- if (config && config.retryLoadOnScroll === true) {
11000
- }
11001
- */
11002
- // Convert the preventCache value in stack data to a boolean
11003
-
11004
- var preventCache = Boolean(stackData.preventCache);
11005
- var imagePromise;
11006
-
11007
- if (preventCache) {
11008
- imagePromise = cornerstone.loadImage(newImageId);
11009
- } else {
11010
- imagePromise = loadAndCacheImagePlus(newImageId);
11011
- }
11012
-
11013
- imagePromise.then(doneCallback, failCallback);
11014
-
11015
- if (_options.eventTrigger) {
11016
- triggerEvent$2(element, EVENTS$2.STACK_SCROLL, eventData);
11017
- }
11018
- };
11019
-
11020
- (function () {
11021
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11022
-
11023
- if (!reactHotLoader) {
11024
- return;
11025
- }
11026
-
11027
- reactHotLoader.register(triggerEvent$2, "triggerEvent", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11028
- reactHotLoader.register(external$9, "external", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11029
- reactHotLoader.register(getToolState$5, "getToolState", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11030
- reactHotLoader.register(loadHandlerManager, "loadHandlerManager", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11031
- reactHotLoader.register(EVENTS$2, "EVENTS", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11032
- reactHotLoader.register(_default$h, "default", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11033
- })();
11034
-
11035
- (function () {
11036
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11037
- leaveModule && leaveModule(module);
11038
- })();
11039
-
11040
- (function () {
11041
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11042
- enterModule && enterModule(module);
11043
- })();
11044
-
11045
- var __signature__$I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11046
- return a;
11047
- };
11048
-
11049
- /*
11050
- *****************************************************************
11051
- * C O P Y R I G H T (c) 2018-2019
11052
- * Suzhou Chainz Medical Technology Co.
11053
- * All Rights Reserved
11054
- *****************************************************************
11055
- *
11056
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
11057
- * Suzhou Chainz Medical Technology Co.
11058
- * The copyright notice above does not evidence any
11059
- * actual or intended publication of such source code.
11060
- *
11061
- *****************************************************************
11062
- *
11063
- * Author: Zhang Jiaqi
11064
- *
11065
- */
11066
- var ImageProcessType = {
11067
- Unkown: 0,
11068
-
11069
- /**
11070
- * 最大密度投影
11071
- */
11072
- MIP: 1,
11073
-
11074
- /**
11075
- * 多平面重建
11076
- */
11077
- MPR: 2,
11078
-
11079
- /**
11080
- * 曲面重建
11081
- */
11082
- CPR: 3,
11083
-
11084
- /**
11085
- * 表面重建
11086
- */
11087
- SSD: 4,
11088
-
11089
- /**
11090
- * VR
11091
- */
11092
- VR: 5,
11424
+ }, config), {}, {
11425
+ execute: function execute() {
11426
+ return cornerstone.loadAndCacheImage(imageId);
11427
+ }
11428
+ });
11429
+ }
11093
11430
 
11094
- /**
11095
- * 穿刺
11096
- */
11097
- Centesis: 6
11098
- };
11099
- var _default$i = {
11100
- ImageProcessType: ImageProcessType
11101
- };
11431
+ function resetTaskPool() {
11432
+ clear();
11433
+ }
11102
11434
 
11103
11435
  (function () {
11104
11436
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -11107,8 +11439,16 @@ var _default$i = {
11107
11439
  return;
11108
11440
  }
11109
11441
 
11110
- reactHotLoader.register(ImageProcessType, "ImageProcessType", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/domain/enums/ImageProcessType.js");
11111
- reactHotLoader.register(_default$i, "default", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/domain/enums/ImageProcessType.js");
11442
+ reactHotLoader.register(lastScrollSeriesUid, "lastScrollSeriesUid", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11443
+ reactHotLoader.register(highLevelPriority, "highLevelPriority", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11444
+ reactHotLoader.register(initTaskPool, "initTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11445
+ reactHotLoader.register(addLoadImageTask, "addLoadImageTask", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11446
+ reactHotLoader.register(tryToClearPixelData, "tryToClearPixelData", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11447
+ reactHotLoader.register(addTaskPool, "addTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11448
+ reactHotLoader.register(changePriorityBySeries, "changePriorityBySeries", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11449
+ reactHotLoader.register(loadAndCacheImagePlus, "loadAndCacheImagePlus", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11450
+ reactHotLoader.register(buildImageRequestTask, "buildImageRequestTask", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11451
+ reactHotLoader.register(resetTaskPool, "resetTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
11112
11452
  })();
11113
11453
 
11114
11454
  (function () {
@@ -11121,53 +11461,32 @@ var _default$i = {
11121
11461
  enterModule && enterModule(module);
11122
11462
  })();
11123
11463
 
11124
- var __signature__$J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11464
+ var __signature__$G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11125
11465
  return a;
11126
11466
  };
11467
+ var dicomCache = {};
11127
11468
 
11128
- /*
11129
- *****************************************************************
11130
- * C O P Y R I G H T (c) 2018-2019
11131
- * Suzhou Chainz Medical Technology Co.
11132
- * All Rights Reserved
11133
- *****************************************************************
11134
- *
11135
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
11136
- * Suzhou Chainz Medical Technology Co.
11137
- * The copyright notice above does not evidence any
11138
- * actual or intended publication of such source code.
11139
- *
11140
- *****************************************************************
11141
- *
11142
- * Author: Zhang Jiaqi
11143
- *
11144
- */
11145
- var ImageProcessExceptionBase = /*#__PURE__*/function () {
11146
- function ImageProcessExceptionBase() {
11147
- classCallCheck(this, ImageProcessExceptionBase);
11148
- }
11149
-
11150
- createClass(ImageProcessExceptionBase, [{
11151
- key: "toString",
11152
- value: function toString() {
11153
- return this.message;
11154
- }
11155
- }, {
11156
- key: "__reactstandin__regenerateByEval",
11157
- // @ts-ignore
11158
- value: function __reactstandin__regenerateByEval(key, code) {
11159
- // @ts-ignore
11160
- this[key] = eval(code);
11161
- }
11162
- }, {
11163
- key: "message",
11164
- get: function get() {
11165
- return "未知错误";
11469
+ var loadAndCacheDicom = function loadAndCacheDicom(imageId) {
11470
+ return new Promise(function (resolve, reject) {
11471
+ if (dicomCache[imageId]) {
11472
+ resolve(dicomCache[imageId]);
11473
+ return;
11166
11474
  }
11167
- }]);
11168
11475
 
11169
- return ImageProcessExceptionBase;
11170
- }();
11476
+ var imagePromise = loadAndCacheImagePlus(imageId);
11477
+ imagePromise.then(function (image) {
11478
+ var dicom = new DicomInfo(image.data, image.getPixelData());
11479
+ dicomCache[imageId] = dicom;
11480
+ resolve(dicom);
11481
+ }, function (e) {
11482
+ reject(e);
11483
+ });
11484
+ });
11485
+ };
11486
+
11487
+ var purgeDicomCache = function purgeDicomCache() {
11488
+ dicomCache = {};
11489
+ };
11171
11490
 
11172
11491
  (function () {
11173
11492
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -11176,7 +11495,9 @@ var ImageProcessExceptionBase = /*#__PURE__*/function () {
11176
11495
  return;
11177
11496
  }
11178
11497
 
11179
- reactHotLoader.register(ImageProcessExceptionBase, "ImageProcessExceptionBase", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/exceptions/ImageProcessExceptionBase.js");
11498
+ reactHotLoader.register(dicomCache, "dicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
11499
+ reactHotLoader.register(loadAndCacheDicom, "loadAndCacheDicom", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
11500
+ reactHotLoader.register(purgeDicomCache, "purgeDicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
11180
11501
  })();
11181
11502
 
11182
11503
  (function () {
@@ -11189,881 +11510,654 @@ var ImageProcessExceptionBase = /*#__PURE__*/function () {
11189
11510
  enterModule && enterModule(module);
11190
11511
  })();
11191
11512
 
11192
- function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }
11513
+ function _createSuper$c(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$c(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }
11193
11514
 
11194
- function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
11515
+ function _isNativeReflectConstruct$c() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
11195
11516
 
11196
- var __signature__$K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11517
+ var __signature__$H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11197
11518
  return a;
11198
11519
  };
11520
+ var BaseTool$5 = cornerstoneTools.importInternal('base/BaseTool');
11521
+ var getPixelSpacing$5 = cornerstoneTools.importInternal('util/getPixelSpacing');
11522
+ var devicePixelRatio$1 = getDevicePixelRatio();
11199
11523
 
11200
- var NotSupportImageProcessTypeException = /*#__PURE__*/function (_ImageProcessExceptio) {
11201
- inherits(NotSupportImageProcessTypeException, _ImageProcessExceptio);
11524
+ var RulerOverlayTool = /*#__PURE__*/function (_BaseTool) {
11525
+ inherits(RulerOverlayTool, _BaseTool);
11202
11526
 
11203
- var _super = _createSuper$d(NotSupportImageProcessTypeException);
11527
+ var _super = _createSuper$c(RulerOverlayTool);
11204
11528
 
11205
- function NotSupportImageProcessTypeException(text) {
11206
- var _this;
11529
+ function RulerOverlayTool() {
11530
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11207
11531
 
11208
- classCallCheck(this, NotSupportImageProcessTypeException);
11532
+ classCallCheck(this, RulerOverlayTool);
11209
11533
 
11210
- _this = _super.call(this);
11211
- _this.orientType = text;
11212
- return _this;
11534
+ var defaultProps = {
11535
+ name: 'RulerOverlay',
11536
+ mixins: ['enabledOrDisabledBinaryTool']
11537
+ };
11538
+ return _super.call(this, props, defaultProps);
11213
11539
  }
11214
11540
 
11215
- createClass(NotSupportImageProcessTypeException, [{
11216
- key: "__reactstandin__regenerateByEval",
11217
- // @ts-ignore
11218
- value: function __reactstandin__regenerateByEval(key, code) {
11219
- // @ts-ignore
11220
- this[key] = eval(code);
11541
+ createClass(RulerOverlayTool, [{
11542
+ key: "enabledCallback",
11543
+ value: function enabledCallback(element) {
11544
+ this.forceImageUpdate(element);
11221
11545
  }
11222
11546
  }, {
11223
- key: "message",
11224
- get: function get() {
11225
- return String.format("未支持的图像后处理类型 -- {0}", this.orientType);
11226
- }
11227
- }]);
11228
-
11229
- return NotSupportImageProcessTypeException;
11230
- }(ImageProcessExceptionBase);
11231
-
11232
- (function () {
11233
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11234
-
11235
- if (!reactHotLoader) {
11236
- return;
11237
- }
11238
-
11239
- reactHotLoader.register(NotSupportImageProcessTypeException, "NotSupportImageProcessTypeException", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/exceptions/NotSupportImageProcessTypeException.js");
11240
- })();
11241
-
11242
- (function () {
11243
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11244
- leaveModule && leaveModule(module);
11245
- })();
11246
-
11247
- function _arrayWithoutHoles(arr) {
11248
- if (Array.isArray(arr)) return arrayLikeToArray(arr);
11249
- }
11250
-
11251
- var arrayWithoutHoles = _arrayWithoutHoles;
11252
-
11253
- function _iterableToArray(iter) {
11254
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
11255
- }
11256
-
11257
- var iterableToArray = _iterableToArray;
11258
-
11259
- function _nonIterableSpread() {
11260
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11261
- }
11262
-
11263
- var nonIterableSpread = _nonIterableSpread;
11264
-
11265
- function _toConsumableArray(arr) {
11266
- return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
11267
- }
11268
-
11269
- var toConsumableArray = _toConsumableArray;
11270
-
11271
- var runtime_1 = createCommonjsModule(function (module) {
11272
- /**
11273
- * Copyright (c) 2014-present, Facebook, Inc.
11274
- *
11275
- * This source code is licensed under the MIT license found in the
11276
- * LICENSE file in the root directory of this source tree.
11277
- */
11278
-
11279
- var runtime = (function (exports) {
11280
-
11281
- var Op = Object.prototype;
11282
- var hasOwn = Op.hasOwnProperty;
11283
- var undefined$1; // More compressible than void 0.
11284
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
11285
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
11286
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
11287
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
11288
-
11289
- function define(obj, key, value) {
11290
- Object.defineProperty(obj, key, {
11291
- value: value,
11292
- enumerable: true,
11293
- configurable: true,
11294
- writable: true
11295
- });
11296
- return obj[key];
11297
- }
11298
- try {
11299
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
11300
- define({}, "");
11301
- } catch (err) {
11302
- define = function(obj, key, value) {
11303
- return obj[key] = value;
11304
- };
11305
- }
11306
-
11307
- function wrap(innerFn, outerFn, self, tryLocsList) {
11308
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
11309
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
11310
- var generator = Object.create(protoGenerator.prototype);
11311
- var context = new Context(tryLocsList || []);
11312
-
11313
- // The ._invoke method unifies the implementations of the .next,
11314
- // .throw, and .return methods.
11315
- generator._invoke = makeInvokeMethod(innerFn, self, context);
11316
-
11317
- return generator;
11318
- }
11319
- exports.wrap = wrap;
11320
-
11321
- // Try/catch helper to minimize deoptimizations. Returns a completion
11322
- // record like context.tryEntries[i].completion. This interface could
11323
- // have been (and was previously) designed to take a closure to be
11324
- // invoked without arguments, but in all the cases we care about we
11325
- // already have an existing method we want to call, so there's no need
11326
- // to create a new function object. We can even get away with assuming
11327
- // the method takes exactly one argument, since that happens to be true
11328
- // in every case, so we don't have to touch the arguments object. The
11329
- // only additional allocation required is the completion record, which
11330
- // has a stable shape and so hopefully should be cheap to allocate.
11331
- function tryCatch(fn, obj, arg) {
11332
- try {
11333
- return { type: "normal", arg: fn.call(obj, arg) };
11334
- } catch (err) {
11335
- return { type: "throw", arg: err };
11547
+ key: "disabledCallback",
11548
+ value: function disabledCallback(element) {
11549
+ this.forceImageUpdate(element);
11336
11550
  }
11337
- }
11338
-
11339
- var GenStateSuspendedStart = "suspendedStart";
11340
- var GenStateSuspendedYield = "suspendedYield";
11341
- var GenStateExecuting = "executing";
11342
- var GenStateCompleted = "completed";
11343
-
11344
- // Returning this object from the innerFn has the same effect as
11345
- // breaking out of the dispatch switch statement.
11346
- var ContinueSentinel = {};
11347
-
11348
- // Dummy constructor functions that we use as the .constructor and
11349
- // .constructor.prototype properties for functions that return Generator
11350
- // objects. For full spec compliance, you may wish to configure your
11351
- // minifier not to mangle the names of these two functions.
11352
- function Generator() {}
11353
- function GeneratorFunction() {}
11354
- function GeneratorFunctionPrototype() {}
11355
-
11356
- // This is a polyfill for %IteratorPrototype% for environments that
11357
- // don't natively support it.
11358
- var IteratorPrototype = {};
11359
- IteratorPrototype[iteratorSymbol] = function () {
11360
- return this;
11361
- };
11362
-
11363
- var getProto = Object.getPrototypeOf;
11364
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
11365
- if (NativeIteratorPrototype &&
11366
- NativeIteratorPrototype !== Op &&
11367
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
11368
- // This environment has a native %IteratorPrototype%; use it instead
11369
- // of the polyfill.
11370
- IteratorPrototype = NativeIteratorPrototype;
11371
- }
11372
-
11373
- var Gp = GeneratorFunctionPrototype.prototype =
11374
- Generator.prototype = Object.create(IteratorPrototype);
11375
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
11376
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
11377
- GeneratorFunction.displayName = define(
11378
- GeneratorFunctionPrototype,
11379
- toStringTagSymbol,
11380
- "GeneratorFunction"
11381
- );
11382
-
11383
- // Helper for defining the .next, .throw, and .return methods of the
11384
- // Iterator interface in terms of a single ._invoke method.
11385
- function defineIteratorMethods(prototype) {
11386
- ["next", "throw", "return"].forEach(function(method) {
11387
- define(prototype, method, function(arg) {
11388
- return this._invoke(method, arg);
11389
- });
11390
- });
11391
- }
11392
-
11393
- exports.isGeneratorFunction = function(genFun) {
11394
- var ctor = typeof genFun === "function" && genFun.constructor;
11395
- return ctor
11396
- ? ctor === GeneratorFunction ||
11397
- // For the native GeneratorFunction constructor, the best we can
11398
- // do is to check its .name property.
11399
- (ctor.displayName || ctor.name) === "GeneratorFunction"
11400
- : false;
11401
- };
11551
+ }, {
11552
+ key: "forceImageUpdate",
11553
+ value: function forceImageUpdate(element) {
11554
+ var enabledElement = cornerstone.getEnabledElement(element);
11402
11555
 
11403
- exports.mark = function(genFun) {
11404
- if (Object.setPrototypeOf) {
11405
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
11406
- } else {
11407
- genFun.__proto__ = GeneratorFunctionPrototype;
11408
- define(genFun, toStringTagSymbol, "GeneratorFunction");
11556
+ if (enabledElement.image) {
11557
+ cornerstone.updateImage(element);
11558
+ }
11409
11559
  }
11410
- genFun.prototype = Object.create(Gp);
11411
- return genFun;
11412
- };
11413
-
11414
- // Within the body of any async function, `await x` is transformed to
11415
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
11416
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
11417
- // meant to be awaited.
11418
- exports.awrap = function(arg) {
11419
- return { __await: arg };
11420
- };
11560
+ }, {
11561
+ key: "drawRuler",
11562
+ value: function drawRuler(canvas, rowHeightInCanvas, rulerSpace) {
11563
+ var context = canvas.getContext('2d');
11564
+ var canvasHeight = canvas.height;
11565
+ var canvasWidth = canvas.width;
11566
+ context.setTransform(1, 0, 0, 1, 0, 0);
11567
+ context.beginPath();
11568
+ context.strokeStyle = 'white';
11569
+ context.fillStyle = 'white';
11570
+ context.lineWidth = 2 * devicePixelRatio$1;
11571
+ context.font = 12 * devicePixelRatio$1 + 'px Arial';
11572
+ var marginX = 40 * devicePixelRatio$1;
11573
+ var tickMajor = 10 * devicePixelRatio$1;
11574
+ var tickMinor = 7 * devicePixelRatio$1;
11575
+ var tickPatch = 5 * devicePixelRatio$1;
11576
+ var anchor = {
11577
+ x: canvasWidth - marginX,
11578
+ y: canvasHeight / 2
11579
+ };
11580
+ var rulerLength;
11581
+ var text;
11421
11582
 
11422
- function AsyncIterator(generator, PromiseImpl) {
11423
- function invoke(method, arg, resolve, reject) {
11424
- var record = tryCatch(generator[method], generator, arg);
11425
- if (record.type === "throw") {
11426
- reject(record.arg);
11583
+ if (rulerSpace / rowHeightInCanvas < 0.5) {
11584
+ rulerLength = canvasHeight * rulerSpace / rowHeightInCanvas;
11585
+ text = rulerSpace + ' cm';
11427
11586
  } else {
11428
- var result = record.arg;
11429
- var value = result.value;
11430
- if (value &&
11431
- typeof value === "object" &&
11432
- hasOwn.call(value, "__await")) {
11433
- return PromiseImpl.resolve(value.__await).then(function(value) {
11434
- invoke("next", value, resolve, reject);
11435
- }, function(err) {
11436
- invoke("throw", err, resolve, reject);
11437
- });
11438
- }
11439
-
11440
- return PromiseImpl.resolve(value).then(function(unwrapped) {
11441
- // When a yielded Promise is resolved, its final value becomes
11442
- // the .value of the Promise<{value,done}> result for the
11443
- // current iteration.
11444
- result.value = unwrapped;
11445
- resolve(result);
11446
- }, function(error) {
11447
- // If a rejected Promise was yielded, throw the rejection back
11448
- // into the async generator function so it can be handled there.
11449
- return invoke("throw", error, resolve, reject);
11450
- });
11587
+ rulerLength = canvasHeight * 0.5;
11588
+ text = (rowHeightInCanvas * 5).toFixed(2) + ' mm';
11451
11589
  }
11452
- }
11453
11590
 
11454
- var previousPromise;
11591
+ context.moveTo(anchor.x, anchor.y - rulerLength * 0.5 - devicePixelRatio$1);
11592
+ context.lineTo(anchor.x, anchor.y + rulerLength * 0.5 + devicePixelRatio$1);
11593
+ var point;
11455
11594
 
11456
- function enqueue(method, arg) {
11457
- function callInvokeWithMethodAndArg() {
11458
- return new PromiseImpl(function(resolve, reject) {
11459
- invoke(method, arg, resolve, reject);
11460
- });
11595
+ if (rulerLength / rulerSpace > 4 * devicePixelRatio$1) {
11596
+ point = rulerSpace > 10 ? 10 + 1 : rulerSpace + 1;
11597
+ } else if (rulerLength / rulerSpace > 1 * devicePixelRatio$1 && rulerSpace % 2 === 0) {
11598
+ point = 3;
11599
+ } else {
11600
+ point = 2;
11461
11601
  }
11462
11602
 
11463
- return previousPromise =
11464
- // If enqueue has been called before, then we want to wait until
11465
- // all previous Promises have been resolved before calling invoke,
11466
- // so that results are always delivered in the correct order. If
11467
- // enqueue has not been called before, then it is important to
11468
- // call invoke immediately, without waiting on a callback to fire,
11469
- // so that the async generator function has the opportunity to do
11470
- // any necessary setup in a predictable way. This predictability
11471
- // is why the Promise constructor synchronously invokes its
11472
- // executor callback, and why async functions synchronously
11473
- // execute code before the first await. Since we implement simple
11474
- // async functions in terms of async generators, it is especially
11475
- // important to get this right, even though it requires care.
11476
- previousPromise ? previousPromise.then(
11477
- callInvokeWithMethodAndArg,
11478
- // Avoid propagating failures to Promises returned by later
11479
- // invocations of the iterator.
11480
- callInvokeWithMethodAndArg
11481
- ) : callInvokeWithMethodAndArg();
11482
- }
11603
+ lodash$1.range(point).map(function (i) {
11604
+ var tick = (i - (point - 1) / 2) / (point - 1);
11605
+ var tickLength;
11483
11606
 
11484
- // Define the unified helper method that is used to implement .next,
11485
- // .throw, and .return (see defineIteratorMethods).
11486
- this._invoke = enqueue;
11487
- }
11607
+ switch (tick) {
11608
+ case 0:
11609
+ {
11610
+ tickLength = tickMinor;
11611
+ }
11488
11612
 
11489
- defineIteratorMethods(AsyncIterator.prototype);
11490
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
11491
- return this;
11492
- };
11493
- exports.AsyncIterator = AsyncIterator;
11613
+ case -0.5:
11614
+ case 0.5:
11615
+ {
11616
+ tickLength = tickMajor;
11617
+ }
11494
11618
 
11495
- // Note that simple async functions are implemented on top of
11496
- // AsyncIterator objects; they just return a Promise for the value of
11497
- // the final result produced by the iterator.
11498
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
11499
- if (PromiseImpl === void 0) PromiseImpl = Promise;
11619
+ default:
11620
+ {
11621
+ tickLength = tickPatch;
11622
+ }
11623
+ }
11500
11624
 
11501
- var iter = new AsyncIterator(
11502
- wrap(innerFn, outerFn, self, tryLocsList),
11503
- PromiseImpl
11504
- );
11625
+ var y = anchor.y + rulerLength * tick;
11626
+ context.moveTo(anchor.x, y);
11627
+ context.lineTo(anchor.x - tickLength, y);
11628
+ });
11505
11629
 
11506
- return exports.isGeneratorFunction(outerFn)
11507
- ? iter // If outerFn is a generator, return the full iterator.
11508
- : iter.next().then(function(result) {
11509
- return result.done ? result.value : iter.next();
11510
- });
11511
- };
11630
+ context.fillText(text, canvasWidth - marginX - 16 * devicePixelRatio$1, canvasHeight / 2 - rulerLength / 2 - 6 * devicePixelRatio$1);
11631
+ context.stroke();
11632
+ }
11633
+ }, {
11634
+ key: "renderToolData",
11635
+ value: function () {
11636
+ var _renderToolData = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(evt) {
11637
+ var eventData, canvas, image, viewport, dicom, canvasHeight, scale, _getPixelSpacing, rowPixelSpacing, colPixelSpacing, rows, cols, rowHeight, rowHeightInCanvas, _i, _arr, rulerLength;
11512
11638
 
11513
- function makeInvokeMethod(innerFn, self, context) {
11514
- var state = GenStateSuspendedStart;
11639
+ return regenerator.wrap(function _callee$(_context) {
11640
+ while (1) {
11641
+ switch (_context.prev = _context.next) {
11642
+ case 0:
11643
+ eventData = evt.detail;
11644
+ canvas = eventData.canvasContext.canvas;
11645
+ image = eventData.image, viewport = eventData.viewport;
11646
+ _context.next = 5;
11647
+ return loadAndCacheDicom(image.imageId);
11515
11648
 
11516
- return function invoke(method, arg) {
11517
- if (state === GenStateExecuting) {
11518
- throw new Error("Generator is already running");
11519
- }
11649
+ case 5:
11650
+ dicom = _context.sent;
11520
11651
 
11521
- if (state === GenStateCompleted) {
11522
- if (method === "throw") {
11523
- throw arg;
11524
- }
11652
+ if (dicom) {
11653
+ _context.next = 8;
11654
+ break;
11655
+ }
11525
11656
 
11526
- // Be forgiving, per 25.3.3.3.3 of the spec:
11527
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
11528
- return doneResult();
11529
- }
11657
+ return _context.abrupt("return");
11658
+
11659
+ case 8:
11660
+ canvasHeight = canvas.height;
11661
+ scale = viewport.scale;
11662
+ _getPixelSpacing = getPixelSpacing$5(image), rowPixelSpacing = _getPixelSpacing.rowPixelSpacing, colPixelSpacing = _getPixelSpacing.colPixelSpacing;
11663
+ rows = dicom.Rows.value[0];
11664
+ cols = dicom.Columns.value[0];
11665
+ rowHeight = rows * rowPixelSpacing / 10; // cm
11666
+
11667
+ if (!lodash$1.isNaN(rowHeight)) {
11668
+ _context.next = 16;
11669
+ break;
11670
+ }
11530
11671
 
11531
- context.method = method;
11532
- context.arg = arg;
11672
+ return _context.abrupt("return");
11533
11673
 
11534
- while (true) {
11535
- var delegate = context.delegate;
11536
- if (delegate) {
11537
- var delegateResult = maybeInvokeDelegate(delegate, context);
11538
- if (delegateResult) {
11539
- if (delegateResult === ContinueSentinel) continue;
11540
- return delegateResult;
11541
- }
11542
- }
11674
+ case 16:
11675
+ if (rows >= cols) {
11676
+ rowHeightInCanvas = rowHeight / (rows * scale / canvasHeight);
11677
+ } else {
11678
+ rowHeightInCanvas = rowHeight / (rows * (rowPixelSpacing / colPixelSpacing) * scale / canvasHeight);
11679
+ }
11543
11680
 
11544
- if (context.method === "next") {
11545
- // Setting context._sent for legacy support of Babel's
11546
- // function.sent implementation.
11547
- context.sent = context._sent = context.arg;
11681
+ _i = 0, _arr = [100, 50, 20, 10, 5, 1];
11548
11682
 
11549
- } else if (context.method === "throw") {
11550
- if (state === GenStateSuspendedStart) {
11551
- state = GenStateCompleted;
11552
- throw context.arg;
11553
- }
11683
+ case 18:
11684
+ if (!(_i < _arr.length)) {
11685
+ _context.next = 26;
11686
+ break;
11687
+ }
11554
11688
 
11555
- context.dispatchException(context.arg);
11689
+ rulerLength = _arr[_i];
11556
11690
 
11557
- } else if (context.method === "return") {
11558
- context.abrupt("return", context.arg);
11559
- }
11691
+ if (!(rowHeightInCanvas / 2 / rulerLength > 1 || rulerLength === 1)) {
11692
+ _context.next = 23;
11693
+ break;
11694
+ }
11560
11695
 
11561
- state = GenStateExecuting;
11696
+ this.drawRuler(canvas, rowHeightInCanvas, rulerLength);
11697
+ return _context.abrupt("return");
11562
11698
 
11563
- var record = tryCatch(innerFn, self, context);
11564
- if (record.type === "normal") {
11565
- // If an exception is thrown from innerFn, we leave state ===
11566
- // GenStateExecuting and loop back for another invocation.
11567
- state = context.done
11568
- ? GenStateCompleted
11569
- : GenStateSuspendedYield;
11699
+ case 23:
11700
+ _i++;
11701
+ _context.next = 18;
11702
+ break;
11570
11703
 
11571
- if (record.arg === ContinueSentinel) {
11572
- continue;
11704
+ case 26:
11705
+ case "end":
11706
+ return _context.stop();
11707
+ }
11573
11708
  }
11709
+ }, _callee, this);
11710
+ }));
11574
11711
 
11575
- return {
11576
- value: record.arg,
11577
- done: context.done
11578
- };
11579
-
11580
- } else if (record.type === "throw") {
11581
- state = GenStateCompleted;
11582
- // Dispatch the exception by looping back around to the
11583
- // context.dispatchException(context.arg) call above.
11584
- context.method = "throw";
11585
- context.arg = record.arg;
11586
- }
11712
+ function renderToolData(_x) {
11713
+ return _renderToolData.apply(this, arguments);
11587
11714
  }
11588
- };
11715
+
11716
+ return renderToolData;
11717
+ }()
11718
+ }, {
11719
+ key: "__reactstandin__regenerateByEval",
11720
+ // @ts-ignore
11721
+ value: function __reactstandin__regenerateByEval(key, code) {
11722
+ // @ts-ignore
11723
+ this[key] = eval(code);
11724
+ }
11725
+ }]);
11726
+
11727
+ return RulerOverlayTool;
11728
+ }(BaseTool$5);
11729
+
11730
+ (function () {
11731
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11732
+
11733
+ if (!reactHotLoader) {
11734
+ return;
11589
11735
  }
11590
11736
 
11591
- // Call delegate.iterator[context.method](context.arg) and handle the
11592
- // result, either by returning a { value, done } result from the
11593
- // delegate iterator, or by modifying context.method and context.arg,
11594
- // setting context.delegate to null, and returning the ContinueSentinel.
11595
- function maybeInvokeDelegate(delegate, context) {
11596
- var method = delegate.iterator[context.method];
11597
- if (method === undefined$1) {
11598
- // A .throw or .return when the delegate iterator has no .throw
11599
- // method always terminates the yield* loop.
11600
- context.delegate = null;
11737
+ reactHotLoader.register(BaseTool$5, "BaseTool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
11738
+ reactHotLoader.register(getPixelSpacing$5, "getPixelSpacing", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
11739
+ reactHotLoader.register(devicePixelRatio$1, "devicePixelRatio", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
11740
+ reactHotLoader.register(RulerOverlayTool, "RulerOverlayTool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/RulerOverlayTool.js");
11741
+ })();
11601
11742
 
11602
- if (context.method === "throw") {
11603
- // Note: ["return"] must be used for ES3 parsing compatibility.
11604
- if (delegate.iterator["return"]) {
11605
- // If the delegate iterator has a return method, give it a
11606
- // chance to clean up.
11607
- context.method = "return";
11608
- context.arg = undefined$1;
11609
- maybeInvokeDelegate(delegate, context);
11743
+ (function () {
11744
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11745
+ leaveModule && leaveModule(module);
11746
+ })();
11610
11747
 
11611
- if (context.method === "throw") {
11612
- // If maybeInvokeDelegate(context) changed context.method from
11613
- // "return" to "throw", let that override the TypeError below.
11614
- return ContinueSentinel;
11615
- }
11616
- }
11748
+ (function () {
11749
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11750
+ enterModule && enterModule(module);
11751
+ })();
11617
11752
 
11618
- context.method = "throw";
11619
- context.arg = new TypeError(
11620
- "The iterator does not provide a 'throw' method");
11621
- }
11753
+ function ownKeys$7(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
11622
11754
 
11623
- return ContinueSentinel;
11624
- }
11755
+ function _objectSpread$7(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$7(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$7(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
11625
11756
 
11626
- var record = tryCatch(method, delegate.iterator, context.arg);
11757
+ var __signature__$I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11758
+ return a;
11759
+ };
11760
+ var triggerEvent$2 = cornerstoneTools.importInternal('util/triggerEvent');
11761
+ var external$9 = cornerstoneTools.external,
11762
+ getToolState$5 = cornerstoneTools.getToolState,
11763
+ loadHandlerManager = cornerstoneTools.loadHandlerManager,
11764
+ EVENTS$2 = cornerstoneTools.EVENTS;
11765
+ /**
11766
+ * Scrolls through the stack to the image index requested.
11767
+ * @export @public @method
11768
+ * @name scrollToIndex
11769
+ *
11770
+ * @param {type} element The element to scroll through.
11771
+ * @param {type} newImageIdIndex The target image index.
11772
+ * @param {type} options {eventTrigger,backToStart,backToEnd} 是否触发事件 回到开头 回到结尾
11773
+ * @returns {void}
11774
+ */
11627
11775
 
11628
- if (record.type === "throw") {
11629
- context.method = "throw";
11630
- context.arg = record.arg;
11631
- context.delegate = null;
11632
- return ContinueSentinel;
11633
- }
11776
+ var _default$h = function _default(element, newImageIdIndex, options, callback) {
11777
+ var _options = _objectSpread$7({
11778
+ eventTrigger: true,
11779
+ backToStart: false,
11780
+ backToEnd: false
11781
+ }, options);
11634
11782
 
11635
- var info = record.arg;
11783
+ var toolData = getToolState$5(element, 'stack');
11636
11784
 
11637
- if (! info) {
11638
- context.method = "throw";
11639
- context.arg = new TypeError("iterator result is not an object");
11640
- context.delegate = null;
11641
- return ContinueSentinel;
11642
- }
11785
+ if (!toolData || !toolData.data || !toolData.data.length) {
11786
+ return;
11787
+ }
11643
11788
 
11644
- if (info.done) {
11645
- // Assign the result of the finished delegate to the temporary
11646
- // variable specified by delegate.resultName (see delegateYield).
11647
- context[delegate.resultName] = info.value;
11789
+ var cornerstone = external$9.cornerstone; // If we have more than one stack, check if we have a stack renderer defined
11648
11790
 
11649
- // Resume execution at the desired location (see delegateYield).
11650
- context.next = delegate.nextLoc;
11791
+ var stackRenderer;
11651
11792
 
11652
- // If context.method was "throw" but the delegate handled the
11653
- // exception, let the outer generator proceed normally. If
11654
- // context.method was "next", forget context.arg since it has been
11655
- // "consumed" by the delegate iterator. If context.method was
11656
- // "return", allow the original .return call to continue in the
11657
- // outer generator.
11658
- if (context.method !== "return") {
11659
- context.method = "next";
11660
- context.arg = undefined$1;
11661
- }
11793
+ if (toolData.data.length > 1) {
11794
+ var stackRendererData = getToolState$5(element, 'stackRenderer');
11662
11795
 
11663
- } else {
11664
- // Re-yield the result returned by the delegate method.
11665
- return info;
11796
+ if (stackRendererData && stackRendererData.data && stackRendererData.data.length) {
11797
+ stackRenderer = stackRendererData.data[0];
11666
11798
  }
11667
-
11668
- // The delegate iterator is finished, so forget it and continue with
11669
- // the outer generator.
11670
- context.delegate = null;
11671
- return ContinueSentinel;
11672
11799
  }
11673
11800
 
11674
- // Define Generator.prototype.{next,throw,return} in terms of the
11675
- // unified ._invoke helper method.
11676
- defineIteratorMethods(Gp);
11801
+ var stackData = toolData.data[0]; // Allow for negative indexing
11677
11802
 
11678
- define(Gp, toStringTagSymbol, "Generator");
11803
+ if (newImageIdIndex < 0) {
11804
+ newImageIdIndex += stackData.imageIds.length;
11805
+ }
11679
11806
 
11680
- // A Generator should always return itself as the iterator object when the
11681
- // @@iterator function is called on it. Some browsers' implementations of the
11682
- // iterator prototype chain incorrectly implement this, causing the Generator
11683
- // object to not be returned from this call. This ensures that doesn't happen.
11684
- // See https://github.com/facebook/regenerator/issues/274 for more details.
11685
- Gp[iteratorSymbol] = function() {
11686
- return this;
11687
- };
11807
+ var startLoadingHandler = loadHandlerManager.getStartLoadHandler(element);
11808
+ var endLoadingHandler = loadHandlerManager.getEndLoadHandler(element);
11809
+ var errorLoadingHandler = loadHandlerManager.getErrorLoadingHandler(element);
11688
11810
 
11689
- Gp.toString = function() {
11690
- return "[object Generator]";
11691
- };
11811
+ function doneCallback(image) {
11812
+ if (stackData.currentImageIdIndex !== newImageIdIndex) {
11813
+ return;
11814
+ } // Check if the element is still enabled in Cornerstone,
11815
+ // If an error is thrown, stop here.
11692
11816
 
11693
- function pushTryEntry(locs) {
11694
- var entry = { tryLoc: locs[0] };
11695
11817
 
11696
- if (1 in locs) {
11697
- entry.catchLoc = locs[1];
11818
+ try {
11819
+ // TODO: Add 'isElementEnabled' to Cornerstone?
11820
+ cornerstone.getEnabledElement(element);
11821
+ } catch (error) {
11822
+ return;
11698
11823
  }
11699
11824
 
11700
- if (2 in locs) {
11701
- entry.finallyLoc = locs[2];
11702
- entry.afterLoc = locs[3];
11825
+ if (stackRenderer) {
11826
+ stackRenderer.currentImageIdIndex = newImageIdIndex;
11827
+ stackRenderer.render(element, toolData.data);
11828
+ } else {
11829
+ cornerstone.displayImage(element, image);
11703
11830
  }
11704
11831
 
11705
- this.tryEntries.push(entry);
11706
- }
11832
+ if (endLoadingHandler) {
11833
+ endLoadingHandler(element, image);
11834
+ }
11707
11835
 
11708
- function resetTryEntry(entry) {
11709
- var record = entry.completion || {};
11710
- record.type = "normal";
11711
- delete record.arg;
11712
- entry.completion = record;
11836
+ if (callback) {
11837
+ callback({
11838
+ type: 'done',
11839
+ element: element
11840
+ });
11841
+ }
11713
11842
  }
11714
11843
 
11715
- function Context(tryLocsList) {
11716
- // The root entry object (effectively a try statement without a catch
11717
- // or a finally block) gives us a place to store values thrown from
11718
- // locations where there is no enclosing try statement.
11719
- this.tryEntries = [{ tryLoc: "root" }];
11720
- tryLocsList.forEach(pushTryEntry, this);
11721
- this.reset(true);
11722
- }
11844
+ function failCallback(error) {
11845
+ var imageId = stackData.imageIds[newImageIdIndex];
11723
11846
 
11724
- exports.keys = function(object) {
11725
- var keys = [];
11726
- for (var key in object) {
11727
- keys.push(key);
11847
+ if (errorLoadingHandler) {
11848
+ errorLoadingHandler(element, imageId, error);
11728
11849
  }
11729
- keys.reverse();
11730
-
11731
- // Rather than returning an object with a next method, we keep
11732
- // things simple and return the next function itself.
11733
- return function next() {
11734
- while (keys.length) {
11735
- var key = keys.pop();
11736
- if (key in object) {
11737
- next.value = key;
11738
- next.done = false;
11739
- return next;
11740
- }
11741
- }
11742
11850
 
11743
- // To avoid creating an additional object, we just hang the .value
11744
- // and .done properties off the next function object itself. This
11745
- // also ensures that the minifier will not anonymize the function.
11746
- next.done = true;
11747
- return next;
11748
- };
11749
- };
11851
+ if (callback) {
11852
+ callback({
11853
+ type: 'fail',
11854
+ element: element,
11855
+ imageId: imageId,
11856
+ error: error
11857
+ });
11858
+ }
11859
+ }
11750
11860
 
11751
- function values(iterable) {
11752
- if (iterable) {
11753
- var iteratorMethod = iterable[iteratorSymbol];
11754
- if (iteratorMethod) {
11755
- return iteratorMethod.call(iterable);
11756
- }
11861
+ if (newImageIdIndex === stackData.currentImageIdIndex) {
11862
+ return;
11863
+ }
11757
11864
 
11758
- if (typeof iterable.next === "function") {
11759
- return iterable;
11760
- }
11865
+ if (startLoadingHandler) {
11866
+ startLoadingHandler(element);
11867
+ }
11761
11868
 
11762
- if (!isNaN(iterable.length)) {
11763
- var i = -1, next = function next() {
11764
- while (++i < iterable.length) {
11765
- if (hasOwn.call(iterable, i)) {
11766
- next.value = iterable[i];
11767
- next.done = false;
11768
- return next;
11769
- }
11770
- }
11869
+ var eventData = _objectSpread$7({
11870
+ newImageIdIndex: newImageIdIndex,
11871
+ direction: newImageIdIndex - stackData.currentImageIdIndex
11872
+ }, _options);
11771
11873
 
11772
- next.value = undefined$1;
11773
- next.done = true;
11874
+ stackData.currentImageIdIndex = newImageIdIndex;
11875
+ var newImageId = stackData.imageIds[newImageIdIndex]; // Retry image loading in cases where previous image promise
11876
+ // Was rejected, if the option is set
11774
11877
 
11775
- return next;
11776
- };
11878
+ /*
11879
+ Const config = stackScroll.getConfiguration();
11880
+ TODO: Revisit this. It appears that Core's imageCache is not
11881
+ keeping rejected promises anywhere, so we have no way to know
11882
+ if something was previously rejected.
11883
+ if (config && config.retryLoadOnScroll === true) {
11884
+ }
11885
+ */
11886
+ // Convert the preventCache value in stack data to a boolean
11777
11887
 
11778
- return next.next = next;
11779
- }
11780
- }
11888
+ var preventCache = Boolean(stackData.preventCache);
11889
+ var imagePromise;
11781
11890
 
11782
- // Return an iterator with no values.
11783
- return { next: doneResult };
11891
+ if (preventCache) {
11892
+ imagePromise = cornerstone.loadImage(newImageId);
11893
+ } else {
11894
+ imagePromise = loadAndCacheImagePlus(newImageId);
11784
11895
  }
11785
- exports.values = values;
11786
11896
 
11787
- function doneResult() {
11788
- return { value: undefined$1, done: true };
11897
+ imagePromise.then(doneCallback, failCallback);
11898
+
11899
+ if (_options.eventTrigger) {
11900
+ triggerEvent$2(element, EVENTS$2.STACK_SCROLL, eventData);
11789
11901
  }
11902
+ };
11790
11903
 
11791
- Context.prototype = {
11792
- constructor: Context,
11904
+ (function () {
11905
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11793
11906
 
11794
- reset: function(skipTempReset) {
11795
- this.prev = 0;
11796
- this.next = 0;
11797
- // Resetting context._sent for legacy support of Babel's
11798
- // function.sent implementation.
11799
- this.sent = this._sent = undefined$1;
11800
- this.done = false;
11801
- this.delegate = null;
11907
+ if (!reactHotLoader) {
11908
+ return;
11909
+ }
11802
11910
 
11803
- this.method = "next";
11804
- this.arg = undefined$1;
11911
+ reactHotLoader.register(triggerEvent$2, "triggerEvent", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11912
+ reactHotLoader.register(external$9, "external", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11913
+ reactHotLoader.register(getToolState$5, "getToolState", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11914
+ reactHotLoader.register(loadHandlerManager, "loadHandlerManager", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11915
+ reactHotLoader.register(EVENTS$2, "EVENTS", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11916
+ reactHotLoader.register(_default$h, "default", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11917
+ })();
11805
11918
 
11806
- this.tryEntries.forEach(resetTryEntry);
11919
+ (function () {
11920
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11921
+ leaveModule && leaveModule(module);
11922
+ })();
11807
11923
 
11808
- if (!skipTempReset) {
11809
- for (var name in this) {
11810
- // Not sure about the optimal order of these conditions:
11811
- if (name.charAt(0) === "t" &&
11812
- hasOwn.call(this, name) &&
11813
- !isNaN(+name.slice(1))) {
11814
- this[name] = undefined$1;
11815
- }
11816
- }
11817
- }
11818
- },
11924
+ (function () {
11925
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11926
+ enterModule && enterModule(module);
11927
+ })();
11819
11928
 
11820
- stop: function() {
11821
- this.done = true;
11929
+ var __signature__$J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11930
+ return a;
11931
+ };
11822
11932
 
11823
- var rootEntry = this.tryEntries[0];
11824
- var rootRecord = rootEntry.completion;
11825
- if (rootRecord.type === "throw") {
11826
- throw rootRecord.arg;
11827
- }
11933
+ /*
11934
+ *****************************************************************
11935
+ * C O P Y R I G H T (c) 2018-2019
11936
+ * Suzhou Chainz Medical Technology Co.
11937
+ * All Rights Reserved
11938
+ *****************************************************************
11939
+ *
11940
+ * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
11941
+ * Suzhou Chainz Medical Technology Co.
11942
+ * The copyright notice above does not evidence any
11943
+ * actual or intended publication of such source code.
11944
+ *
11945
+ *****************************************************************
11946
+ *
11947
+ * Author: Zhang Jiaqi
11948
+ *
11949
+ */
11950
+ var ImageProcessType = {
11951
+ Unkown: 0,
11828
11952
 
11829
- return this.rval;
11830
- },
11953
+ /**
11954
+ * 最大密度投影
11955
+ */
11956
+ MIP: 1,
11831
11957
 
11832
- dispatchException: function(exception) {
11833
- if (this.done) {
11834
- throw exception;
11835
- }
11958
+ /**
11959
+ * 多平面重建
11960
+ */
11961
+ MPR: 2,
11836
11962
 
11837
- var context = this;
11838
- function handle(loc, caught) {
11839
- record.type = "throw";
11840
- record.arg = exception;
11841
- context.next = loc;
11963
+ /**
11964
+ * 曲面重建
11965
+ */
11966
+ CPR: 3,
11842
11967
 
11843
- if (caught) {
11844
- // If the dispatched exception was caught by a catch block,
11845
- // then let that catch block handle the exception normally.
11846
- context.method = "next";
11847
- context.arg = undefined$1;
11848
- }
11968
+ /**
11969
+ * 表面重建
11970
+ */
11971
+ SSD: 4,
11849
11972
 
11850
- return !! caught;
11851
- }
11973
+ /**
11974
+ * VR
11975
+ */
11976
+ VR: 5,
11852
11977
 
11853
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11854
- var entry = this.tryEntries[i];
11855
- var record = entry.completion;
11978
+ /**
11979
+ * 穿刺
11980
+ */
11981
+ Centesis: 6
11982
+ };
11983
+ var _default$i = {
11984
+ ImageProcessType: ImageProcessType
11985
+ };
11856
11986
 
11857
- if (entry.tryLoc === "root") {
11858
- // Exception thrown outside of any try block that could handle
11859
- // it, so set the completion value of the entire function to
11860
- // throw the exception.
11861
- return handle("end");
11862
- }
11987
+ (function () {
11988
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11863
11989
 
11864
- if (entry.tryLoc <= this.prev) {
11865
- var hasCatch = hasOwn.call(entry, "catchLoc");
11866
- var hasFinally = hasOwn.call(entry, "finallyLoc");
11990
+ if (!reactHotLoader) {
11991
+ return;
11992
+ }
11993
+
11994
+ reactHotLoader.register(ImageProcessType, "ImageProcessType", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/domain/enums/ImageProcessType.js");
11995
+ reactHotLoader.register(_default$i, "default", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/domain/enums/ImageProcessType.js");
11996
+ })();
11867
11997
 
11868
- if (hasCatch && hasFinally) {
11869
- if (this.prev < entry.catchLoc) {
11870
- return handle(entry.catchLoc, true);
11871
- } else if (this.prev < entry.finallyLoc) {
11872
- return handle(entry.finallyLoc);
11873
- }
11998
+ (function () {
11999
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
12000
+ leaveModule && leaveModule(module);
12001
+ })();
11874
12002
 
11875
- } else if (hasCatch) {
11876
- if (this.prev < entry.catchLoc) {
11877
- return handle(entry.catchLoc, true);
11878
- }
12003
+ (function () {
12004
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12005
+ enterModule && enterModule(module);
12006
+ })();
11879
12007
 
11880
- } else if (hasFinally) {
11881
- if (this.prev < entry.finallyLoc) {
11882
- return handle(entry.finallyLoc);
11883
- }
12008
+ var __signature__$K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12009
+ return a;
12010
+ };
11884
12011
 
11885
- } else {
11886
- throw new Error("try statement without catch or finally");
11887
- }
11888
- }
11889
- }
11890
- },
12012
+ /*
12013
+ *****************************************************************
12014
+ * C O P Y R I G H T (c) 2018-2019
12015
+ * Suzhou Chainz Medical Technology Co.
12016
+ * All Rights Reserved
12017
+ *****************************************************************
12018
+ *
12019
+ * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
12020
+ * Suzhou Chainz Medical Technology Co.
12021
+ * The copyright notice above does not evidence any
12022
+ * actual or intended publication of such source code.
12023
+ *
12024
+ *****************************************************************
12025
+ *
12026
+ * Author: Zhang Jiaqi
12027
+ *
12028
+ */
12029
+ var ImageProcessExceptionBase = /*#__PURE__*/function () {
12030
+ function ImageProcessExceptionBase() {
12031
+ classCallCheck(this, ImageProcessExceptionBase);
12032
+ }
11891
12033
 
11892
- abrupt: function(type, arg) {
11893
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11894
- var entry = this.tryEntries[i];
11895
- if (entry.tryLoc <= this.prev &&
11896
- hasOwn.call(entry, "finallyLoc") &&
11897
- this.prev < entry.finallyLoc) {
11898
- var finallyEntry = entry;
11899
- break;
11900
- }
11901
- }
12034
+ createClass(ImageProcessExceptionBase, [{
12035
+ key: "toString",
12036
+ value: function toString() {
12037
+ return this.message;
12038
+ }
12039
+ }, {
12040
+ key: "__reactstandin__regenerateByEval",
12041
+ // @ts-ignore
12042
+ value: function __reactstandin__regenerateByEval(key, code) {
12043
+ // @ts-ignore
12044
+ this[key] = eval(code);
12045
+ }
12046
+ }, {
12047
+ key: "message",
12048
+ get: function get() {
12049
+ return "未知错误";
12050
+ }
12051
+ }]);
11902
12052
 
11903
- if (finallyEntry &&
11904
- (type === "break" ||
11905
- type === "continue") &&
11906
- finallyEntry.tryLoc <= arg &&
11907
- arg <= finallyEntry.finallyLoc) {
11908
- // Ignore the finally entry if control is not jumping to a
11909
- // location outside the try/catch block.
11910
- finallyEntry = null;
11911
- }
12053
+ return ImageProcessExceptionBase;
12054
+ }();
11912
12055
 
11913
- var record = finallyEntry ? finallyEntry.completion : {};
11914
- record.type = type;
11915
- record.arg = arg;
12056
+ (function () {
12057
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11916
12058
 
11917
- if (finallyEntry) {
11918
- this.method = "next";
11919
- this.next = finallyEntry.finallyLoc;
11920
- return ContinueSentinel;
11921
- }
12059
+ if (!reactHotLoader) {
12060
+ return;
12061
+ }
11922
12062
 
11923
- return this.complete(record);
11924
- },
12063
+ reactHotLoader.register(ImageProcessExceptionBase, "ImageProcessExceptionBase", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/exceptions/ImageProcessExceptionBase.js");
12064
+ })();
11925
12065
 
11926
- complete: function(record, afterLoc) {
11927
- if (record.type === "throw") {
11928
- throw record.arg;
11929
- }
12066
+ (function () {
12067
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
12068
+ leaveModule && leaveModule(module);
12069
+ })();
11930
12070
 
11931
- if (record.type === "break" ||
11932
- record.type === "continue") {
11933
- this.next = record.arg;
11934
- } else if (record.type === "return") {
11935
- this.rval = this.arg = record.arg;
11936
- this.method = "return";
11937
- this.next = "end";
11938
- } else if (record.type === "normal" && afterLoc) {
11939
- this.next = afterLoc;
11940
- }
12071
+ (function () {
12072
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12073
+ enterModule && enterModule(module);
12074
+ })();
11941
12075
 
11942
- return ContinueSentinel;
11943
- },
12076
+ function _createSuper$d(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$d(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }
11944
12077
 
11945
- finish: function(finallyLoc) {
11946
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11947
- var entry = this.tryEntries[i];
11948
- if (entry.finallyLoc === finallyLoc) {
11949
- this.complete(entry.completion, entry.afterLoc);
11950
- resetTryEntry(entry);
11951
- return ContinueSentinel;
11952
- }
11953
- }
11954
- },
12078
+ function _isNativeReflectConstruct$d() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
11955
12079
 
11956
- "catch": function(tryLoc) {
11957
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11958
- var entry = this.tryEntries[i];
11959
- if (entry.tryLoc === tryLoc) {
11960
- var record = entry.completion;
11961
- if (record.type === "throw") {
11962
- var thrown = record.arg;
11963
- resetTryEntry(entry);
11964
- }
11965
- return thrown;
11966
- }
11967
- }
12080
+ var __signature__$L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12081
+ return a;
12082
+ };
11968
12083
 
11969
- // The context.catch method must only be called with a location
11970
- // argument that corresponds to a known catch block.
11971
- throw new Error("illegal catch attempt");
11972
- },
12084
+ var NotSupportImageProcessTypeException = /*#__PURE__*/function (_ImageProcessExceptio) {
12085
+ inherits(NotSupportImageProcessTypeException, _ImageProcessExceptio);
11973
12086
 
11974
- delegateYield: function(iterable, resultName, nextLoc) {
11975
- this.delegate = {
11976
- iterator: values(iterable),
11977
- resultName: resultName,
11978
- nextLoc: nextLoc
11979
- };
12087
+ var _super = _createSuper$d(NotSupportImageProcessTypeException);
11980
12088
 
11981
- if (this.method === "next") {
11982
- // Deliberately forget the last sent value so that we don't
11983
- // accidentally pass it on to the delegate.
11984
- this.arg = undefined$1;
11985
- }
12089
+ function NotSupportImageProcessTypeException(text) {
12090
+ var _this;
11986
12091
 
11987
- return ContinueSentinel;
11988
- }
11989
- };
12092
+ classCallCheck(this, NotSupportImageProcessTypeException);
11990
12093
 
11991
- // Regardless of whether this script is executing as a CommonJS module
11992
- // or not, return the runtime object so that we can declare the variable
11993
- // regeneratorRuntime in the outer scope, which allows this module to be
11994
- // injected easily by `bin/regenerator --include-runtime script.js`.
11995
- return exports;
12094
+ _this = _super.call(this);
12095
+ _this.orientType = text;
12096
+ return _this;
12097
+ }
11996
12098
 
11997
- }(
11998
- // If this script is executing as a CommonJS module, use module.exports
11999
- // as the regeneratorRuntime namespace. Otherwise create a new empty
12000
- // object. Either way, the resulting object will be used to initialize
12001
- // the regeneratorRuntime variable at the top of this file.
12002
- module.exports
12003
- ));
12099
+ createClass(NotSupportImageProcessTypeException, [{
12100
+ key: "__reactstandin__regenerateByEval",
12101
+ // @ts-ignore
12102
+ value: function __reactstandin__regenerateByEval(key, code) {
12103
+ // @ts-ignore
12104
+ this[key] = eval(code);
12105
+ }
12106
+ }, {
12107
+ key: "message",
12108
+ get: function get() {
12109
+ return String.format("未支持的图像后处理类型 -- {0}", this.orientType);
12110
+ }
12111
+ }]);
12004
12112
 
12005
- try {
12006
- regeneratorRuntime = runtime;
12007
- } catch (accidentalStrictMode) {
12008
- // This module should not be running in strict mode, so the above
12009
- // assignment should always work unless something is misconfigured. Just
12010
- // in case runtime.js accidentally runs in strict mode, we can escape
12011
- // strict mode using a global Function call. This could conceivably fail
12012
- // if a Content Security Policy forbids using Function, but in that case
12013
- // the proper solution is to fix the accidental strict mode problem. If
12014
- // you've misconfigured your bundler to force strict mode and applied a
12015
- // CSP to forbid Function, and you're not willing to fix either of those
12016
- // problems, please detail your unique predicament in a GitHub issue.
12017
- Function("r", "regeneratorRuntime = r")(runtime);
12018
- }
12019
- });
12113
+ return NotSupportImageProcessTypeException;
12114
+ }(ImageProcessExceptionBase);
12020
12115
 
12021
- var regenerator = runtime_1;
12116
+ (function () {
12117
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
12022
12118
 
12023
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
12024
- try {
12025
- var info = gen[key](arg);
12026
- var value = info.value;
12027
- } catch (error) {
12028
- reject(error);
12119
+ if (!reactHotLoader) {
12029
12120
  return;
12030
12121
  }
12031
12122
 
12032
- if (info.done) {
12033
- resolve(value);
12034
- } else {
12035
- Promise.resolve(value).then(_next, _throw);
12036
- }
12123
+ reactHotLoader.register(NotSupportImageProcessTypeException, "NotSupportImageProcessTypeException", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/exceptions/NotSupportImageProcessTypeException.js");
12124
+ })();
12125
+
12126
+ (function () {
12127
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
12128
+ leaveModule && leaveModule(module);
12129
+ })();
12130
+
12131
+ function _arrayWithoutHoles(arr) {
12132
+ if (Array.isArray(arr)) return arrayLikeToArray(arr);
12037
12133
  }
12038
12134
 
12039
- function _asyncToGenerator(fn) {
12040
- return function () {
12041
- var self = this,
12042
- args = arguments;
12043
- return new Promise(function (resolve, reject) {
12044
- var gen = fn.apply(self, args);
12135
+ var arrayWithoutHoles = _arrayWithoutHoles;
12045
12136
 
12046
- function _next(value) {
12047
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
12048
- }
12137
+ function _iterableToArray(iter) {
12138
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
12139
+ }
12049
12140
 
12050
- function _throw(err) {
12051
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
12052
- }
12141
+ var iterableToArray = _iterableToArray;
12053
12142
 
12054
- _next(undefined);
12055
- });
12056
- };
12143
+ function _nonIterableSpread() {
12144
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
12057
12145
  }
12058
12146
 
12059
- var asyncToGenerator = _asyncToGenerator;
12147
+ var nonIterableSpread = _nonIterableSpread;
12148
+
12149
+ function _toConsumableArray(arr) {
12150
+ return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
12151
+ }
12152
+
12153
+ var toConsumableArray = _toConsumableArray;
12060
12154
 
12061
12155
  (function () {
12062
12156
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12063
12157
  enterModule && enterModule(module);
12064
12158
  })();
12065
12159
 
12066
- var __signature__$L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12160
+ var __signature__$M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12067
12161
  return a;
12068
12162
  };
12069
12163
 
@@ -12136,7 +12230,7 @@ var _default$j = {
12136
12230
  enterModule && enterModule(module);
12137
12231
  })();
12138
12232
 
12139
- var __signature__$M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12233
+ var __signature__$N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12140
12234
  return a;
12141
12235
  };
12142
12236
 
@@ -12208,7 +12302,7 @@ function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeRefl
12208
12302
 
12209
12303
  function _isNativeReflectConstruct$e() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
12210
12304
 
12211
- var __signature__$N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12305
+ var __signature__$O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12212
12306
  return a;
12213
12307
  };
12214
12308
 
@@ -12264,7 +12358,7 @@ var ActionParameterNotMatchException = /*#__PURE__*/function (_ImageProcessExcep
12264
12358
  enterModule && enterModule(module);
12265
12359
  })();
12266
12360
 
12267
- var __signature__$O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12361
+ var __signature__$P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12268
12362
  return a;
12269
12363
  };
12270
12364
 
@@ -12369,7 +12463,7 @@ function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeRefl
12369
12463
 
12370
12464
  function _isNativeReflectConstruct$f() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
12371
12465
 
12372
- var __signature__$P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12466
+ var __signature__$Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12373
12467
  return a;
12374
12468
  };
12375
12469
 
@@ -12431,7 +12525,7 @@ function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o
12431
12525
 
12432
12526
  function _arrayLikeToArray$1(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12433
12527
 
12434
- var __signature__$Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12528
+ var __signature__$R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12435
12529
  return a;
12436
12530
  };
12437
12531
 
@@ -12830,7 +12924,7 @@ var pointInRect = function pointInRect(rect, point) {
12830
12924
  enterModule && enterModule(module);
12831
12925
  })();
12832
12926
 
12833
- var __signature__$R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12927
+ var __signature__$S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12834
12928
  return a;
12835
12929
  };
12836
12930
 
@@ -12918,7 +13012,7 @@ function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o
12918
13012
 
12919
13013
  function _arrayLikeToArray$2(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
12920
13014
 
12921
- var __signature__$S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13015
+ var __signature__$T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12922
13016
  return a;
12923
13017
  };
12924
13018
  var _ComputeVectorAngle = computeVectorAngle;
@@ -13443,7 +13537,7 @@ var computeImageViewDirection = function computeImageViewDirection(imagePosition
13443
13537
  enterModule && enterModule(module);
13444
13538
  })();
13445
13539
 
13446
- var __signature__$T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13540
+ var __signature__$U = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13447
13541
  return a;
13448
13542
  };
13449
13543
 
@@ -13545,7 +13639,7 @@ function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeRefl
13545
13639
 
13546
13640
  function _isNativeReflectConstruct$g() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
13547
13641
 
13548
- var __signature__$U = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13642
+ var __signature__$V = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13549
13643
  return a;
13550
13644
  };
13551
13645
 
@@ -13601,7 +13695,7 @@ var InvalidImageException = /*#__PURE__*/function (_ImageProcessExceptio) {
13601
13695
  enterModule && enterModule(module);
13602
13696
  })();
13603
13697
 
13604
- var __signature__$V = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13698
+ var __signature__$W = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13605
13699
  return a;
13606
13700
  };
13607
13701
 
@@ -13651,7 +13745,7 @@ var RuntimeLogger = /*#__PURE__*/function () {
13651
13745
  enterModule && enterModule(module);
13652
13746
  })();
13653
13747
 
13654
- var __signature__$W = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13748
+ var __signature__$X = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13655
13749
  return a;
13656
13750
  };
13657
13751
 
@@ -13788,7 +13882,7 @@ defineProperty(CacheDataHelper, "InstanceGuid", "43A732CA-0C4A-4871-8413-28952F1
13788
13882
  enterModule && enterModule(module);
13789
13883
  })();
13790
13884
 
13791
- var __signature__$X = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13885
+ var __signature__$Y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13792
13886
  return a;
13793
13887
  };
13794
13888
 
@@ -13854,7 +13948,7 @@ var ImageDataCache = /*#__PURE__*/function () {
13854
13948
  enterModule && enterModule(module);
13855
13949
  })();
13856
13950
 
13857
- var __signature__$Y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13951
+ var __signature__$Z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13858
13952
  return a;
13859
13953
  };
13860
13954
 
@@ -14382,7 +14476,7 @@ function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeRefl
14382
14476
 
14383
14477
  function _isNativeReflectConstruct$h() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
14384
14478
 
14385
- var __signature__$Z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14479
+ var __signature__$_ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14386
14480
  return a;
14387
14481
  };
14388
14482
 
@@ -14438,7 +14532,7 @@ var NullReferencedException = /*#__PURE__*/function (_ImageProcessExceptio) {
14438
14532
  enterModule && enterModule(module);
14439
14533
  })();
14440
14534
 
14441
- var __signature__$_ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14535
+ var __signature__$$ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14442
14536
  return a;
14443
14537
  };
14444
14538
  /**
@@ -14535,7 +14629,7 @@ function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeRefl
14535
14629
 
14536
14630
  function _isNativeReflectConstruct$i() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
14537
14631
 
14538
- var __signature__$$ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14632
+ var __signature__$10 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14539
14633
  return a;
14540
14634
  };
14541
14635
 
@@ -14895,7 +14989,7 @@ var forEach = function () {
14895
14989
  enterModule && enterModule(module);
14896
14990
  })();
14897
14991
 
14898
- var __signature__$10 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14992
+ var __signature__$11 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14899
14993
  return a;
14900
14994
  };
14901
14995
 
@@ -14938,7 +15032,7 @@ function guid() {
14938
15032
  enterModule && enterModule(module);
14939
15033
  })();
14940
15034
 
14941
- var __signature__$11 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15035
+ var __signature__$12 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14942
15036
  return a;
14943
15037
  };
14944
15038
  /**
@@ -15011,7 +15105,7 @@ function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeRefl
15011
15105
 
15012
15106
  function _isNativeReflectConstruct$j() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
15013
15107
 
15014
- var __signature__$12 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15108
+ var __signature__$13 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15015
15109
  return a;
15016
15110
  };
15017
15111
 
@@ -15698,7 +15792,7 @@ function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if
15698
15792
 
15699
15793
  function _objectSpread$8(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$8(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$8(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
15700
15794
 
15701
- var __signature__$13 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15795
+ var __signature__$14 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15702
15796
  return a;
15703
15797
  };
15704
15798
  // vtkImageInterpolator methods
@@ -16236,7 +16330,7 @@ var _default$m = {
16236
16330
  enterModule && enterModule(module);
16237
16331
  })();
16238
16332
 
16239
- var __signature__$14 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
16333
+ var __signature__$15 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
16240
16334
  return a;
16241
16335
  };
16242
16336
 
@@ -17299,7 +17393,7 @@ var _default$n = {
17299
17393
  enterModule && enterModule(module);
17300
17394
  })();
17301
17395
 
17302
- var __signature__$15 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17396
+ var __signature__$16 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17303
17397
  return a;
17304
17398
  };
17305
17399
  var vtkErrorMacro$1 = macro.vtkErrorMacro; // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -17468,7 +17562,7 @@ function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeRefl
17468
17562
 
17469
17563
  function _isNativeReflectConstruct$k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
17470
17564
 
17471
- var __signature__$16 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17565
+ var __signature__$17 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17472
17566
  return a;
17473
17567
  };
17474
17568
 
@@ -18039,7 +18133,7 @@ var MprImageProcessorWorkerImpl = /*#__PURE__*/function (_ImageProcessorWorker)
18039
18133
  enterModule && enterModule(module);
18040
18134
  })();
18041
18135
 
18042
- var __signature__$17 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18136
+ var __signature__$18 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18043
18137
  return a;
18044
18138
  };
18045
18139
 
@@ -18102,7 +18196,7 @@ var PresentColor = {
18102
18196
  enterModule && enterModule(module);
18103
18197
  })();
18104
18198
 
18105
- var __signature__$18 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18199
+ var __signature__$19 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18106
18200
  return a;
18107
18201
  };
18108
18202
 
@@ -18186,7 +18280,7 @@ var InteractorStyleActionMode = {
18186
18280
  enterModule && enterModule(module);
18187
18281
  })();
18188
18282
 
18189
- var __signature__$19 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18283
+ var __signature__$1a = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18190
18284
  return a;
18191
18285
  };
18192
18286
 
@@ -18272,7 +18366,7 @@ function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeRefl
18272
18366
 
18273
18367
  function _isNativeReflectConstruct$l() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
18274
18368
 
18275
- var __signature__$1a = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18369
+ var __signature__$1b = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18276
18370
  return a;
18277
18371
  };
18278
18372
  var MipPixelSegment = /*#__PURE__*/function () {
@@ -18979,7 +19073,7 @@ var MipActionParameterImpl = /*#__PURE__*/function (_ActionParameter) {
18979
19073
  enterModule && enterModule(module);
18980
19074
  })();
18981
19075
 
18982
- var __signature__$1b = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19076
+ var __signature__$1c = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18983
19077
  return a;
18984
19078
  };
18985
19079
 
@@ -19109,7 +19203,7 @@ function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeRefl
19109
19203
 
19110
19204
  function _isNativeReflectConstruct$m() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
19111
19205
 
19112
- var __signature__$1c = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19206
+ var __signature__$1d = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19113
19207
  return a;
19114
19208
  };
19115
19209
 
@@ -19229,7 +19323,7 @@ function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeRefl
19229
19323
 
19230
19324
  function _isNativeReflectConstruct$n() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
19231
19325
 
19232
- var __signature__$1d = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19326
+ var __signature__$1e = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19233
19327
  return a;
19234
19328
  };
19235
19329
 
@@ -19348,7 +19442,7 @@ function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeRefl
19348
19442
 
19349
19443
  function _isNativeReflectConstruct$o() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
19350
19444
 
19351
- var __signature__$1e = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19445
+ var __signature__$1f = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19352
19446
  return a;
19353
19447
  };
19354
19448
 
@@ -19464,7 +19558,7 @@ defineProperty(CameraEyeSightHelper_RHLF, "Instance", new CameraEyeSightHelper_R
19464
19558
  enterModule && enterModule(module);
19465
19559
  })();
19466
19560
 
19467
- var __signature__$1f = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19561
+ var __signature__$1g = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19468
19562
  return a;
19469
19563
  };
19470
19564
  /**
@@ -19588,7 +19682,7 @@ defineProperty(CameraHelper, "_eyeSightFuncs", new Map([[ImagePlanViewDirection.
19588
19682
  enterModule && enterModule(module);
19589
19683
  })();
19590
19684
 
19591
- var __signature__$1g = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19685
+ var __signature__$1h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19592
19686
  return a;
19593
19687
  };
19594
19688
  var States = vtkInteractorStyleConstants.States;
@@ -20245,7 +20339,7 @@ function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeRefl
20245
20339
 
20246
20340
  function _isNativeReflectConstruct$p() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
20247
20341
 
20248
- var __signature__$1h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
20342
+ var __signature__$1i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
20249
20343
  return a;
20250
20344
  };
20251
20345
 
@@ -21447,7 +21541,7 @@ function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeRefl
21447
21541
 
21448
21542
  function _isNativeReflectConstruct$q() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
21449
21543
 
21450
- var __signature__$1i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21544
+ var __signature__$1j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21451
21545
  return a;
21452
21546
  };
21453
21547
  /**
@@ -21573,7 +21667,7 @@ var CentesisImageResultData = /*#__PURE__*/function (_MprImageResultData) {
21573
21667
  enterModule && enterModule(module);
21574
21668
  })();
21575
21669
 
21576
- var __signature__$1j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21670
+ var __signature__$1k = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21577
21671
  return a;
21578
21672
  };
21579
21673
  /**
@@ -21776,7 +21870,7 @@ function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeRefl
21776
21870
 
21777
21871
  function _isNativeReflectConstruct$r() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
21778
21872
 
21779
- var __signature__$1k = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21873
+ var __signature__$1l = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21780
21874
  return a;
21781
21875
  };
21782
21876
  /**
@@ -22640,7 +22734,7 @@ function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeRefl
22640
22734
 
22641
22735
  function _isNativeReflectConstruct$s() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
22642
22736
 
22643
- var __signature__$1l = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
22737
+ var __signature__$1m = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
22644
22738
  return a;
22645
22739
  };
22646
22740
 
@@ -23026,7 +23120,7 @@ var CentesisImageProcessorWorkerImpl = /*#__PURE__*/function (_ImageProcessorWor
23026
23120
  enterModule && enterModule(module);
23027
23121
  })();
23028
23122
 
23029
- var __signature__$1m = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23123
+ var __signature__$1n = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23030
23124
  return a;
23031
23125
  };
23032
23126
  var workerCache = {};
@@ -23141,7 +23235,7 @@ function _unsupportedIterableToArray$5(o, minLen) { if (!o) return; if (typeof o
23141
23235
 
23142
23236
  function _arrayLikeToArray$5(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
23143
23237
 
23144
- var __signature__$1n = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23238
+ var __signature__$1o = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23145
23239
  return a;
23146
23240
  };
23147
23241
  var external$a = cornerstoneTools.external,
@@ -23233,7 +23327,7 @@ function changeMprPositionWithElement(element, positionChange, type) {
23233
23327
  enterModule && enterModule(module);
23234
23328
  })();
23235
23329
 
23236
- var __signature__$1o = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23330
+ var __signature__$1p = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23237
23331
  return a;
23238
23332
  };
23239
23333
  var clip = cornerstoneTools.importInternal('util/clip');
@@ -23412,7 +23506,7 @@ function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeRefl
23412
23506
 
23413
23507
  function _isNativeReflectConstruct$t() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
23414
23508
 
23415
- var __signature__$1p = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23509
+ var __signature__$1q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23416
23510
  return a;
23417
23511
  };
23418
23512
  var BaseTool$6 = cornerstoneTools.importInternal('base/BaseTool');
@@ -23499,7 +23593,7 @@ var StackScrollMouseWheelTool = /*#__PURE__*/function (_BaseTool) {
23499
23593
  enterModule && enterModule(module);
23500
23594
  })();
23501
23595
 
23502
- var __signature__$1q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23596
+ var __signature__$1r = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23503
23597
  return a;
23504
23598
  };
23505
23599
 
@@ -23677,7 +23771,7 @@ function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeRefl
23677
23771
 
23678
23772
  function _isNativeReflectConstruct$u() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
23679
23773
 
23680
- var __signature__$1r = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23774
+ var __signature__$1s = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23681
23775
  return a;
23682
23776
  };
23683
23777
  var BaseTool$7 = cornerstoneTools.importInternal('base/BaseTool');
@@ -23838,7 +23932,7 @@ var StackScrollTool = /*#__PURE__*/function (_BaseTool) {
23838
23932
  enterModule && enterModule(module);
23839
23933
  })();
23840
23934
 
23841
- var __signature__$1s = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23935
+ var __signature__$1t = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23842
23936
  return a;
23843
23937
  };
23844
23938
  var external$c = cornerstoneTools.external;
@@ -23981,7 +24075,7 @@ function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeRefl
23981
24075
 
23982
24076
  function _isNativeReflectConstruct$v() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
23983
24077
 
23984
- var __signature__$1t = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24078
+ var __signature__$1u = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23985
24079
  return a;
23986
24080
  };
23987
24081
  var getNewContext$7 = cornerstoneTools.importInternal('drawing/getNewContext');
@@ -24251,7 +24345,7 @@ function uid (len) {
24251
24345
  enterModule && enterModule(module);
24252
24346
  })();
24253
24347
 
24254
- var __signature__$1u = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24348
+ var __signature__$1v = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24255
24349
  return a;
24256
24350
  };
24257
24351
 
@@ -24769,7 +24863,7 @@ function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeRefl
24769
24863
 
24770
24864
  function _isNativeReflectConstruct$w() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
24771
24865
 
24772
- var __signature__$1v = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24866
+ var __signature__$1w = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24773
24867
  return a;
24774
24868
  };
24775
24869
  var moveNewHandle$3 = cornerstoneTools.importInternal('manipulators/moveNewHandle');
@@ -25236,7 +25330,7 @@ var CTRTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
25236
25330
  enterModule && enterModule(module);
25237
25331
  })();
25238
25332
 
25239
- var __signature__$1w = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25333
+ var __signature__$1x = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25240
25334
  return a;
25241
25335
  };
25242
25336
  var planePlaneIntersection = cornerstoneTools.importInternal('util/planePlaneIntersection');
@@ -25290,7 +25384,7 @@ var _default$u = function _default(targetImagePlane, referenceImagePlane) {
25290
25384
  enterModule && enterModule(module);
25291
25385
  })();
25292
25386
 
25293
- var __signature__$1x = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25387
+ var __signature__$1y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25294
25388
  return a;
25295
25389
  };
25296
25390
  var convertToVector3 = cornerstoneTools.importInternal('util/convertToVector3');
@@ -25395,7 +25489,7 @@ function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeRefl
25395
25489
 
25396
25490
  function _isNativeReflectConstruct$x() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
25397
25491
 
25398
- var __signature__$1y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25492
+ var __signature__$1z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25399
25493
  return a;
25400
25494
  };
25401
25495
  var BaseTool$8 = cornerstoneTools.importInternal('base/BaseTool');
@@ -25571,7 +25665,7 @@ var ReferenceLinesTool = /*#__PURE__*/function (_BaseTool) {
25571
25665
  enterModule && enterModule(module);
25572
25666
  })();
25573
25667
 
25574
- var __signature__$1z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25668
+ var __signature__$1A = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25575
25669
  return a;
25576
25670
  };
25577
25671
 
@@ -25632,7 +25726,7 @@ function _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeRefl
25632
25726
 
25633
25727
  function _isNativeReflectConstruct$y() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
25634
25728
 
25635
- var __signature__$1A = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25729
+ var __signature__$1B = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25636
25730
  return a;
25637
25731
  };
25638
25732
  var getNewContext$a = cornerstoneTools.importInternal('drawing/getNewContext');
@@ -25894,7 +25988,7 @@ function _createSuper$z(Derived) { var hasNativeReflectConstruct = _isNativeRefl
25894
25988
 
25895
25989
  function _isNativeReflectConstruct$z() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
25896
25990
 
25897
- var __signature__$1B = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25991
+ var __signature__$1C = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25898
25992
  return a;
25899
25993
  };
25900
25994
  var external$i = cornerstoneTools.external;
@@ -26049,7 +26143,7 @@ function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if
26049
26143
 
26050
26144
  function _objectSpread$a(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$a(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$a(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
26051
26145
 
26052
- var __signature__$1C = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26146
+ var __signature__$1D = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26053
26147
  return a;
26054
26148
  };
26055
26149
  var EVENTS$3 = {
@@ -26461,7 +26555,7 @@ function resetToolState(element, mode) {
26461
26555
  enterModule && enterModule(module);
26462
26556
  })();
26463
26557
 
26464
- var __signature__$1D = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26558
+ var __signature__$1E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26465
26559
  return a;
26466
26560
  };
26467
26561
  var convertToVector3$3 = cornerstoneTools.importInternal('util/convertToVector3');
@@ -26502,7 +26596,7 @@ function _createSuper$A(Derived) { var hasNativeReflectConstruct = _isNativeRefl
26502
26596
 
26503
26597
  function _isNativeReflectConstruct$A() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
26504
26598
 
26505
- var __signature__$1E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26599
+ var __signature__$1F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26506
26600
  return a;
26507
26601
  };
26508
26602
  var getNewContext$c = cornerstoneTools.importInternal('drawing/getNewContext');
@@ -26948,7 +27042,7 @@ var ReferencePositionTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
26948
27042
  enterModule && enterModule(module);
26949
27043
  })();
26950
27044
 
26951
- var __signature__$1F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27045
+ var __signature__$1G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26952
27046
  return a;
26953
27047
  };
26954
27048
  var getToolState$c = cornerstoneTools.getToolState;
@@ -26985,7 +27079,7 @@ var _default$w = function _default(element) {
26985
27079
  enterModule && enterModule(module);
26986
27080
  })();
26987
27081
 
26988
- var __signature__$1G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27082
+ var __signature__$1H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26989
27083
  return a;
26990
27084
  };
26991
27085
  var scrollToIndex$1 = cornerstoneTools.importInternal('util/scrollToIndex');
@@ -27063,7 +27157,7 @@ var _default$x = {
27063
27157
  enterModule && enterModule(module);
27064
27158
  })();
27065
27159
 
27066
- var __signature__$1H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27160
+ var __signature__$1I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27067
27161
  return a;
27068
27162
  };
27069
27163
  var external$k = cornerstoneTools.external;
@@ -27350,7 +27444,7 @@ var _default$y = function _default(synchronizer, sourceElement, targetElement, e
27350
27444
  enterModule && enterModule(module);
27351
27445
  })();
27352
27446
 
27353
- var __signature__$1I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27447
+ var __signature__$1J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27354
27448
  return a;
27355
27449
  };
27356
27450
  var external$l = cornerstoneTools.external;
@@ -27504,7 +27598,7 @@ var _default$z = function _default(synchronizer, sourceElement, targetElement, e
27504
27598
  enterModule && enterModule(module);
27505
27599
  })();
27506
27600
 
27507
- var __signature__$1J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27601
+ var __signature__$1K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27508
27602
  return a;
27509
27603
  };
27510
27604
  var getToolState$e = cornerstoneTools.getToolState;
@@ -27579,7 +27673,7 @@ var _default$A = function _default(synchronizer, sourceElement, targetElement, e
27579
27673
  enterModule && enterModule(module);
27580
27674
  })();
27581
27675
 
27582
- var __signature__$1K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27676
+ var __signature__$1L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27583
27677
  return a;
27584
27678
  };
27585
27679
  var external$m = cornerstoneTools.external;
@@ -27663,7 +27757,7 @@ var _default$B = function _default(synchronizer, sourceElement, targetElement, e
27663
27757
  enterModule && enterModule(module);
27664
27758
  })();
27665
27759
 
27666
- var __signature__$1L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27760
+ var __signature__$1M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27667
27761
  return a;
27668
27762
  };
27669
27763
 
@@ -27704,7 +27798,7 @@ var _MPR_DIRECTION_COLOR;
27704
27798
  enterModule && enterModule(module);
27705
27799
  })();
27706
27800
 
27707
- var __signature__$1M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27801
+ var __signature__$1N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27708
27802
  return a;
27709
27803
  };
27710
27804
  var MPR_DIRECTION_COLOR = (_MPR_DIRECTION_COLOR = {}, defineProperty(_MPR_DIRECTION_COLOR, ImagePlanDirection.Sagittal, 'red'), defineProperty(_MPR_DIRECTION_COLOR, ImagePlanDirection.Transverse, 'greenyellow'), defineProperty(_MPR_DIRECTION_COLOR, ImagePlanDirection.Coronal, 'blue'), _MPR_DIRECTION_COLOR);
@@ -27729,7 +27823,7 @@ var MPR_DIRECTION_COLOR = (_MPR_DIRECTION_COLOR = {}, defineProperty(_MPR_DIRECT
27729
27823
  enterModule && enterModule(module);
27730
27824
  })();
27731
27825
 
27732
- var __signature__$1N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27826
+ var __signature__$1O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27733
27827
  return a;
27734
27828
  };
27735
27829
  var external$n = cornerstoneTools.external; // 两条直线求焦点
@@ -27799,7 +27893,7 @@ var _userAgent$cpu, _userAgent$device, _userAgent$os, _userAgent$os2, _userAgent
27799
27893
  enterModule && enterModule(module);
27800
27894
  })();
27801
27895
 
27802
- var __signature__$1O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27896
+ var __signature__$1P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27803
27897
  return a;
27804
27898
  };
27805
27899
 
@@ -27935,7 +28029,7 @@ var _default$D = {
27935
28029
  enterModule && enterModule(module);
27936
28030
  })();
27937
28031
 
27938
- var __signature__$1P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28032
+ var __signature__$1Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27939
28033
  return a;
27940
28034
  };
27941
28035
  var external$o = cornerstoneTools.external;
@@ -28027,7 +28121,7 @@ function _createSuper$B(Derived) { var hasNativeReflectConstruct = _isNativeRefl
28027
28121
 
28028
28122
  function _isNativeReflectConstruct$B() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
28029
28123
 
28030
- var __signature__$1Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28124
+ var __signature__$1R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28031
28125
  return a;
28032
28126
  };
28033
28127
  var external$p = cornerstoneTools.external;
@@ -28075,7 +28169,7 @@ var CrosshairsMPRTool = /*#__PURE__*/function (_BaseTool) {
28075
28169
  _this.currentDragPoint = {}; // 可旋转区域范围
28076
28170
 
28077
28171
  var isMobile = _default$D.isDeviceTypeMobile();
28078
- _this.area = isMobile ? 50 : 10; // 定位线的触发区域
28172
+ _this.area = isMobile ? 50 : 4; // 定位线的触发区域
28079
28173
 
28080
28174
  _this.centerArea = 15;
28081
28175
  _this.rotateArea = 3 / 4; // 旋转响应区域离中心点的距离(百分比
@@ -28733,7 +28827,7 @@ function _createSuper$C(Derived) { var hasNativeReflectConstruct = _isNativeRefl
28733
28827
 
28734
28828
  function _isNativeReflectConstruct$C() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
28735
28829
 
28736
- var __signature__$1R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28830
+ var __signature__$1S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28737
28831
  return a;
28738
28832
  };
28739
28833
  var external$q = cornerstoneTools.external;
@@ -28882,12 +28976,15 @@ var OverlayTool = /*#__PURE__*/function (_BaseTool) {
28882
28976
  enterModule && enterModule(module);
28883
28977
  })();
28884
28978
 
28885
- var __signature__$1S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28979
+ var __signature__$1T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28886
28980
  return a;
28887
28981
  };
28888
28982
  var cornerstoneState = {
28889
28983
  imageViewports: [],
28890
- aiResult: null
28984
+ // 常规情况下
28985
+ aiResult: null,
28986
+ allImageViewports: [] // 全部模式专用
28987
+
28891
28988
  };
28892
28989
 
28893
28990
  function init(series) {
@@ -28922,6 +29019,12 @@ function get$1(key) {
28922
29019
  return cornerstoneState.aiResult;
28923
29020
  }
28924
29021
 
29022
+ if (key === 'allImageViewports') {
29023
+ return function (index) {
29024
+ return cornerstoneState.allImageViewports[index];
29025
+ };
29026
+ }
29027
+
28925
29028
  return cornerstoneState;
28926
29029
  }
28927
29030
 
@@ -28930,6 +29033,17 @@ function set$1(key, value) {
28930
29033
  cornerstoneState.imageViewports = value;
28931
29034
  }
28932
29035
 
29036
+ if (key === 'allImageViewports') {
29037
+ cornerstoneState.allImageViewports = value;
29038
+ }
29039
+
29040
+ if (key === 'allImageViewportsImage') {
29041
+ return function (index, viewport) {
29042
+ cornerstoneState.allImageViewports[index] = lodash$1.cloneDeep(viewport);
29043
+ cornerstoneStateChangeEvent(cornerstoneState);
29044
+ };
29045
+ }
29046
+
28933
29047
  if (key === 'image') {
28934
29048
  return function (elementIdx, index, viewport) {
28935
29049
  cornerstoneState.imageViewports[elementIdx][index] = lodash$1.cloneDeep(viewport);
@@ -28996,55 +29110,6 @@ function reset$2(key) {
28996
29110
  enterModule && enterModule(module);
28997
29111
  })();
28998
29112
 
28999
- var __signature__$1T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
29000
- return a;
29001
- };
29002
- var dicomCache = {};
29003
-
29004
- var loadAndCacheDicom = function loadAndCacheDicom(imageId) {
29005
- return new Promise(function (resolve, reject) {
29006
- if (dicomCache[imageId]) {
29007
- resolve(dicomCache[imageId]);
29008
- return;
29009
- }
29010
-
29011
- var imagePromise = loadAndCacheImagePlus(imageId);
29012
- imagePromise.then(function (image) {
29013
- var dicom = new DicomInfo(image.data, image.getPixelData());
29014
- dicomCache[imageId] = dicom;
29015
- resolve(dicom);
29016
- }, function (e) {
29017
- reject(e);
29018
- });
29019
- });
29020
- };
29021
-
29022
- var purgeDicomCache = function purgeDicomCache() {
29023
- dicomCache = {};
29024
- };
29025
-
29026
- (function () {
29027
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
29028
-
29029
- if (!reactHotLoader) {
29030
- return;
29031
- }
29032
-
29033
- reactHotLoader.register(dicomCache, "dicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
29034
- reactHotLoader.register(loadAndCacheDicom, "loadAndCacheDicom", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
29035
- reactHotLoader.register(purgeDicomCache, "purgeDicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
29036
- })();
29037
-
29038
- (function () {
29039
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
29040
- leaveModule && leaveModule(module);
29041
- })();
29042
-
29043
- (function () {
29044
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
29045
- enterModule && enterModule(module);
29046
- })();
29047
-
29048
29113
  function ownKeys$c(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
29049
29114
 
29050
29115
  function _objectSpread$c(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$c(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$c(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -44112,12 +44177,12 @@ var DicomToolFlattenMode = /*#__PURE__*/function (_Component) {
44112
44177
  var IODisconnect = !IO;
44113
44178
  var commonTools = ['Layout', 'StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Rotate', 'ReverseColor', 'Reset', 'Cine', 'FalseColor', 'Link', 'ReferencePosition'];
44114
44179
 
44115
- if (mode === 'imageMode') {
44116
- commonTools = ['Layout', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Save', 'Rotate', 'ReverseColor', 'FalseColor'];
44180
+ if (mode !== 'seriesMode') {
44181
+ commonTools = ['Layout', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Rotate', 'ReverseColor', 'FalseColor'];
44117
44182
  }
44118
44183
 
44119
44184
  if (isThree) {
44120
- commonTools = ['StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Save', 'Rotate', 'ReverseColor', 'FalseColor'];
44185
+ commonTools = ['StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Rotate', 'ReverseColor', 'FalseColor'];
44121
44186
  }
44122
44187
 
44123
44188
  var vrTools = ['CrosshairsMPR', 'MprSwitchPerspective', 'MprRefresh'];
@@ -44241,7 +44306,13 @@ var DicomToolFlattenMode = /*#__PURE__*/function (_Component) {
44241
44306
  onClick: function onClick() {
44242
44307
  toggleImageMode('ImageMode');
44243
44308
  }
44244
- }, "\u56FE\u50CF\u6A21\u5F0F")), !isThree && /*#__PURE__*/React__default.createElement("div", {
44309
+ }, "\u56FE\u50CF\u6A21\u5F0F"), /*#__PURE__*/React__default.createElement(LargeToolItem, {
44310
+ active: mode === 'allImageMode',
44311
+ hidden: isThree,
44312
+ onClick: function onClick() {
44313
+ toggleImageMode('AllImageMode');
44314
+ }
44315
+ }, "\u5168\u90E8\u6A21\u5F0F")), !isThree && /*#__PURE__*/React__default.createElement("div", {
44245
44316
  className: "paladin-flex-row"
44246
44317
  }, /*#__PURE__*/React__default.createElement(LargeToolItem, {
44247
44318
  active: ReferenceLines,
@@ -44273,7 +44344,7 @@ var DicomToolFlattenMode = /*#__PURE__*/function (_Component) {
44273
44344
  }, /*#__PURE__*/React__default.createElement(LargeToolItem, {
44274
44345
  active: Fullscreen,
44275
44346
  onClick: handleFullscreen
44276
- }, "\u5168\u5C4F")), !MPR && IODisconnect && /*#__PURE__*/React__default.createElement("div", {
44347
+ }, "\u5168\u5C4F")), !MPR && IODisconnect && mode && mode !== 'allImageMode' && /*#__PURE__*/React__default.createElement("div", {
44277
44348
  className: "paladin-flex-row"
44278
44349
  }, /*#__PURE__*/React__default.createElement(LargeToolItem, {
44279
44350
  active: Surgery,
@@ -44401,12 +44472,12 @@ var DicomToolFlattenMode$1 = /*#__PURE__*/function (_Component) {
44401
44472
  var IODisconnect = !IO;
44402
44473
  var commonTools = ['Layout', 'StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Rotate', 'ReverseColor', 'Reset', 'Cine', 'FalseColor', 'Link', 'ReferencePosition'];
44403
44474
 
44404
- if (mode === 'imageMode') {
44405
- commonTools = ['Layout', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Save', 'Rotate', 'ReverseColor', 'FalseColor'];
44475
+ if (mode !== 'seriesMode') {
44476
+ commonTools = ['Layout', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Rotate', 'ReverseColor', 'FalseColor'];
44406
44477
  }
44407
44478
 
44408
44479
  if (isThree) {
44409
- commonTools = ['StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Save', 'Rotate', 'ReverseColor', 'FalseColor'];
44480
+ commonTools = ['StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Rotate', 'ReverseColor', 'FalseColor'];
44410
44481
  }
44411
44482
 
44412
44483
  var vrTools = ['CrosshairsMPR', 'MprSwitchPerspective', 'MprRefresh'];
@@ -44545,7 +44616,13 @@ var DicomToolFlattenMode$1 = /*#__PURE__*/function (_Component) {
44545
44616
  onClick: function onClick() {
44546
44617
  toggleImageMode('ImageMode');
44547
44618
  }
44548
- }, "\u56FE\u50CF\u6A21\u5F0F")), !isThree && /*#__PURE__*/React__default.createElement("div", {
44619
+ }, "\u56FE\u50CF\u6A21\u5F0F"), /*#__PURE__*/React__default.createElement(LargeToolItem$1, {
44620
+ active: mode === 'allImageMode',
44621
+ hidden: isThree,
44622
+ onClick: function onClick() {
44623
+ toggleImageMode('AllImageMode');
44624
+ }
44625
+ }, "\u5168\u90E8\u6A21\u5F0F")), !isThree && /*#__PURE__*/React__default.createElement("div", {
44549
44626
  className: "paladin-flex-row"
44550
44627
  }, /*#__PURE__*/React__default.createElement(LargeToolItem$1, {
44551
44628
  active: ReferenceLines,
@@ -44580,7 +44657,7 @@ var DicomToolFlattenMode$1 = /*#__PURE__*/function (_Component) {
44580
44657
  }, /*#__PURE__*/React__default.createElement(LargeToolItem$1, {
44581
44658
  active: Fullscreen,
44582
44659
  onClick: handleFullscreen
44583
- }, "\u5168\u5C4F")), !MPR && IODisconnect && /*#__PURE__*/React__default.createElement("div", {
44660
+ }, "\u5168\u5C4F")), !MPR && IODisconnect && mode && mode !== 'allImageMode' && /*#__PURE__*/React__default.createElement("div", {
44584
44661
  className: "paladin-flex-row"
44585
44662
  }, /*#__PURE__*/React__default.createElement(LargeToolItem$1, {
44586
44663
  active: Surgery,
@@ -45952,6 +46029,38 @@ var mergeProps$c = function mergeProps(propsFromState, propsFromDispatch, ownPro
45952
46029
  }
45953
46030
 
45954
46031
  propsFromDispatch.setImageScrollLine(0);
46032
+ var nextMode; // 全部模式 需要检查图像总是是否超过200 超过200则不可进入全部模式
46033
+
46034
+ if (key === 'AllImageMode') {
46035
+ var study = ownProps.study;
46036
+ var imageCount = 0;
46037
+ lodash$1.map(study, function (studyItem) {
46038
+ lodash$1.map(studyItem.series, function (seriesItem) {
46039
+ imageCount += seriesItem.numberOfSeriesRelatedInstances;
46040
+ });
46041
+ });
46042
+
46043
+ if (imageCount > 200) {
46044
+ _default$K.create( /*#__PURE__*/React__default.createElement("div", {
46045
+ style: {
46046
+ marginBottom: '10px'
46047
+ }
46048
+ }, "\u603B\u56FE\u50CF\u6570\u91CF\u5927\u4E8E200\uFF0C\u4E0D\u63D0\u4F9B\u5168\u90E8\u67E5\u770B\u529F\u80FD"), {
46049
+ style: {
46050
+ width: '350px',
46051
+ background: '#333',
46052
+ color: '#ccc',
46053
+ fontSize: '15px'
46054
+ },
46055
+ maskClosable: false,
46056
+ title: '提示',
46057
+ footer: null
46058
+ });
46059
+ return;
46060
+ }
46061
+
46062
+ nextMode = 'allImageMode';
46063
+ }
45955
46064
 
45956
46065
  if (key === 'SeriesMode') {
45957
46066
  // 回到序列模式
@@ -45970,6 +46079,8 @@ var mergeProps$c = function mergeProps(propsFromState, propsFromDispatch, ownPro
45970
46079
  col: propsFromState.lastCustomCol
45971
46080
  });
45972
46081
  }
46082
+
46083
+ nextMode = 'seriesMode';
45973
46084
  } else {
45974
46085
  // 进入图像模式 如果没有开op则暂存序列的布局(因为op的话已经暂存过了)
45975
46086
  if (!propsFromState.onePickMode) {
@@ -45980,7 +46091,11 @@ var mergeProps$c = function mergeProps(propsFromState, propsFromDispatch, ownPro
45980
46091
  }
45981
46092
  }
45982
46093
 
45983
- propsFromDispatch.toggleViewMode();
46094
+ if (key === 'ImageMode') {
46095
+ nextMode = 'imageMode';
46096
+ }
46097
+
46098
+ propsFromDispatch.setViewMode(nextMode);
45984
46099
  },
45985
46100
  autoLink: function () {
45986
46101
  var _autoLink = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(refresh) {
@@ -46463,7 +46578,7 @@ var ConnectedDicomTool = reactRedux.connect(mapStateToProps$c, {
46463
46578
  activeDicomFunction: activeDicomFunction,
46464
46579
  setLinkSeries: setLinkSeries,
46465
46580
  setCineDireaction: setCineDireaction,
46466
- toggleViewMode: toggleViewMode,
46581
+ setViewMode: setViewMode,
46467
46582
  setScrollLine: setScrollLine,
46468
46583
  setImageScrollLine: setImageScrollLine,
46469
46584
  setLinkImages: setLinkImages,
@@ -47409,13 +47524,84 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
47409
47524
 
47410
47525
  var _super = _createSuper$1b(ViewportOverlay);
47411
47526
 
47412
- function ViewportOverlay() {
47527
+ function ViewportOverlay(props) {
47528
+ var _this;
47529
+
47413
47530
  classCallCheck(this, ViewportOverlay);
47414
47531
 
47415
- return _super.apply(this, arguments);
47532
+ _this = _super.call(this, props);
47533
+ _this.state = {
47534
+ dicom: null
47535
+ };
47536
+ return _this;
47416
47537
  }
47417
47538
 
47418
47539
  createClass(ViewportOverlay, [{
47540
+ key: "componentDidMount",
47541
+ value: function componentDidMount() {
47542
+ this.loadDicom(this.props.imageId);
47543
+ }
47544
+ }, {
47545
+ key: "componentWillReceiveProps",
47546
+ value: function () {
47547
+ var _componentWillReceiveProps = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(nextProps, nextContext) {
47548
+ return regenerator.wrap(function _callee$(_context) {
47549
+ while (1) {
47550
+ switch (_context.prev = _context.next) {
47551
+ case 0:
47552
+ this.loadDicom(nextProps.imageId);
47553
+
47554
+ case 1:
47555
+ case "end":
47556
+ return _context.stop();
47557
+ }
47558
+ }
47559
+ }, _callee, this);
47560
+ }));
47561
+
47562
+ function componentWillReceiveProps(_x, _x2) {
47563
+ return _componentWillReceiveProps.apply(this, arguments);
47564
+ }
47565
+
47566
+ return componentWillReceiveProps;
47567
+ }()
47568
+ }, {
47569
+ key: "loadDicom",
47570
+ value: function () {
47571
+ var _loadDicom = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(imageId) {
47572
+ var _dicom;
47573
+
47574
+ return regenerator.wrap(function _callee2$(_context2) {
47575
+ while (1) {
47576
+ switch (_context2.prev = _context2.next) {
47577
+ case 0:
47578
+ _context2.next = 2;
47579
+ return loadAndCacheDicom(imageId);
47580
+
47581
+ case 2:
47582
+ _dicom = _context2.sent;
47583
+
47584
+ if (_dicom) {
47585
+ this.setState({
47586
+ dicom: _dicom
47587
+ });
47588
+ }
47589
+
47590
+ case 4:
47591
+ case "end":
47592
+ return _context2.stop();
47593
+ }
47594
+ }
47595
+ }, _callee2, this);
47596
+ }));
47597
+
47598
+ function loadDicom(_x3) {
47599
+ return _loadDicom.apply(this, arguments);
47600
+ }
47601
+
47602
+ return loadDicom;
47603
+ }()
47604
+ }, {
47419
47605
  key: "render",
47420
47606
  value: function render() {
47421
47607
  var _this$props = this.props,
@@ -47429,7 +47615,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
47429
47615
  return null;
47430
47616
  }
47431
47617
 
47432
- var dicom = cornerstone.metaData.get('dicomInfo', imageId);
47618
+ var dicom = this.state.dicom;
47433
47619
 
47434
47620
  if (!dicom) {
47435
47621
  return null;
@@ -48936,6 +49122,12 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
48936
49122
  });
48937
49123
  });
48938
49124
 
49125
+ defineProperty(assertThisInitialized(_this), "checkImageBeforeDisplay", function (imageId) {
49126
+ var stack = _this.state.stack;
49127
+ var currentImageId = stack && stack.imageIds[stack.currentImageIdIndex];
49128
+ return currentImageId === imageId;
49129
+ });
49130
+
48939
49131
  defineProperty(assertThisInitialized(_this), "loadImage", function () {
48940
49132
  var _this2;
48941
49133
 
@@ -48970,6 +49162,13 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
48970
49162
 
48971
49163
  imagePromise.then(function (image) {
48972
49164
  _this.firstLoaded = true; // Display the first image
49165
+ // 注:display image之前校验image的正确性 避免快速滚动图像加载堆积 导致显示的图像并非当前图像
49166
+
49167
+ var checkResult = _this.checkImageBeforeDisplay(imageId);
49168
+
49169
+ if (!checkResult) {
49170
+ return;
49171
+ }
48973
49172
 
48974
49173
  cornerstone.displayImage(_this.element, image); // 扫描定位线处理 May be we can remove it, 防丢失
48975
49174
 
@@ -49058,6 +49257,12 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
49058
49257
  error: null
49059
49258
  });
49060
49259
  }, function (error) {
49260
+ var checkResult = _this.checkImageBeforeDisplay(imageId);
49261
+
49262
+ if (!checkResult) {
49263
+ return;
49264
+ }
49265
+
49061
49266
  console.error('viewport-loadImage-error', error);
49062
49267
 
49063
49268
  _this.clearFirstLoadingHandler();
@@ -49118,6 +49323,13 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
49118
49323
  }
49119
49324
 
49120
49325
  imagePromise.then(function (image) {
49326
+ // 注:display image之前校验image的正确性 避免快速滚动图像加载堆积 导致显示的图像并非当前图像
49327
+ var checkResult = _this.checkImageBeforeDisplay(imageId);
49328
+
49329
+ if (!checkResult) {
49330
+ return;
49331
+ }
49332
+
49121
49333
  cornerstone.displayImage(_this.element, image); // 伪彩单独重置
49122
49334
 
49123
49335
  var viewport = cornerstone.getViewport(_this.element);
@@ -49145,6 +49357,12 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
49145
49357
  _default$E.setToolDisabledForElement(_this.element, 'StackScrollMouseWheel', {});
49146
49358
  }
49147
49359
  }, function (error) {
49360
+ var checkResult = _this.checkImageBeforeDisplay(imageId);
49361
+
49362
+ if (!checkResult) {
49363
+ return;
49364
+ }
49365
+
49148
49366
  console.error('viewport-update-loadImage-error', error);
49149
49367
 
49150
49368
  _this.setState({
@@ -50872,7 +51090,7 @@ var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
50872
51090
  onViewPortDoubleClick: function onViewPortDoubleClick() {
50873
51091
  // 双击返回序列模式
50874
51092
  dispatch(setLinkImages([]));
50875
- dispatch(toggleViewMode());
51093
+ dispatch(setViewMode('seriesMode'));
50876
51094
  },
50877
51095
  setLinkImages: function setLinkImages$1() {
50878
51096
  dispatch(setLinkImages.apply(void 0, arguments));
@@ -52755,6 +52973,257 @@ function colorMapFix(viewportData) {
52755
52973
  enterModule && enterModule(module);
52756
52974
  })();
52757
52975
 
52976
+ function ownKeys$E(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
52977
+
52978
+ function _objectSpread$F(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$E(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$E(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
52979
+
52980
+ var __signature__$3h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52981
+ return a;
52982
+ };
52983
+ /**
52984
+ * 全部模式
52985
+ *
52986
+ */
52987
+
52988
+ var mapStateToProps$k = function mapStateToProps(state) {
52989
+ var _state$paladin$viewpo = state.paladin.viewport,
52990
+ imageActiveIndex = _state$paladin$viewpo.imageActiveIndex,
52991
+ linkImageIndex = _state$paladin$viewpo.linkImageIndex,
52992
+ linkImageModeSynchronizer = _state$paladin$viewpo.linkImageModeSynchronizer,
52993
+ activeIndex = _state$paladin$viewpo.activeIndex,
52994
+ lastActiveIndex = _state$paladin$viewpo.lastActiveIndex;
52995
+ var _state$paladin$tools$ = state.paladin.tools.layout,
52996
+ row = _state$paladin$tools$.row,
52997
+ col = _state$paladin$tools$.col,
52998
+ currentScrollLine = _state$paladin$tools$.currentScrollLine,
52999
+ currentScrollLineImage = _state$paladin$tools$.currentScrollLineImage,
53000
+ onePickMode = _state$paladin$tools$.onePickMode,
53001
+ lastScrollLine = _state$paladin$tools$.lastScrollLine,
53002
+ lastCustomRow = _state$paladin$tools$.lastCustomRow,
53003
+ lastCustomCol = _state$paladin$tools$.lastCustomCol;
53004
+ var _state$paladin$tools$2 = state.paladin.tools.action,
53005
+ Sync = _state$paladin$tools$2.Sync,
53006
+ showOverlayText = _state$paladin$tools$2.showOverlayText,
53007
+ activeTool = _state$paladin$tools$2.activeTool;
53008
+ return {
53009
+ imageActiveIndex: imageActiveIndex,
53010
+ activeIndex: activeIndex,
53011
+ linkImageIndex: linkImageIndex,
53012
+ row: row,
53013
+ col: col,
53014
+ Sync: Sync,
53015
+ currentScrollLine: currentScrollLine,
53016
+ currentScrollLineImage: currentScrollLineImage,
53017
+ linkImageModeSynchronizer: linkImageModeSynchronizer,
53018
+ showOverlayText: showOverlayText,
53019
+ activeTool: activeTool,
53020
+ onePickMode: onePickMode,
53021
+ lastScrollLine: lastScrollLine,
53022
+ lastActiveIndex: lastActiveIndex,
53023
+ lastCustomRow: lastCustomRow,
53024
+ lastCustomCol: lastCustomCol
53025
+ };
53026
+ };
53027
+
53028
+ var mapDispatchToProps$5 = function mapDispatchToProps(dispatch) {
53029
+ return {
53030
+ setScrollLine: function setScrollLine() {
53031
+ dispatch(setImageScrollLine.apply(void 0, arguments));
53032
+ },
53033
+ onViewPortCellClickDispatch: function onViewPortCellClickDispatch(index) {
53034
+ // 单击选中高亮
53035
+ dispatch(setImageActiveIndex(index));
53036
+ },
53037
+ onViewPortDoubleClick: function onViewPortDoubleClick() {
53038
+ // 双击返回序列模式
53039
+ dispatch(setLinkImages([]));
53040
+ dispatch(setViewMode('seriesMode'));
53041
+ },
53042
+ setLinkImages: function setLinkImages$1() {
53043
+ dispatch(setLinkImages.apply(void 0, arguments));
53044
+ },
53045
+ setLayout: function setLayout$1() {
53046
+ dispatch(setLayout.apply(void 0, arguments));
53047
+ }
53048
+ };
53049
+ };
53050
+
53051
+ var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownProps) {
53052
+ var imageActiveIndex = propsFromState.imageActiveIndex,
53053
+ linkImageIndex = propsFromState.linkImageIndex,
53054
+ activeIndex = propsFromState.activeIndex,
53055
+ currentScrollLine = propsFromState.currentScrollLine,
53056
+ currentScrollLineImage = propsFromState.currentScrollLineImage,
53057
+ row = propsFromState.row,
53058
+ col = propsFromState.col; // 和图像模式几乎一样 就是初始数据的获取方式不同
53059
+
53060
+ var study = ownProps.study;
53061
+ var allSeries = [];
53062
+ lodash$1.map(study, function (studyItem) {
53063
+ lodash$1.map(studyItem.series, function (seriesItem) {
53064
+ // seriesCount和instanceCount为了overlay的正确显示
53065
+ lodash$1.map(seriesItem.imageIds, function (image) {
53066
+ var data = {
53067
+ imageIds: [image],
53068
+ seriesInstanceUID: seriesItem.seriesInstanceUID,
53069
+ currentImageIdIndex: 0,
53070
+ seriesCount: seriesItem.seriesCount,
53071
+ instanceCount: seriesItem.numberOfSeriesRelatedInstances
53072
+ };
53073
+ allSeries.push(data);
53074
+ });
53075
+ });
53076
+ }); // images总数
53077
+
53078
+ var seriesTotalCount = allSeries.length; // 一页的网格总数
53079
+
53080
+ var onePageCount = row * col; // series的原始image数组
53081
+
53082
+ var startIndex = col * currentScrollLineImage;
53083
+ var endIndex = startIndex + onePageCount;
53084
+ var series = allSeries.slice(startIndex, endIndex);
53085
+ var showVerticalScroll = series && series.length / col > row;
53086
+ return _objectSpread$F(_objectSpread$F(_objectSpread$F(_objectSpread$F({}, ownProps), propsFromState), propsFromDispatch), {}, {
53087
+ currentScrollLine: currentScrollLineImage,
53088
+ series: series,
53089
+ activeIndex: imageActiveIndex,
53090
+ customScroll: seriesTotalCount > onePageCount,
53091
+ lazyLoad: seriesTotalCount > onePageCount,
53092
+ linkedIndexArr: linkImageIndex,
53093
+ seriesTotalCount: seriesTotalCount,
53094
+ showCustomScroll: false,
53095
+ showVerticalScroll: showVerticalScroll,
53096
+ onViewPortDoubleClick: function onViewPortDoubleClick() {
53097
+ // 测量工具下不响应双击操作
53098
+ if (!lodash$1.includes(['Wwwc', 'Zoom', 'Pan'], propsFromState.activeTool)) {
53099
+ return;
53100
+ } // 回到序列模式 如果是op模式开启的话 无论现在布局是什么 都回到1*1的op状态
53101
+
53102
+
53103
+ if (propsFromState.onePickMode) {
53104
+ propsFromDispatch.setLayout({
53105
+ row: 1,
53106
+ col: 1
53107
+ });
53108
+ } else {
53109
+ propsFromDispatch.setLayout({
53110
+ row: propsFromState.lastCustomRow,
53111
+ col: propsFromState.lastCustomCol
53112
+ });
53113
+ }
53114
+
53115
+ propsFromState.linkImageModeSynchronizer.destroy();
53116
+ propsFromDispatch.onViewPortDoubleClick();
53117
+ },
53118
+ onImageFirstRender: function onImageFirstRender(index) {
53119
+ // 首次加载把激活状态的element添加到sync中
53120
+ var linkImageModeSynchronizer = propsFromState.linkImageModeSynchronizer;
53121
+
53122
+ if (imageActiveIndex === index) {
53123
+ var dom = getElement(index);
53124
+ linkImageModeSynchronizer.add(dom);
53125
+ }
53126
+ },
53127
+ getCacheViewport: function getCacheViewport(layoutIndex) {
53128
+ // 渲染新图像的时候 优先用viewport缓存池中的
53129
+ // 如果是op模式还开启的状态 需要取缓存的数据来作为真正的seriesIndex
53130
+ var realImageIndex = col * currentScrollLineImage + layoutIndex;
53131
+ return get$1('allImageViewports')(realImageIndex);
53132
+ },
53133
+ handleViewportState: function handleViewportState(layoutIndex, viewport) {
53134
+ // 图像模式下 当image render,把对应的viewport缓存下来
53135
+ var realImageIndex = col * currentScrollLineImage + layoutIndex;
53136
+ set$1('allImageViewportsImage')(realImageIndex, viewport);
53137
+ },
53138
+ onSyncOpen: function onSyncOpen(element) {
53139
+ propsFromState.linkImageModeSynchronizer.add(element);
53140
+ },
53141
+ onSyncClose: function onSyncClose(element, index) {
53142
+ propsFromState.linkImageModeSynchronizer.remove(element);
53143
+
53144
+ if (lodash$1.includes(linkImageIndex, index) || index === imageActiveIndex) {
53145
+ propsFromState.linkImageModeSynchronizer.add(element);
53146
+ }
53147
+ },
53148
+ customScrollPan: function customScrollPan(value) {
53149
+ propsFromDispatch.setScrollLine(value);
53150
+ var realIndex = col * value + propsFromState.imageActiveIndex;
53151
+
53152
+ if (realIndex > seriesTotalCount - 1) {
53153
+ // 当前active的dom是空布局 自动选中当前布局的最后一个影响作为active
53154
+ var lastIndex = seriesTotalCount - col * value - 1;
53155
+ propsFromDispatch.onViewPortCellClickDispatch(lastIndex);
53156
+ }
53157
+ },
53158
+ handleCtrlSelect: function handleCtrlSelect(element, index) {
53159
+ var linkImageModeSynchronizer = propsFromState.linkImageModeSynchronizer;
53160
+ var setLinkImages = propsFromDispatch.setLinkImages;
53161
+ var links = lodash$1.cloneDeep(linkImageIndex);
53162
+
53163
+ if (linkImageIndex && lodash$1.includes(linkImageIndex, index)) {
53164
+ // 去除
53165
+ links = lodash$1.filter(links, function (item) {
53166
+ return item !== index;
53167
+ });
53168
+ linkImageModeSynchronizer.remove(element);
53169
+ } else {
53170
+ // 添加
53171
+ links.push(index);
53172
+ linkImageModeSynchronizer.add(element);
53173
+ }
53174
+
53175
+ setLinkImages(links);
53176
+ },
53177
+ onViewPortCellClick: function onViewPortCellClick(e, index) {
53178
+ // 需求:当前选中的序列默认在同步中
53179
+ // 当同步未开启,mousedown时把即将激活的元素加入sync中
53180
+ var linkImageModeSynchronizer = propsFromState.linkImageModeSynchronizer,
53181
+ Sync = propsFromState.Sync;
53182
+
53183
+ if (!Sync && !e.ctrlKey && e.button === 0) {
53184
+ if (!_.includes(linkImageIndex, imageActiveIndex)) {
53185
+ var oldActiveElement = getElement(imageActiveIndex);
53186
+ linkImageModeSynchronizer.remove(oldActiveElement);
53187
+ }
53188
+
53189
+ if (!_.includes(linkImageIndex, index)) {
53190
+ var element = getElement(index);
53191
+ linkImageModeSynchronizer.add(element);
53192
+ }
53193
+ }
53194
+
53195
+ propsFromDispatch.onViewPortCellClickDispatch(index);
53196
+ }
53197
+ });
53198
+ };
53199
+
53200
+ var ConnectedDicomAllImageModeLayout = reactRedux.connect(mapStateToProps$k, mapDispatchToProps$5, mergeProps$j)(DicomLayout);
53201
+ var _default$19 = ConnectedDicomAllImageModeLayout;
53202
+
53203
+ (function () {
53204
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
53205
+
53206
+ if (!reactHotLoader) {
53207
+ return;
53208
+ }
53209
+
53210
+ reactHotLoader.register(mapStateToProps$k, "mapStateToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53211
+ reactHotLoader.register(mapDispatchToProps$5, "mapDispatchToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53212
+ reactHotLoader.register(mergeProps$j, "mergeProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53213
+ reactHotLoader.register(ConnectedDicomAllImageModeLayout, "ConnectedDicomAllImageModeLayout", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53214
+ reactHotLoader.register(_default$19, "default", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53215
+ })();
53216
+
53217
+ (function () {
53218
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
53219
+ leaveModule && leaveModule(module);
53220
+ })();
53221
+
53222
+ (function () {
53223
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
53224
+ enterModule && enterModule(module);
53225
+ })();
53226
+
52758
53227
  function _createForOfIteratorHelper$d(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$f(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
52759
53228
 
52760
53229
  function _unsupportedIterableToArray$f(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$f(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$f(o, minLen); }
@@ -52765,7 +53234,7 @@ function _createSuper$1k(Derived) { var hasNativeReflectConstruct = _isNativeRef
52765
53234
 
52766
53235
  function _isNativeReflectConstruct$1k() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
52767
53236
 
52768
- var __signature__$3h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53237
+ var __signature__$3i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52769
53238
  return a;
52770
53239
  };
52771
53240
 
@@ -53281,13 +53750,16 @@ var DicomView = /*#__PURE__*/function (_Component) {
53281
53750
  study: this.state.study,
53282
53751
  windowLayoutType: this.props.windowLayoutType
53283
53752
  }));
53284
- var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && (this.props.mode === 'seriesMode' ? /*#__PURE__*/React__default.createElement(_default$14, {
53753
+ var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && this.props.mode === 'seriesMode' && /*#__PURE__*/React__default.createElement(_default$14, {
53285
53754
  series: this.props.series,
53286
53755
  showAIResult: this.props.showAIResult,
53287
53756
  onResizeEmit: this.props.onResizeEmit
53288
- }) : /*#__PURE__*/React__default.createElement(_default$15, {
53757
+ }), viewMode === '2D' && this.props.mode === 'imageMode' && /*#__PURE__*/React__default.createElement(_default$15, {
53289
53758
  onResizeEmit: this.props.onResizeEmit
53290
- })), viewMode === 'MPR' && /*#__PURE__*/React__default.createElement(_default$17, null), viewMode === 'VR' && /*#__PURE__*/React__default.createElement(_default$18, null), viewMode === 'Surgery' && /*#__PURE__*/React__default.createElement(_default$16, null));
53759
+ }), viewMode === '2D' && this.props.mode === 'allImageMode' && /*#__PURE__*/React__default.createElement(_default$19, {
53760
+ study: this.state.study,
53761
+ onResizeEmit: this.props.onResizeEmit
53762
+ }), viewMode === 'MPR' && /*#__PURE__*/React__default.createElement(_default$17, null), viewMode === 'VR' && /*#__PURE__*/React__default.createElement(_default$18, null), viewMode === 'Surgery' && /*#__PURE__*/React__default.createElement(_default$16, null));
53291
53763
  var DicomThumbnail = /*#__PURE__*/React__default.createElement("div", {
53292
53764
  className: "paladin-dicomView-dicomThumbnailWrapper"
53293
53765
  }, /*#__PURE__*/React__default.createElement(_default$10, {
@@ -53379,16 +53851,16 @@ function _unsupportedIterableToArray$g(o, minLen) { if (!o) return; if (typeof o
53379
53851
 
53380
53852
  function _arrayLikeToArray$g(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
53381
53853
 
53382
- function ownKeys$E(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
53854
+ function ownKeys$F(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
53383
53855
 
53384
- function _objectSpread$F(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$E(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$E(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
53856
+ function _objectSpread$G(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$F(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$F(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
53385
53857
 
53386
- var __signature__$3i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53858
+ var __signature__$3j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53387
53859
  return a;
53388
53860
  };
53389
53861
  var scroll = _default$E.importInternal('util/scroll');
53390
53862
 
53391
- var mapStateToProps$k = function mapStateToProps(state) {
53863
+ var mapStateToProps$l = function mapStateToProps(state) {
53392
53864
  var _state$paladin$viewpo = state.paladin.viewport,
53393
53865
  activeIndex = _state$paladin$viewpo.activeIndex,
53394
53866
  imageActiveIndex = _state$paladin$viewpo.imageActiveIndex,
@@ -53442,7 +53914,7 @@ var mapStateToProps$k = function mapStateToProps(state) {
53442
53914
  };
53443
53915
  };
53444
53916
 
53445
- var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownProps) {
53917
+ var mergeProps$k = function mergeProps(propsFromState, propsFromDispatch, ownProps) {
53446
53918
  var activeIndex = propsFromState.activeIndex,
53447
53919
  imageActiveIndex = propsFromState.imageActiveIndex,
53448
53920
  MPR = propsFromState.MPR,
@@ -53489,7 +53961,7 @@ var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownPro
53489
53961
  */
53490
53962
 
53491
53963
 
53492
- return _objectSpread$F(_objectSpread$F(_objectSpread$F({}, ownProps), propsFromState), {}, {
53964
+ return _objectSpread$G(_objectSpread$G(_objectSpread$G({}, ownProps), propsFromState), {}, {
53493
53965
  showDicomThumbnail: showDicomThumbnail,
53494
53966
  viewMode: viewMode,
53495
53967
  keyMap: {
@@ -53884,7 +54356,7 @@ var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownPro
53884
54356
  });
53885
54357
  };
53886
54358
 
53887
- var ConnectedDicomView = reactRedux.connect(mapStateToProps$k, {
54359
+ var ConnectedDicomView = reactRedux.connect(mapStateToProps$l, {
53888
54360
  initSeries: initSeries,
53889
54361
  addSeries: addSeries,
53890
54362
  setCurrentSeries: setCurrentSeries,
@@ -53903,7 +54375,7 @@ var ConnectedDicomView = reactRedux.connect(mapStateToProps$k, {
53903
54375
  activeDicomFunction: activeDicomFunction,
53904
54376
  openIO: openIO,
53905
54377
  closeIO: closeIO
53906
- }, mergeProps$j, withRef())(DicomView);
54378
+ }, mergeProps$k, withRef())(DicomView);
53907
54379
 
53908
54380
  function withRef() {
53909
54381
  var reactReduxVersion = package_json.version.split('.')[0];
@@ -53919,7 +54391,7 @@ function withRef() {
53919
54391
  }
53920
54392
  }
53921
54393
 
53922
- var _default$19 = ConnectedDicomView;
54394
+ var _default$1a = ConnectedDicomView;
53923
54395
 
53924
54396
  (function () {
53925
54397
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -53929,11 +54401,11 @@ var _default$19 = ConnectedDicomView;
53929
54401
  }
53930
54402
 
53931
54403
  reactHotLoader.register(scroll, "scroll", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53932
- reactHotLoader.register(mapStateToProps$k, "mapStateToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53933
- reactHotLoader.register(mergeProps$j, "mergeProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
54404
+ reactHotLoader.register(mapStateToProps$l, "mapStateToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
54405
+ reactHotLoader.register(mergeProps$k, "mergeProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53934
54406
  reactHotLoader.register(ConnectedDicomView, "ConnectedDicomView", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53935
54407
  reactHotLoader.register(withRef, "withRef", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53936
- reactHotLoader.register(_default$19, "default", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
54408
+ reactHotLoader.register(_default$1a, "default", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53937
54409
  })();
53938
54410
 
53939
54411
  (function () {
@@ -53946,10 +54418,10 @@ var _default$19 = ConnectedDicomView;
53946
54418
  enterModule && enterModule(module);
53947
54419
  })();
53948
54420
 
53949
- var __signature__$3j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
54421
+ var __signature__$3k = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53950
54422
  return a;
53951
54423
  };
53952
- var _default$1a = _default$19;
54424
+ var _default$1b = _default$1a;
53953
54425
 
53954
54426
  (function () {
53955
54427
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -53958,7 +54430,7 @@ var _default$1a = _default$19;
53958
54430
  return;
53959
54431
  }
53960
54432
 
53961
- reactHotLoader.register(_default$1a, "default", "/Users/huyeqing/workspace/chainz/paladin/src/index.js");
54433
+ reactHotLoader.register(_default$1b, "default", "/Users/huyeqing/workspace/chainz/paladin/src/index.js");
53962
54434
  })();
53963
54435
 
53964
54436
  (function () {
@@ -53967,6 +54439,6 @@ var _default$1a = _default$19;
53967
54439
  })();
53968
54440
 
53969
54441
  exports.cornerstoneUtils = index;
53970
- exports.default = _default$1a;
54442
+ exports.default = _default$1b;
53971
54443
  exports.reducers = _default$I;
53972
54444
  //# sourceMappingURL=index.js.map