hellfire 0.19.3 → 0.19.6

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,287 +10277,887 @@ 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
10492
 
10454
- return RulerOverlayTool;
10455
- }(BaseTool$5);
10493
+ // Define the unified helper method that is used to implement .next,
10494
+ // .throw, and .return (see defineIteratorMethods).
10495
+ this._invoke = enqueue;
10496
+ }
10456
10497
 
10457
- (function () {
10458
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
10498
+ defineIteratorMethods(AsyncIterator.prototype);
10499
+ AsyncIterator.prototype[asyncIteratorSymbol] = function () {
10500
+ return this;
10501
+ };
10502
+ exports.AsyncIterator = AsyncIterator;
10459
10503
 
10460
- if (!reactHotLoader) {
10461
- return;
10462
- }
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;
10463
10509
 
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
- })();
10510
+ var iter = new AsyncIterator(
10511
+ wrap(innerFn, outerFn, self, tryLocsList),
10512
+ PromiseImpl
10513
+ );
10469
10514
 
10470
- (function () {
10471
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
10472
- leaveModule && leaveModule(module);
10473
- })();
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
+ };
10474
10521
 
10475
- (function () {
10476
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
10477
- enterModule && enterModule(module);
10478
- })();
10522
+ function makeInvokeMethod(innerFn, self, context) {
10523
+ var state = GenStateSuspendedStart;
10479
10524
 
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; }
10525
+ return function invoke(method, arg) {
10526
+ if (state === GenStateExecuting) {
10527
+ throw new Error("Generator is already running");
10528
+ }
10481
10529
 
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; }
10530
+ if (state === GenStateCompleted) {
10531
+ if (method === "throw") {
10532
+ throw arg;
10533
+ }
10483
10534
 
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; // 最大并发数 可配置
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();
10538
+ }
10490
10539
 
10491
- var retry = 3; // 重试次数 可配置
10540
+ context.method = method;
10541
+ context.arg = arg;
10492
10542
 
10493
- var taskTimer;
10494
- var executeCallback;
10495
- var cachedTask = {};
10496
- var errorCache = {}; // 出错的task集合
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
+ }
10497
10552
 
10498
- var currentTopPriority = 1; // 当前最高的优先级(除了及时触发的)
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;
10499
10557
 
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
- }
10558
+ } else if (context.method === "throw") {
10559
+ if (state === GenStateSuspendedStart) {
10560
+ state = GenStateCompleted;
10561
+ throw context.arg;
10562
+ }
10506
10563
 
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
- } // 预加载池的添加
10564
+ context.dispatchException(context.arg);
10518
10565
 
10566
+ } else if (context.method === "return") {
10567
+ context.abrupt("return", context.arg);
10568
+ }
10519
10569
 
10520
- function addTaskIntoPool(task) {
10521
- return new Promise(function (resolve, reject) {
10522
- var cache = cachedTask[task.key];
10570
+ state = GenStateExecuting;
10523
10571
 
10524
- var subscribe = function subscribe(executeRes) {
10525
- if (executeRes.success) {
10526
- resolve(executeRes.res);
10527
- } else {
10528
- reject(executeRes.err);
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;
10579
+
10580
+ if (record.arg === ContinueSentinel) {
10581
+ continue;
10582
+ }
10583
+
10584
+ return {
10585
+ value: record.arg,
10586
+ done: context.done
10587
+ };
10588
+
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
+ }
10529
10596
  }
10530
10597
  };
10598
+ }
10531
10599
 
10532
- var priority = task.priority || task.priority === 0 || 1;
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;
10533
10610
 
10534
- if (cache) {
10535
- cache.priority = priority;
10536
- var callbacks = cache.callbacks || [];
10537
- callbacks.push(subscribe);
10538
- } else {
10539
- /**
10540
- * 1.首次加载
10541
- * 2.出错过的task重新被触发load
10542
- */
10543
- var errorTask = errorCache[task.key];
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);
10544
10619
 
10545
- var _task = errorTask || task;
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
+ }
10546
10626
 
10547
- if (!errorTask) {
10548
- cachedTask[task.key] = task;
10627
+ context.method = "throw";
10628
+ context.arg = new TypeError(
10629
+ "The iterator does not provide a 'throw' method");
10549
10630
  }
10550
10631
 
10551
- _task.priority = priority;
10552
- _task.callbacks = [subscribe];
10553
- _task.retry = retry;
10554
- taskPool.push(_task);
10632
+ return ContinueSentinel;
10555
10633
  }
10556
- });
10557
- } // 执行下载
10558
10634
 
10635
+ var record = tryCatch(method, delegate.iterator, context.arg);
10559
10636
 
10560
- function executeTask() {
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() {
10561
11161
  if (taskPool.length > 0) {
10562
11162
  sortTaskPool();
10563
11163
  var executeRequest = maxRequest - numRequest;
@@ -10586,6 +11186,7 @@ function executeTask() {
10586
11186
  res: res
10587
11187
  });
10588
11188
  });
11189
+ task.executed = true;
10589
11190
  executeTask();
10590
11191
  }, function (err) {
10591
11192
  // 请求失败 重试机制
@@ -10701,7 +11302,7 @@ function ownKeys$6(object, enumerableOnly) { var keys = Object.keys(object); if
10701
11302
 
10702
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; }
10703
11304
 
10704
- var __signature__$G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11305
+ var __signature__$F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
10705
11306
  return a;
10706
11307
  };
10707
11308
  var lastScrollSeriesUid = null;
@@ -10820,279 +11421,16 @@ function buildImageRequestTask(imageId) {
10820
11421
  var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
10821
11422
  return _objectSpread$6(_objectSpread$6({
10822
11423
  key: imageId
10823
- }, config), {}, {
10824
- execute: function execute() {
10825
- return cornerstone.loadAndCacheImage(imageId);
10826
- }
10827
- });
10828
- }
10829
-
10830
- function resetTaskPool() {
10831
- clear();
10832
- }
10833
-
10834
- (function () {
10835
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
10836
-
10837
- if (!reactHotLoader) {
10838
- return;
10839
- }
10840
-
10841
- reactHotLoader.register(lastScrollSeriesUid, "lastScrollSeriesUid", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10842
- reactHotLoader.register(highLevelPriority, "highLevelPriority", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10843
- reactHotLoader.register(initTaskPool, "initTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10844
- reactHotLoader.register(addLoadImageTask, "addLoadImageTask", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10845
- reactHotLoader.register(tryToClearPixelData, "tryToClearPixelData", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10846
- reactHotLoader.register(addTaskPool, "addTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10847
- reactHotLoader.register(changePriorityBySeries, "changePriorityBySeries", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10848
- reactHotLoader.register(loadAndCacheImagePlus, "loadAndCacheImagePlus", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10849
- reactHotLoader.register(buildImageRequestTask, "buildImageRequestTask", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10850
- reactHotLoader.register(resetTaskPool, "resetTaskPool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-request-image/index.js");
10851
- })();
10852
-
10853
- (function () {
10854
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
10855
- leaveModule && leaveModule(module);
10856
- })();
10857
-
10858
- (function () {
10859
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
10860
- enterModule && enterModule(module);
10861
- })();
10862
-
10863
- 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; }
10864
-
10865
- 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; }
10866
-
10867
- var __signature__$H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
10868
- return a;
10869
- };
10870
- var triggerEvent$2 = cornerstoneTools.importInternal('util/triggerEvent');
10871
- var external$9 = cornerstoneTools.external,
10872
- getToolState$5 = cornerstoneTools.getToolState,
10873
- loadHandlerManager = cornerstoneTools.loadHandlerManager,
10874
- EVENTS$2 = cornerstoneTools.EVENTS;
10875
- /**
10876
- * Scrolls through the stack to the image index requested.
10877
- * @export @public @method
10878
- * @name scrollToIndex
10879
- *
10880
- * @param {type} element The element to scroll through.
10881
- * @param {type} newImageIdIndex The target image index.
10882
- * @param {type} options {eventTrigger,backToStart,backToEnd} 是否触发事件 回到开头 回到结尾
10883
- * @returns {void}
10884
- */
10885
-
10886
- var _default$h = function _default(element, newImageIdIndex, options, callback) {
10887
- var _options = _objectSpread$7({
10888
- eventTrigger: true,
10889
- backToStart: false,
10890
- backToEnd: false
10891
- }, options);
10892
-
10893
- var toolData = getToolState$5(element, 'stack');
10894
-
10895
- if (!toolData || !toolData.data || !toolData.data.length) {
10896
- return;
10897
- }
10898
-
10899
- var cornerstone = external$9.cornerstone; // If we have more than one stack, check if we have a stack renderer defined
10900
-
10901
- var stackRenderer;
10902
-
10903
- if (toolData.data.length > 1) {
10904
- var stackRendererData = getToolState$5(element, 'stackRenderer');
10905
-
10906
- if (stackRendererData && stackRendererData.data && stackRendererData.data.length) {
10907
- stackRenderer = stackRendererData.data[0];
10908
- }
10909
- }
10910
-
10911
- var stackData = toolData.data[0]; // Allow for negative indexing
10912
-
10913
- if (newImageIdIndex < 0) {
10914
- newImageIdIndex += stackData.imageIds.length;
10915
- }
10916
-
10917
- var startLoadingHandler = loadHandlerManager.getStartLoadHandler(element);
10918
- var endLoadingHandler = loadHandlerManager.getEndLoadHandler(element);
10919
- var errorLoadingHandler = loadHandlerManager.getErrorLoadingHandler(element);
10920
-
10921
- function doneCallback(image) {
10922
- if (stackData.currentImageIdIndex !== newImageIdIndex) {
10923
- return;
10924
- } // Check if the element is still enabled in Cornerstone,
10925
- // If an error is thrown, stop here.
10926
-
10927
-
10928
- try {
10929
- // TODO: Add 'isElementEnabled' to Cornerstone?
10930
- cornerstone.getEnabledElement(element);
10931
- } catch (error) {
10932
- return;
10933
- }
10934
-
10935
- if (stackRenderer) {
10936
- stackRenderer.currentImageIdIndex = newImageIdIndex;
10937
- stackRenderer.render(element, toolData.data);
10938
- } else {
10939
- cornerstone.displayImage(element, image);
10940
- }
10941
-
10942
- if (endLoadingHandler) {
10943
- endLoadingHandler(element, image);
10944
- }
10945
-
10946
- if (callback) {
10947
- callback({
10948
- type: 'done',
10949
- element: element
10950
- });
10951
- }
10952
- }
10953
-
10954
- function failCallback(error) {
10955
- var imageId = stackData.imageIds[newImageIdIndex];
10956
-
10957
- if (errorLoadingHandler) {
10958
- errorLoadingHandler(element, imageId, error);
10959
- }
10960
-
10961
- if (callback) {
10962
- callback({
10963
- type: 'fail',
10964
- element: element,
10965
- imageId: imageId,
10966
- error: error
10967
- });
10968
- }
10969
- }
10970
-
10971
- if (newImageIdIndex === stackData.currentImageIdIndex) {
10972
- return;
10973
- }
10974
-
10975
- if (startLoadingHandler) {
10976
- startLoadingHandler(element);
10977
- }
10978
-
10979
- var eventData = _objectSpread$7({
10980
- newImageIdIndex: newImageIdIndex,
10981
- direction: newImageIdIndex - stackData.currentImageIdIndex
10982
- }, _options);
10983
-
10984
- stackData.currentImageIdIndex = newImageIdIndex;
10985
- var newImageId = stackData.imageIds[newImageIdIndex]; // Retry image loading in cases where previous image promise
10986
- // Was rejected, if the option is set
10987
-
10988
- /*
10989
- Const config = stackScroll.getConfiguration();
10990
- TODO: Revisit this. It appears that Core's imageCache is not
10991
- keeping rejected promises anywhere, so we have no way to know
10992
- if something was previously rejected.
10993
- if (config && config.retryLoadOnScroll === true) {
10994
- }
10995
- */
10996
- // Convert the preventCache value in stack data to a boolean
10997
-
10998
- var preventCache = Boolean(stackData.preventCache);
10999
- var imagePromise;
11000
-
11001
- if (preventCache) {
11002
- imagePromise = cornerstone.loadImage(newImageId);
11003
- } else {
11004
- imagePromise = loadAndCacheImagePlus(newImageId);
11005
- }
11006
-
11007
- imagePromise.then(doneCallback, failCallback);
11008
-
11009
- if (_options.eventTrigger) {
11010
- triggerEvent$2(element, EVENTS$2.STACK_SCROLL, eventData);
11011
- }
11012
- };
11013
-
11014
- (function () {
11015
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11016
-
11017
- if (!reactHotLoader) {
11018
- return;
11019
- }
11020
-
11021
- reactHotLoader.register(triggerEvent$2, "triggerEvent", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11022
- reactHotLoader.register(external$9, "external", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11023
- reactHotLoader.register(getToolState$5, "getToolState", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11024
- reactHotLoader.register(loadHandlerManager, "loadHandlerManager", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11025
- reactHotLoader.register(EVENTS$2, "EVENTS", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11026
- reactHotLoader.register(_default$h, "default", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/util/scrollToIndex.js");
11027
- })();
11028
-
11029
- (function () {
11030
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11031
- leaveModule && leaveModule(module);
11032
- })();
11033
-
11034
- (function () {
11035
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11036
- enterModule && enterModule(module);
11037
- })();
11038
-
11039
- var __signature__$I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11040
- return a;
11041
- };
11042
-
11043
- /*
11044
- *****************************************************************
11045
- * C O P Y R I G H T (c) 2018-2019
11046
- * Suzhou Chainz Medical Technology Co.
11047
- * All Rights Reserved
11048
- *****************************************************************
11049
- *
11050
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
11051
- * Suzhou Chainz Medical Technology Co.
11052
- * The copyright notice above does not evidence any
11053
- * actual or intended publication of such source code.
11054
- *
11055
- *****************************************************************
11056
- *
11057
- * Author: Zhang Jiaqi
11058
- *
11059
- */
11060
- var ImageProcessType = {
11061
- Unkown: 0,
11062
-
11063
- /**
11064
- * 最大密度投影
11065
- */
11066
- MIP: 1,
11067
-
11068
- /**
11069
- * 多平面重建
11070
- */
11071
- MPR: 2,
11072
-
11073
- /**
11074
- * 曲面重建
11075
- */
11076
- CPR: 3,
11077
-
11078
- /**
11079
- * 表面重建
11080
- */
11081
- SSD: 4,
11082
-
11083
- /**
11084
- * VR
11085
- */
11086
- VR: 5,
11424
+ }, config), {}, {
11425
+ execute: function execute() {
11426
+ return cornerstone.loadAndCacheImage(imageId);
11427
+ }
11428
+ });
11429
+ }
11087
11430
 
11088
- /**
11089
- * 穿刺
11090
- */
11091
- Centesis: 6
11092
- };
11093
- var _default$i = {
11094
- ImageProcessType: ImageProcessType
11095
- };
11431
+ function resetTaskPool() {
11432
+ clear();
11433
+ }
11096
11434
 
11097
11435
  (function () {
11098
11436
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -11101,8 +11439,16 @@ var _default$i = {
11101
11439
  return;
11102
11440
  }
11103
11441
 
11104
- reactHotLoader.register(ImageProcessType, "ImageProcessType", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/domain/enums/ImageProcessType.js");
11105
- 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");
11106
11452
  })();
11107
11453
 
11108
11454
  (function () {
@@ -11115,53 +11461,32 @@ var _default$i = {
11115
11461
  enterModule && enterModule(module);
11116
11462
  })();
11117
11463
 
11118
- var __signature__$J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11464
+ var __signature__$G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11119
11465
  return a;
11120
11466
  };
11467
+ var dicomCache = {};
11121
11468
 
11122
- /*
11123
- *****************************************************************
11124
- * C O P Y R I G H T (c) 2018-2019
11125
- * Suzhou Chainz Medical Technology Co.
11126
- * All Rights Reserved
11127
- *****************************************************************
11128
- *
11129
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
11130
- * Suzhou Chainz Medical Technology Co.
11131
- * The copyright notice above does not evidence any
11132
- * actual or intended publication of such source code.
11133
- *
11134
- *****************************************************************
11135
- *
11136
- * Author: Zhang Jiaqi
11137
- *
11138
- */
11139
- var ImageProcessExceptionBase = /*#__PURE__*/function () {
11140
- function ImageProcessExceptionBase() {
11141
- classCallCheck(this, ImageProcessExceptionBase);
11142
- }
11143
-
11144
- createClass(ImageProcessExceptionBase, [{
11145
- key: "toString",
11146
- value: function toString() {
11147
- return this.message;
11148
- }
11149
- }, {
11150
- key: "__reactstandin__regenerateByEval",
11151
- // @ts-ignore
11152
- value: function __reactstandin__regenerateByEval(key, code) {
11153
- // @ts-ignore
11154
- this[key] = eval(code);
11155
- }
11156
- }, {
11157
- key: "message",
11158
- get: function get() {
11159
- return "未知错误";
11469
+ var loadAndCacheDicom = function loadAndCacheDicom(imageId) {
11470
+ return new Promise(function (resolve, reject) {
11471
+ if (dicomCache[imageId]) {
11472
+ resolve(dicomCache[imageId]);
11473
+ return;
11160
11474
  }
11161
- }]);
11162
11475
 
11163
- return ImageProcessExceptionBase;
11164
- }();
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
+ };
11165
11490
 
11166
11491
  (function () {
11167
11492
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -11170,7 +11495,9 @@ var ImageProcessExceptionBase = /*#__PURE__*/function () {
11170
11495
  return;
11171
11496
  }
11172
11497
 
11173
- 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");
11174
11501
  })();
11175
11502
 
11176
11503
  (function () {
@@ -11183,881 +11510,654 @@ var ImageProcessExceptionBase = /*#__PURE__*/function () {
11183
11510
  enterModule && enterModule(module);
11184
11511
  })();
11185
11512
 
11186
- 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); }; }
11187
11514
 
11188
- 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; } }
11189
11516
 
11190
- var __signature__$K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11517
+ var __signature__$H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11191
11518
  return a;
11192
11519
  };
11520
+ var BaseTool$5 = cornerstoneTools.importInternal('base/BaseTool');
11521
+ var getPixelSpacing$5 = cornerstoneTools.importInternal('util/getPixelSpacing');
11522
+ var devicePixelRatio$1 = getDevicePixelRatio();
11193
11523
 
11194
- var NotSupportImageProcessTypeException = /*#__PURE__*/function (_ImageProcessExceptio) {
11195
- inherits(NotSupportImageProcessTypeException, _ImageProcessExceptio);
11524
+ var RulerOverlayTool = /*#__PURE__*/function (_BaseTool) {
11525
+ inherits(RulerOverlayTool, _BaseTool);
11196
11526
 
11197
- var _super = _createSuper$d(NotSupportImageProcessTypeException);
11527
+ var _super = _createSuper$c(RulerOverlayTool);
11198
11528
 
11199
- function NotSupportImageProcessTypeException(text) {
11200
- var _this;
11529
+ function RulerOverlayTool() {
11530
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
11201
11531
 
11202
- classCallCheck(this, NotSupportImageProcessTypeException);
11532
+ classCallCheck(this, RulerOverlayTool);
11203
11533
 
11204
- _this = _super.call(this);
11205
- _this.orientType = text;
11206
- return _this;
11534
+ var defaultProps = {
11535
+ name: 'RulerOverlay',
11536
+ mixins: ['enabledOrDisabledBinaryTool']
11537
+ };
11538
+ return _super.call(this, props, defaultProps);
11207
11539
  }
11208
11540
 
11209
- createClass(NotSupportImageProcessTypeException, [{
11210
- key: "__reactstandin__regenerateByEval",
11211
- // @ts-ignore
11212
- value: function __reactstandin__regenerateByEval(key, code) {
11213
- // @ts-ignore
11214
- this[key] = eval(code);
11541
+ createClass(RulerOverlayTool, [{
11542
+ key: "enabledCallback",
11543
+ value: function enabledCallback(element) {
11544
+ this.forceImageUpdate(element);
11215
11545
  }
11216
11546
  }, {
11217
- key: "message",
11218
- get: function get() {
11219
- return String.format("未支持的图像后处理类型 -- {0}", this.orientType);
11220
- }
11221
- }]);
11222
-
11223
- return NotSupportImageProcessTypeException;
11224
- }(ImageProcessExceptionBase);
11225
-
11226
- (function () {
11227
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11228
-
11229
- if (!reactHotLoader) {
11230
- return;
11231
- }
11232
-
11233
- reactHotLoader.register(NotSupportImageProcessTypeException, "NotSupportImageProcessTypeException", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/exceptions/NotSupportImageProcessTypeException.js");
11234
- })();
11235
-
11236
- (function () {
11237
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11238
- leaveModule && leaveModule(module);
11239
- })();
11240
-
11241
- function _arrayWithoutHoles(arr) {
11242
- if (Array.isArray(arr)) return arrayLikeToArray(arr);
11243
- }
11244
-
11245
- var arrayWithoutHoles = _arrayWithoutHoles;
11246
-
11247
- function _iterableToArray(iter) {
11248
- if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
11249
- }
11250
-
11251
- var iterableToArray = _iterableToArray;
11252
-
11253
- function _nonIterableSpread() {
11254
- throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
11255
- }
11256
-
11257
- var nonIterableSpread = _nonIterableSpread;
11258
-
11259
- function _toConsumableArray(arr) {
11260
- return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
11261
- }
11262
-
11263
- var toConsumableArray = _toConsumableArray;
11264
-
11265
- var runtime_1 = createCommonjsModule(function (module) {
11266
- /**
11267
- * Copyright (c) 2014-present, Facebook, Inc.
11268
- *
11269
- * This source code is licensed under the MIT license found in the
11270
- * LICENSE file in the root directory of this source tree.
11271
- */
11272
-
11273
- var runtime = (function (exports) {
11274
-
11275
- var Op = Object.prototype;
11276
- var hasOwn = Op.hasOwnProperty;
11277
- var undefined$1; // More compressible than void 0.
11278
- var $Symbol = typeof Symbol === "function" ? Symbol : {};
11279
- var iteratorSymbol = $Symbol.iterator || "@@iterator";
11280
- var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
11281
- var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
11282
-
11283
- function define(obj, key, value) {
11284
- Object.defineProperty(obj, key, {
11285
- value: value,
11286
- enumerable: true,
11287
- configurable: true,
11288
- writable: true
11289
- });
11290
- return obj[key];
11291
- }
11292
- try {
11293
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
11294
- define({}, "");
11295
- } catch (err) {
11296
- define = function(obj, key, value) {
11297
- return obj[key] = value;
11298
- };
11299
- }
11300
-
11301
- function wrap(innerFn, outerFn, self, tryLocsList) {
11302
- // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
11303
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
11304
- var generator = Object.create(protoGenerator.prototype);
11305
- var context = new Context(tryLocsList || []);
11306
-
11307
- // The ._invoke method unifies the implementations of the .next,
11308
- // .throw, and .return methods.
11309
- generator._invoke = makeInvokeMethod(innerFn, self, context);
11310
-
11311
- return generator;
11312
- }
11313
- exports.wrap = wrap;
11314
-
11315
- // Try/catch helper to minimize deoptimizations. Returns a completion
11316
- // record like context.tryEntries[i].completion. This interface could
11317
- // have been (and was previously) designed to take a closure to be
11318
- // invoked without arguments, but in all the cases we care about we
11319
- // already have an existing method we want to call, so there's no need
11320
- // to create a new function object. We can even get away with assuming
11321
- // the method takes exactly one argument, since that happens to be true
11322
- // in every case, so we don't have to touch the arguments object. The
11323
- // only additional allocation required is the completion record, which
11324
- // has a stable shape and so hopefully should be cheap to allocate.
11325
- function tryCatch(fn, obj, arg) {
11326
- try {
11327
- return { type: "normal", arg: fn.call(obj, arg) };
11328
- } catch (err) {
11329
- return { type: "throw", arg: err };
11547
+ key: "disabledCallback",
11548
+ value: function disabledCallback(element) {
11549
+ this.forceImageUpdate(element);
11330
11550
  }
11331
- }
11332
-
11333
- var GenStateSuspendedStart = "suspendedStart";
11334
- var GenStateSuspendedYield = "suspendedYield";
11335
- var GenStateExecuting = "executing";
11336
- var GenStateCompleted = "completed";
11337
-
11338
- // Returning this object from the innerFn has the same effect as
11339
- // breaking out of the dispatch switch statement.
11340
- var ContinueSentinel = {};
11341
-
11342
- // Dummy constructor functions that we use as the .constructor and
11343
- // .constructor.prototype properties for functions that return Generator
11344
- // objects. For full spec compliance, you may wish to configure your
11345
- // minifier not to mangle the names of these two functions.
11346
- function Generator() {}
11347
- function GeneratorFunction() {}
11348
- function GeneratorFunctionPrototype() {}
11349
-
11350
- // This is a polyfill for %IteratorPrototype% for environments that
11351
- // don't natively support it.
11352
- var IteratorPrototype = {};
11353
- IteratorPrototype[iteratorSymbol] = function () {
11354
- return this;
11355
- };
11356
-
11357
- var getProto = Object.getPrototypeOf;
11358
- var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
11359
- if (NativeIteratorPrototype &&
11360
- NativeIteratorPrototype !== Op &&
11361
- hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
11362
- // This environment has a native %IteratorPrototype%; use it instead
11363
- // of the polyfill.
11364
- IteratorPrototype = NativeIteratorPrototype;
11365
- }
11366
-
11367
- var Gp = GeneratorFunctionPrototype.prototype =
11368
- Generator.prototype = Object.create(IteratorPrototype);
11369
- GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
11370
- GeneratorFunctionPrototype.constructor = GeneratorFunction;
11371
- GeneratorFunction.displayName = define(
11372
- GeneratorFunctionPrototype,
11373
- toStringTagSymbol,
11374
- "GeneratorFunction"
11375
- );
11376
-
11377
- // Helper for defining the .next, .throw, and .return methods of the
11378
- // Iterator interface in terms of a single ._invoke method.
11379
- function defineIteratorMethods(prototype) {
11380
- ["next", "throw", "return"].forEach(function(method) {
11381
- define(prototype, method, function(arg) {
11382
- return this._invoke(method, arg);
11383
- });
11384
- });
11385
- }
11386
-
11387
- exports.isGeneratorFunction = function(genFun) {
11388
- var ctor = typeof genFun === "function" && genFun.constructor;
11389
- return ctor
11390
- ? ctor === GeneratorFunction ||
11391
- // For the native GeneratorFunction constructor, the best we can
11392
- // do is to check its .name property.
11393
- (ctor.displayName || ctor.name) === "GeneratorFunction"
11394
- : false;
11395
- };
11551
+ }, {
11552
+ key: "forceImageUpdate",
11553
+ value: function forceImageUpdate(element) {
11554
+ var enabledElement = cornerstone.getEnabledElement(element);
11396
11555
 
11397
- exports.mark = function(genFun) {
11398
- if (Object.setPrototypeOf) {
11399
- Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
11400
- } else {
11401
- genFun.__proto__ = GeneratorFunctionPrototype;
11402
- define(genFun, toStringTagSymbol, "GeneratorFunction");
11556
+ if (enabledElement.image) {
11557
+ cornerstone.updateImage(element);
11558
+ }
11403
11559
  }
11404
- genFun.prototype = Object.create(Gp);
11405
- return genFun;
11406
- };
11407
-
11408
- // Within the body of any async function, `await x` is transformed to
11409
- // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
11410
- // `hasOwn.call(value, "__await")` to determine if the yielded value is
11411
- // meant to be awaited.
11412
- exports.awrap = function(arg) {
11413
- return { __await: arg };
11414
- };
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;
11415
11582
 
11416
- function AsyncIterator(generator, PromiseImpl) {
11417
- function invoke(method, arg, resolve, reject) {
11418
- var record = tryCatch(generator[method], generator, arg);
11419
- if (record.type === "throw") {
11420
- reject(record.arg);
11583
+ if (rulerSpace / rowHeightInCanvas < 0.5) {
11584
+ rulerLength = canvasHeight * rulerSpace / rowHeightInCanvas;
11585
+ text = rulerSpace + ' cm';
11421
11586
  } else {
11422
- var result = record.arg;
11423
- var value = result.value;
11424
- if (value &&
11425
- typeof value === "object" &&
11426
- hasOwn.call(value, "__await")) {
11427
- return PromiseImpl.resolve(value.__await).then(function(value) {
11428
- invoke("next", value, resolve, reject);
11429
- }, function(err) {
11430
- invoke("throw", err, resolve, reject);
11431
- });
11432
- }
11433
-
11434
- return PromiseImpl.resolve(value).then(function(unwrapped) {
11435
- // When a yielded Promise is resolved, its final value becomes
11436
- // the .value of the Promise<{value,done}> result for the
11437
- // current iteration.
11438
- result.value = unwrapped;
11439
- resolve(result);
11440
- }, function(error) {
11441
- // If a rejected Promise was yielded, throw the rejection back
11442
- // into the async generator function so it can be handled there.
11443
- return invoke("throw", error, resolve, reject);
11444
- });
11587
+ rulerLength = canvasHeight * 0.5;
11588
+ text = (rowHeightInCanvas * 5).toFixed(2) + ' mm';
11445
11589
  }
11446
- }
11447
11590
 
11448
- 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;
11449
11594
 
11450
- function enqueue(method, arg) {
11451
- function callInvokeWithMethodAndArg() {
11452
- return new PromiseImpl(function(resolve, reject) {
11453
- invoke(method, arg, resolve, reject);
11454
- });
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;
11455
11601
  }
11456
11602
 
11457
- return previousPromise =
11458
- // If enqueue has been called before, then we want to wait until
11459
- // all previous Promises have been resolved before calling invoke,
11460
- // so that results are always delivered in the correct order. If
11461
- // enqueue has not been called before, then it is important to
11462
- // call invoke immediately, without waiting on a callback to fire,
11463
- // so that the async generator function has the opportunity to do
11464
- // any necessary setup in a predictable way. This predictability
11465
- // is why the Promise constructor synchronously invokes its
11466
- // executor callback, and why async functions synchronously
11467
- // execute code before the first await. Since we implement simple
11468
- // async functions in terms of async generators, it is especially
11469
- // important to get this right, even though it requires care.
11470
- previousPromise ? previousPromise.then(
11471
- callInvokeWithMethodAndArg,
11472
- // Avoid propagating failures to Promises returned by later
11473
- // invocations of the iterator.
11474
- callInvokeWithMethodAndArg
11475
- ) : callInvokeWithMethodAndArg();
11476
- }
11603
+ lodash$1.range(point).map(function (i) {
11604
+ var tick = (i - (point - 1) / 2) / (point - 1);
11605
+ var tickLength;
11477
11606
 
11478
- // Define the unified helper method that is used to implement .next,
11479
- // .throw, and .return (see defineIteratorMethods).
11480
- this._invoke = enqueue;
11481
- }
11607
+ switch (tick) {
11608
+ case 0:
11609
+ {
11610
+ tickLength = tickMinor;
11611
+ }
11482
11612
 
11483
- defineIteratorMethods(AsyncIterator.prototype);
11484
- AsyncIterator.prototype[asyncIteratorSymbol] = function () {
11485
- return this;
11486
- };
11487
- exports.AsyncIterator = AsyncIterator;
11613
+ case -0.5:
11614
+ case 0.5:
11615
+ {
11616
+ tickLength = tickMajor;
11617
+ }
11488
11618
 
11489
- // Note that simple async functions are implemented on top of
11490
- // AsyncIterator objects; they just return a Promise for the value of
11491
- // the final result produced by the iterator.
11492
- exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
11493
- if (PromiseImpl === void 0) PromiseImpl = Promise;
11619
+ default:
11620
+ {
11621
+ tickLength = tickPatch;
11622
+ }
11623
+ }
11494
11624
 
11495
- var iter = new AsyncIterator(
11496
- wrap(innerFn, outerFn, self, tryLocsList),
11497
- PromiseImpl
11498
- );
11625
+ var y = anchor.y + rulerLength * tick;
11626
+ context.moveTo(anchor.x, y);
11627
+ context.lineTo(anchor.x - tickLength, y);
11628
+ });
11499
11629
 
11500
- return exports.isGeneratorFunction(outerFn)
11501
- ? iter // If outerFn is a generator, return the full iterator.
11502
- : iter.next().then(function(result) {
11503
- return result.done ? result.value : iter.next();
11504
- });
11505
- };
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;
11506
11638
 
11507
- function makeInvokeMethod(innerFn, self, context) {
11508
- 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);
11509
11648
 
11510
- return function invoke(method, arg) {
11511
- if (state === GenStateExecuting) {
11512
- throw new Error("Generator is already running");
11513
- }
11649
+ case 5:
11650
+ dicom = _context.sent;
11514
11651
 
11515
- if (state === GenStateCompleted) {
11516
- if (method === "throw") {
11517
- throw arg;
11518
- }
11652
+ if (dicom) {
11653
+ _context.next = 8;
11654
+ break;
11655
+ }
11519
11656
 
11520
- // Be forgiving, per 25.3.3.3.3 of the spec:
11521
- // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
11522
- return doneResult();
11523
- }
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
+ }
11524
11671
 
11525
- context.method = method;
11526
- context.arg = arg;
11672
+ return _context.abrupt("return");
11527
11673
 
11528
- while (true) {
11529
- var delegate = context.delegate;
11530
- if (delegate) {
11531
- var delegateResult = maybeInvokeDelegate(delegate, context);
11532
- if (delegateResult) {
11533
- if (delegateResult === ContinueSentinel) continue;
11534
- return delegateResult;
11535
- }
11536
- }
11674
+ case 16:
11675
+ if (rows >= cols) {
11676
+ rowHeightInCanvas = rowHeight / (rows * scale / canvasHeight);
11677
+ } else {
11678
+ rowHeightInCanvas = rowHeight / (rows * (rowPixelSpacing / colPixelSpacing) * scale / canvasHeight);
11679
+ }
11537
11680
 
11538
- if (context.method === "next") {
11539
- // Setting context._sent for legacy support of Babel's
11540
- // function.sent implementation.
11541
- context.sent = context._sent = context.arg;
11681
+ _i = 0, _arr = [100, 50, 20, 10, 5, 1];
11542
11682
 
11543
- } else if (context.method === "throw") {
11544
- if (state === GenStateSuspendedStart) {
11545
- state = GenStateCompleted;
11546
- throw context.arg;
11547
- }
11683
+ case 18:
11684
+ if (!(_i < _arr.length)) {
11685
+ _context.next = 26;
11686
+ break;
11687
+ }
11548
11688
 
11549
- context.dispatchException(context.arg);
11689
+ rulerLength = _arr[_i];
11550
11690
 
11551
- } else if (context.method === "return") {
11552
- context.abrupt("return", context.arg);
11553
- }
11691
+ if (!(rowHeightInCanvas / 2 / rulerLength > 1 || rulerLength === 1)) {
11692
+ _context.next = 23;
11693
+ break;
11694
+ }
11554
11695
 
11555
- state = GenStateExecuting;
11696
+ this.drawRuler(canvas, rowHeightInCanvas, rulerLength);
11697
+ return _context.abrupt("return");
11556
11698
 
11557
- var record = tryCatch(innerFn, self, context);
11558
- if (record.type === "normal") {
11559
- // If an exception is thrown from innerFn, we leave state ===
11560
- // GenStateExecuting and loop back for another invocation.
11561
- state = context.done
11562
- ? GenStateCompleted
11563
- : GenStateSuspendedYield;
11699
+ case 23:
11700
+ _i++;
11701
+ _context.next = 18;
11702
+ break;
11564
11703
 
11565
- if (record.arg === ContinueSentinel) {
11566
- continue;
11704
+ case 26:
11705
+ case "end":
11706
+ return _context.stop();
11707
+ }
11567
11708
  }
11709
+ }, _callee, this);
11710
+ }));
11568
11711
 
11569
- return {
11570
- value: record.arg,
11571
- done: context.done
11572
- };
11573
-
11574
- } else if (record.type === "throw") {
11575
- state = GenStateCompleted;
11576
- // Dispatch the exception by looping back around to the
11577
- // context.dispatchException(context.arg) call above.
11578
- context.method = "throw";
11579
- context.arg = record.arg;
11580
- }
11712
+ function renderToolData(_x) {
11713
+ return _renderToolData.apply(this, arguments);
11581
11714
  }
11582
- };
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;
11583
11735
  }
11584
11736
 
11585
- // Call delegate.iterator[context.method](context.arg) and handle the
11586
- // result, either by returning a { value, done } result from the
11587
- // delegate iterator, or by modifying context.method and context.arg,
11588
- // setting context.delegate to null, and returning the ContinueSentinel.
11589
- function maybeInvokeDelegate(delegate, context) {
11590
- var method = delegate.iterator[context.method];
11591
- if (method === undefined$1) {
11592
- // A .throw or .return when the delegate iterator has no .throw
11593
- // method always terminates the yield* loop.
11594
- 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
+ })();
11595
11742
 
11596
- if (context.method === "throw") {
11597
- // Note: ["return"] must be used for ES3 parsing compatibility.
11598
- if (delegate.iterator["return"]) {
11599
- // If the delegate iterator has a return method, give it a
11600
- // chance to clean up.
11601
- context.method = "return";
11602
- context.arg = undefined$1;
11603
- maybeInvokeDelegate(delegate, context);
11743
+ (function () {
11744
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11745
+ leaveModule && leaveModule(module);
11746
+ })();
11604
11747
 
11605
- if (context.method === "throw") {
11606
- // If maybeInvokeDelegate(context) changed context.method from
11607
- // "return" to "throw", let that override the TypeError below.
11608
- return ContinueSentinel;
11609
- }
11610
- }
11748
+ (function () {
11749
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11750
+ enterModule && enterModule(module);
11751
+ })();
11611
11752
 
11612
- context.method = "throw";
11613
- context.arg = new TypeError(
11614
- "The iterator does not provide a 'throw' method");
11615
- }
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; }
11616
11754
 
11617
- return ContinueSentinel;
11618
- }
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; }
11619
11756
 
11620
- 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
+ */
11621
11775
 
11622
- if (record.type === "throw") {
11623
- context.method = "throw";
11624
- context.arg = record.arg;
11625
- context.delegate = null;
11626
- return ContinueSentinel;
11627
- }
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);
11628
11782
 
11629
- var info = record.arg;
11783
+ var toolData = getToolState$5(element, 'stack');
11630
11784
 
11631
- if (! info) {
11632
- context.method = "throw";
11633
- context.arg = new TypeError("iterator result is not an object");
11634
- context.delegate = null;
11635
- return ContinueSentinel;
11636
- }
11785
+ if (!toolData || !toolData.data || !toolData.data.length) {
11786
+ return;
11787
+ }
11637
11788
 
11638
- if (info.done) {
11639
- // Assign the result of the finished delegate to the temporary
11640
- // variable specified by delegate.resultName (see delegateYield).
11641
- 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
11642
11790
 
11643
- // Resume execution at the desired location (see delegateYield).
11644
- context.next = delegate.nextLoc;
11791
+ var stackRenderer;
11645
11792
 
11646
- // If context.method was "throw" but the delegate handled the
11647
- // exception, let the outer generator proceed normally. If
11648
- // context.method was "next", forget context.arg since it has been
11649
- // "consumed" by the delegate iterator. If context.method was
11650
- // "return", allow the original .return call to continue in the
11651
- // outer generator.
11652
- if (context.method !== "return") {
11653
- context.method = "next";
11654
- context.arg = undefined$1;
11655
- }
11793
+ if (toolData.data.length > 1) {
11794
+ var stackRendererData = getToolState$5(element, 'stackRenderer');
11656
11795
 
11657
- } else {
11658
- // Re-yield the result returned by the delegate method.
11659
- return info;
11796
+ if (stackRendererData && stackRendererData.data && stackRendererData.data.length) {
11797
+ stackRenderer = stackRendererData.data[0];
11660
11798
  }
11661
-
11662
- // The delegate iterator is finished, so forget it and continue with
11663
- // the outer generator.
11664
- context.delegate = null;
11665
- return ContinueSentinel;
11666
11799
  }
11667
11800
 
11668
- // Define Generator.prototype.{next,throw,return} in terms of the
11669
- // unified ._invoke helper method.
11670
- defineIteratorMethods(Gp);
11801
+ var stackData = toolData.data[0]; // Allow for negative indexing
11671
11802
 
11672
- define(Gp, toStringTagSymbol, "Generator");
11803
+ if (newImageIdIndex < 0) {
11804
+ newImageIdIndex += stackData.imageIds.length;
11805
+ }
11673
11806
 
11674
- // A Generator should always return itself as the iterator object when the
11675
- // @@iterator function is called on it. Some browsers' implementations of the
11676
- // iterator prototype chain incorrectly implement this, causing the Generator
11677
- // object to not be returned from this call. This ensures that doesn't happen.
11678
- // See https://github.com/facebook/regenerator/issues/274 for more details.
11679
- Gp[iteratorSymbol] = function() {
11680
- return this;
11681
- };
11807
+ var startLoadingHandler = loadHandlerManager.getStartLoadHandler(element);
11808
+ var endLoadingHandler = loadHandlerManager.getEndLoadHandler(element);
11809
+ var errorLoadingHandler = loadHandlerManager.getErrorLoadingHandler(element);
11682
11810
 
11683
- Gp.toString = function() {
11684
- return "[object Generator]";
11685
- };
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.
11686
11816
 
11687
- function pushTryEntry(locs) {
11688
- var entry = { tryLoc: locs[0] };
11689
11817
 
11690
- if (1 in locs) {
11691
- entry.catchLoc = locs[1];
11818
+ try {
11819
+ // TODO: Add 'isElementEnabled' to Cornerstone?
11820
+ cornerstone.getEnabledElement(element);
11821
+ } catch (error) {
11822
+ return;
11692
11823
  }
11693
11824
 
11694
- if (2 in locs) {
11695
- entry.finallyLoc = locs[2];
11696
- entry.afterLoc = locs[3];
11825
+ if (stackRenderer) {
11826
+ stackRenderer.currentImageIdIndex = newImageIdIndex;
11827
+ stackRenderer.render(element, toolData.data);
11828
+ } else {
11829
+ cornerstone.displayImage(element, image);
11697
11830
  }
11698
11831
 
11699
- this.tryEntries.push(entry);
11700
- }
11832
+ if (endLoadingHandler) {
11833
+ endLoadingHandler(element, image);
11834
+ }
11701
11835
 
11702
- function resetTryEntry(entry) {
11703
- var record = entry.completion || {};
11704
- record.type = "normal";
11705
- delete record.arg;
11706
- entry.completion = record;
11836
+ if (callback) {
11837
+ callback({
11838
+ type: 'done',
11839
+ element: element
11840
+ });
11841
+ }
11707
11842
  }
11708
11843
 
11709
- function Context(tryLocsList) {
11710
- // The root entry object (effectively a try statement without a catch
11711
- // or a finally block) gives us a place to store values thrown from
11712
- // locations where there is no enclosing try statement.
11713
- this.tryEntries = [{ tryLoc: "root" }];
11714
- tryLocsList.forEach(pushTryEntry, this);
11715
- this.reset(true);
11716
- }
11844
+ function failCallback(error) {
11845
+ var imageId = stackData.imageIds[newImageIdIndex];
11717
11846
 
11718
- exports.keys = function(object) {
11719
- var keys = [];
11720
- for (var key in object) {
11721
- keys.push(key);
11847
+ if (errorLoadingHandler) {
11848
+ errorLoadingHandler(element, imageId, error);
11722
11849
  }
11723
- keys.reverse();
11724
-
11725
- // Rather than returning an object with a next method, we keep
11726
- // things simple and return the next function itself.
11727
- return function next() {
11728
- while (keys.length) {
11729
- var key = keys.pop();
11730
- if (key in object) {
11731
- next.value = key;
11732
- next.done = false;
11733
- return next;
11734
- }
11735
- }
11736
11850
 
11737
- // To avoid creating an additional object, we just hang the .value
11738
- // and .done properties off the next function object itself. This
11739
- // also ensures that the minifier will not anonymize the function.
11740
- next.done = true;
11741
- return next;
11742
- };
11743
- };
11851
+ if (callback) {
11852
+ callback({
11853
+ type: 'fail',
11854
+ element: element,
11855
+ imageId: imageId,
11856
+ error: error
11857
+ });
11858
+ }
11859
+ }
11744
11860
 
11745
- function values(iterable) {
11746
- if (iterable) {
11747
- var iteratorMethod = iterable[iteratorSymbol];
11748
- if (iteratorMethod) {
11749
- return iteratorMethod.call(iterable);
11750
- }
11861
+ if (newImageIdIndex === stackData.currentImageIdIndex) {
11862
+ return;
11863
+ }
11751
11864
 
11752
- if (typeof iterable.next === "function") {
11753
- return iterable;
11754
- }
11865
+ if (startLoadingHandler) {
11866
+ startLoadingHandler(element);
11867
+ }
11755
11868
 
11756
- if (!isNaN(iterable.length)) {
11757
- var i = -1, next = function next() {
11758
- while (++i < iterable.length) {
11759
- if (hasOwn.call(iterable, i)) {
11760
- next.value = iterable[i];
11761
- next.done = false;
11762
- return next;
11763
- }
11764
- }
11869
+ var eventData = _objectSpread$7({
11870
+ newImageIdIndex: newImageIdIndex,
11871
+ direction: newImageIdIndex - stackData.currentImageIdIndex
11872
+ }, _options);
11765
11873
 
11766
- next.value = undefined$1;
11767
- 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
11768
11877
 
11769
- return next;
11770
- };
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
11771
11887
 
11772
- return next.next = next;
11773
- }
11774
- }
11888
+ var preventCache = Boolean(stackData.preventCache);
11889
+ var imagePromise;
11775
11890
 
11776
- // Return an iterator with no values.
11777
- return { next: doneResult };
11891
+ if (preventCache) {
11892
+ imagePromise = cornerstone.loadImage(newImageId);
11893
+ } else {
11894
+ imagePromise = loadAndCacheImagePlus(newImageId);
11778
11895
  }
11779
- exports.values = values;
11780
11896
 
11781
- function doneResult() {
11782
- 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);
11783
11901
  }
11902
+ };
11784
11903
 
11785
- Context.prototype = {
11786
- constructor: Context,
11904
+ (function () {
11905
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11787
11906
 
11788
- reset: function(skipTempReset) {
11789
- this.prev = 0;
11790
- this.next = 0;
11791
- // Resetting context._sent for legacy support of Babel's
11792
- // function.sent implementation.
11793
- this.sent = this._sent = undefined$1;
11794
- this.done = false;
11795
- this.delegate = null;
11907
+ if (!reactHotLoader) {
11908
+ return;
11909
+ }
11796
11910
 
11797
- this.method = "next";
11798
- 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
+ })();
11799
11918
 
11800
- this.tryEntries.forEach(resetTryEntry);
11919
+ (function () {
11920
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
11921
+ leaveModule && leaveModule(module);
11922
+ })();
11801
11923
 
11802
- if (!skipTempReset) {
11803
- for (var name in this) {
11804
- // Not sure about the optimal order of these conditions:
11805
- if (name.charAt(0) === "t" &&
11806
- hasOwn.call(this, name) &&
11807
- !isNaN(+name.slice(1))) {
11808
- this[name] = undefined$1;
11809
- }
11810
- }
11811
- }
11812
- },
11924
+ (function () {
11925
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
11926
+ enterModule && enterModule(module);
11927
+ })();
11813
11928
 
11814
- stop: function() {
11815
- this.done = true;
11929
+ var __signature__$J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
11930
+ return a;
11931
+ };
11816
11932
 
11817
- var rootEntry = this.tryEntries[0];
11818
- var rootRecord = rootEntry.completion;
11819
- if (rootRecord.type === "throw") {
11820
- throw rootRecord.arg;
11821
- }
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,
11822
11952
 
11823
- return this.rval;
11824
- },
11953
+ /**
11954
+ * 最大密度投影
11955
+ */
11956
+ MIP: 1,
11825
11957
 
11826
- dispatchException: function(exception) {
11827
- if (this.done) {
11828
- throw exception;
11829
- }
11958
+ /**
11959
+ * 多平面重建
11960
+ */
11961
+ MPR: 2,
11830
11962
 
11831
- var context = this;
11832
- function handle(loc, caught) {
11833
- record.type = "throw";
11834
- record.arg = exception;
11835
- context.next = loc;
11963
+ /**
11964
+ * 曲面重建
11965
+ */
11966
+ CPR: 3,
11836
11967
 
11837
- if (caught) {
11838
- // If the dispatched exception was caught by a catch block,
11839
- // then let that catch block handle the exception normally.
11840
- context.method = "next";
11841
- context.arg = undefined$1;
11842
- }
11968
+ /**
11969
+ * 表面重建
11970
+ */
11971
+ SSD: 4,
11843
11972
 
11844
- return !! caught;
11845
- }
11973
+ /**
11974
+ * VR
11975
+ */
11976
+ VR: 5,
11846
11977
 
11847
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11848
- var entry = this.tryEntries[i];
11849
- var record = entry.completion;
11978
+ /**
11979
+ * 穿刺
11980
+ */
11981
+ Centesis: 6
11982
+ };
11983
+ var _default$i = {
11984
+ ImageProcessType: ImageProcessType
11985
+ };
11850
11986
 
11851
- if (entry.tryLoc === "root") {
11852
- // Exception thrown outside of any try block that could handle
11853
- // it, so set the completion value of the entire function to
11854
- // throw the exception.
11855
- return handle("end");
11856
- }
11987
+ (function () {
11988
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11857
11989
 
11858
- if (entry.tryLoc <= this.prev) {
11859
- var hasCatch = hasOwn.call(entry, "catchLoc");
11860
- 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
+ })();
11861
11997
 
11862
- if (hasCatch && hasFinally) {
11863
- if (this.prev < entry.catchLoc) {
11864
- return handle(entry.catchLoc, true);
11865
- } else if (this.prev < entry.finallyLoc) {
11866
- return handle(entry.finallyLoc);
11867
- }
11998
+ (function () {
11999
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
12000
+ leaveModule && leaveModule(module);
12001
+ })();
11868
12002
 
11869
- } else if (hasCatch) {
11870
- if (this.prev < entry.catchLoc) {
11871
- return handle(entry.catchLoc, true);
11872
- }
12003
+ (function () {
12004
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12005
+ enterModule && enterModule(module);
12006
+ })();
11873
12007
 
11874
- } else if (hasFinally) {
11875
- if (this.prev < entry.finallyLoc) {
11876
- return handle(entry.finallyLoc);
11877
- }
12008
+ var __signature__$K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12009
+ return a;
12010
+ };
11878
12011
 
11879
- } else {
11880
- throw new Error("try statement without catch or finally");
11881
- }
11882
- }
11883
- }
11884
- },
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
+ }
11885
12033
 
11886
- abrupt: function(type, arg) {
11887
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11888
- var entry = this.tryEntries[i];
11889
- if (entry.tryLoc <= this.prev &&
11890
- hasOwn.call(entry, "finallyLoc") &&
11891
- this.prev < entry.finallyLoc) {
11892
- var finallyEntry = entry;
11893
- break;
11894
- }
11895
- }
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
+ }]);
11896
12052
 
11897
- if (finallyEntry &&
11898
- (type === "break" ||
11899
- type === "continue") &&
11900
- finallyEntry.tryLoc <= arg &&
11901
- arg <= finallyEntry.finallyLoc) {
11902
- // Ignore the finally entry if control is not jumping to a
11903
- // location outside the try/catch block.
11904
- finallyEntry = null;
11905
- }
12053
+ return ImageProcessExceptionBase;
12054
+ }();
11906
12055
 
11907
- var record = finallyEntry ? finallyEntry.completion : {};
11908
- record.type = type;
11909
- record.arg = arg;
12056
+ (function () {
12057
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
11910
12058
 
11911
- if (finallyEntry) {
11912
- this.method = "next";
11913
- this.next = finallyEntry.finallyLoc;
11914
- return ContinueSentinel;
11915
- }
12059
+ if (!reactHotLoader) {
12060
+ return;
12061
+ }
11916
12062
 
11917
- return this.complete(record);
11918
- },
12063
+ reactHotLoader.register(ImageProcessExceptionBase, "ImageProcessExceptionBase", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-vtk/exceptions/ImageProcessExceptionBase.js");
12064
+ })();
11919
12065
 
11920
- complete: function(record, afterLoc) {
11921
- if (record.type === "throw") {
11922
- throw record.arg;
11923
- }
12066
+ (function () {
12067
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
12068
+ leaveModule && leaveModule(module);
12069
+ })();
11924
12070
 
11925
- if (record.type === "break" ||
11926
- record.type === "continue") {
11927
- this.next = record.arg;
11928
- } else if (record.type === "return") {
11929
- this.rval = this.arg = record.arg;
11930
- this.method = "return";
11931
- this.next = "end";
11932
- } else if (record.type === "normal" && afterLoc) {
11933
- this.next = afterLoc;
11934
- }
12071
+ (function () {
12072
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12073
+ enterModule && enterModule(module);
12074
+ })();
11935
12075
 
11936
- return ContinueSentinel;
11937
- },
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); }; }
11938
12077
 
11939
- finish: function(finallyLoc) {
11940
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11941
- var entry = this.tryEntries[i];
11942
- if (entry.finallyLoc === finallyLoc) {
11943
- this.complete(entry.completion, entry.afterLoc);
11944
- resetTryEntry(entry);
11945
- return ContinueSentinel;
11946
- }
11947
- }
11948
- },
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; } }
11949
12079
 
11950
- "catch": function(tryLoc) {
11951
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
11952
- var entry = this.tryEntries[i];
11953
- if (entry.tryLoc === tryLoc) {
11954
- var record = entry.completion;
11955
- if (record.type === "throw") {
11956
- var thrown = record.arg;
11957
- resetTryEntry(entry);
11958
- }
11959
- return thrown;
11960
- }
11961
- }
12080
+ var __signature__$L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12081
+ return a;
12082
+ };
11962
12083
 
11963
- // The context.catch method must only be called with a location
11964
- // argument that corresponds to a known catch block.
11965
- throw new Error("illegal catch attempt");
11966
- },
12084
+ var NotSupportImageProcessTypeException = /*#__PURE__*/function (_ImageProcessExceptio) {
12085
+ inherits(NotSupportImageProcessTypeException, _ImageProcessExceptio);
11967
12086
 
11968
- delegateYield: function(iterable, resultName, nextLoc) {
11969
- this.delegate = {
11970
- iterator: values(iterable),
11971
- resultName: resultName,
11972
- nextLoc: nextLoc
11973
- };
12087
+ var _super = _createSuper$d(NotSupportImageProcessTypeException);
11974
12088
 
11975
- if (this.method === "next") {
11976
- // Deliberately forget the last sent value so that we don't
11977
- // accidentally pass it on to the delegate.
11978
- this.arg = undefined$1;
11979
- }
12089
+ function NotSupportImageProcessTypeException(text) {
12090
+ var _this;
11980
12091
 
11981
- return ContinueSentinel;
11982
- }
11983
- };
12092
+ classCallCheck(this, NotSupportImageProcessTypeException);
11984
12093
 
11985
- // Regardless of whether this script is executing as a CommonJS module
11986
- // or not, return the runtime object so that we can declare the variable
11987
- // regeneratorRuntime in the outer scope, which allows this module to be
11988
- // injected easily by `bin/regenerator --include-runtime script.js`.
11989
- return exports;
12094
+ _this = _super.call(this);
12095
+ _this.orientType = text;
12096
+ return _this;
12097
+ }
11990
12098
 
11991
- }(
11992
- // If this script is executing as a CommonJS module, use module.exports
11993
- // as the regeneratorRuntime namespace. Otherwise create a new empty
11994
- // object. Either way, the resulting object will be used to initialize
11995
- // the regeneratorRuntime variable at the top of this file.
11996
- module.exports
11997
- ));
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
+ }]);
11998
12112
 
11999
- try {
12000
- regeneratorRuntime = runtime;
12001
- } catch (accidentalStrictMode) {
12002
- // This module should not be running in strict mode, so the above
12003
- // assignment should always work unless something is misconfigured. Just
12004
- // in case runtime.js accidentally runs in strict mode, we can escape
12005
- // strict mode using a global Function call. This could conceivably fail
12006
- // if a Content Security Policy forbids using Function, but in that case
12007
- // the proper solution is to fix the accidental strict mode problem. If
12008
- // you've misconfigured your bundler to force strict mode and applied a
12009
- // CSP to forbid Function, and you're not willing to fix either of those
12010
- // problems, please detail your unique predicament in a GitHub issue.
12011
- Function("r", "regeneratorRuntime = r")(runtime);
12012
- }
12013
- });
12113
+ return NotSupportImageProcessTypeException;
12114
+ }(ImageProcessExceptionBase);
12014
12115
 
12015
- var regenerator = runtime_1;
12116
+ (function () {
12117
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
12016
12118
 
12017
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
12018
- try {
12019
- var info = gen[key](arg);
12020
- var value = info.value;
12021
- } catch (error) {
12022
- reject(error);
12119
+ if (!reactHotLoader) {
12023
12120
  return;
12024
12121
  }
12025
12122
 
12026
- if (info.done) {
12027
- resolve(value);
12028
- } else {
12029
- Promise.resolve(value).then(_next, _throw);
12030
- }
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);
12031
12133
  }
12032
12134
 
12033
- function _asyncToGenerator(fn) {
12034
- return function () {
12035
- var self = this,
12036
- args = arguments;
12037
- return new Promise(function (resolve, reject) {
12038
- var gen = fn.apply(self, args);
12135
+ var arrayWithoutHoles = _arrayWithoutHoles;
12039
12136
 
12040
- function _next(value) {
12041
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
12042
- }
12137
+ function _iterableToArray(iter) {
12138
+ if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
12139
+ }
12043
12140
 
12044
- function _throw(err) {
12045
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
12046
- }
12141
+ var iterableToArray = _iterableToArray;
12047
12142
 
12048
- _next(undefined);
12049
- });
12050
- };
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.");
12051
12145
  }
12052
12146
 
12053
- 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;
12054
12154
 
12055
12155
  (function () {
12056
12156
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
12057
12157
  enterModule && enterModule(module);
12058
12158
  })();
12059
12159
 
12060
- var __signature__$L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12160
+ var __signature__$M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12061
12161
  return a;
12062
12162
  };
12063
12163
 
@@ -12130,7 +12230,7 @@ var _default$j = {
12130
12230
  enterModule && enterModule(module);
12131
12231
  })();
12132
12232
 
12133
- var __signature__$M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12233
+ var __signature__$N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12134
12234
  return a;
12135
12235
  };
12136
12236
 
@@ -12202,7 +12302,7 @@ function _createSuper$e(Derived) { var hasNativeReflectConstruct = _isNativeRefl
12202
12302
 
12203
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; } }
12204
12304
 
12205
- var __signature__$N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12305
+ var __signature__$O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12206
12306
  return a;
12207
12307
  };
12208
12308
 
@@ -12258,7 +12358,7 @@ var ActionParameterNotMatchException = /*#__PURE__*/function (_ImageProcessExcep
12258
12358
  enterModule && enterModule(module);
12259
12359
  })();
12260
12360
 
12261
- var __signature__$O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12361
+ var __signature__$P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12262
12362
  return a;
12263
12363
  };
12264
12364
 
@@ -12363,7 +12463,7 @@ function _createSuper$f(Derived) { var hasNativeReflectConstruct = _isNativeRefl
12363
12463
 
12364
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; } }
12365
12465
 
12366
- var __signature__$P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12466
+ var __signature__$Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12367
12467
  return a;
12368
12468
  };
12369
12469
 
@@ -12425,7 +12525,7 @@ function _unsupportedIterableToArray$1(o, minLen) { if (!o) return; if (typeof o
12425
12525
 
12426
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; }
12427
12527
 
12428
- var __signature__$Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12528
+ var __signature__$R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12429
12529
  return a;
12430
12530
  };
12431
12531
 
@@ -12824,7 +12924,7 @@ var pointInRect = function pointInRect(rect, point) {
12824
12924
  enterModule && enterModule(module);
12825
12925
  })();
12826
12926
 
12827
- var __signature__$R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12927
+ var __signature__$S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12828
12928
  return a;
12829
12929
  };
12830
12930
 
@@ -12912,7 +13012,7 @@ function _unsupportedIterableToArray$2(o, minLen) { if (!o) return; if (typeof o
12912
13012
 
12913
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; }
12914
13014
 
12915
- var __signature__$S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13015
+ var __signature__$T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
12916
13016
  return a;
12917
13017
  };
12918
13018
  var _ComputeVectorAngle = computeVectorAngle;
@@ -13437,7 +13537,7 @@ var computeImageViewDirection = function computeImageViewDirection(imagePosition
13437
13537
  enterModule && enterModule(module);
13438
13538
  })();
13439
13539
 
13440
- var __signature__$T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13540
+ var __signature__$U = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13441
13541
  return a;
13442
13542
  };
13443
13543
 
@@ -13539,7 +13639,7 @@ function _createSuper$g(Derived) { var hasNativeReflectConstruct = _isNativeRefl
13539
13639
 
13540
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; } }
13541
13641
 
13542
- var __signature__$U = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13642
+ var __signature__$V = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13543
13643
  return a;
13544
13644
  };
13545
13645
 
@@ -13595,7 +13695,7 @@ var InvalidImageException = /*#__PURE__*/function (_ImageProcessExceptio) {
13595
13695
  enterModule && enterModule(module);
13596
13696
  })();
13597
13697
 
13598
- var __signature__$V = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13698
+ var __signature__$W = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13599
13699
  return a;
13600
13700
  };
13601
13701
 
@@ -13645,7 +13745,7 @@ var RuntimeLogger = /*#__PURE__*/function () {
13645
13745
  enterModule && enterModule(module);
13646
13746
  })();
13647
13747
 
13648
- var __signature__$W = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13748
+ var __signature__$X = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13649
13749
  return a;
13650
13750
  };
13651
13751
 
@@ -13782,7 +13882,7 @@ defineProperty(CacheDataHelper, "InstanceGuid", "43A732CA-0C4A-4871-8413-28952F1
13782
13882
  enterModule && enterModule(module);
13783
13883
  })();
13784
13884
 
13785
- var __signature__$X = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13885
+ var __signature__$Y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13786
13886
  return a;
13787
13887
  };
13788
13888
 
@@ -13848,7 +13948,7 @@ var ImageDataCache = /*#__PURE__*/function () {
13848
13948
  enterModule && enterModule(module);
13849
13949
  })();
13850
13950
 
13851
- var __signature__$Y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13951
+ var __signature__$Z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
13852
13952
  return a;
13853
13953
  };
13854
13954
 
@@ -14376,7 +14476,7 @@ function _createSuper$h(Derived) { var hasNativeReflectConstruct = _isNativeRefl
14376
14476
 
14377
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; } }
14378
14478
 
14379
- var __signature__$Z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14479
+ var __signature__$_ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14380
14480
  return a;
14381
14481
  };
14382
14482
 
@@ -14432,7 +14532,7 @@ var NullReferencedException = /*#__PURE__*/function (_ImageProcessExceptio) {
14432
14532
  enterModule && enterModule(module);
14433
14533
  })();
14434
14534
 
14435
- var __signature__$_ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14535
+ var __signature__$$ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14436
14536
  return a;
14437
14537
  };
14438
14538
  /**
@@ -14529,7 +14629,7 @@ function _createSuper$i(Derived) { var hasNativeReflectConstruct = _isNativeRefl
14529
14629
 
14530
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; } }
14531
14631
 
14532
- var __signature__$$ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14632
+ var __signature__$10 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14533
14633
  return a;
14534
14634
  };
14535
14635
 
@@ -14889,7 +14989,7 @@ var forEach = function () {
14889
14989
  enterModule && enterModule(module);
14890
14990
  })();
14891
14991
 
14892
- var __signature__$10 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14992
+ var __signature__$11 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14893
14993
  return a;
14894
14994
  };
14895
14995
 
@@ -14932,7 +15032,7 @@ function guid() {
14932
15032
  enterModule && enterModule(module);
14933
15033
  })();
14934
15034
 
14935
- var __signature__$11 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15035
+ var __signature__$12 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
14936
15036
  return a;
14937
15037
  };
14938
15038
  /**
@@ -15005,7 +15105,7 @@ function _createSuper$j(Derived) { var hasNativeReflectConstruct = _isNativeRefl
15005
15105
 
15006
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; } }
15007
15107
 
15008
- var __signature__$12 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15108
+ var __signature__$13 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15009
15109
  return a;
15010
15110
  };
15011
15111
 
@@ -15692,7 +15792,7 @@ function ownKeys$8(object, enumerableOnly) { var keys = Object.keys(object); if
15692
15792
 
15693
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; }
15694
15794
 
15695
- var __signature__$13 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15795
+ var __signature__$14 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
15696
15796
  return a;
15697
15797
  };
15698
15798
  // vtkImageInterpolator methods
@@ -16230,7 +16330,7 @@ var _default$m = {
16230
16330
  enterModule && enterModule(module);
16231
16331
  })();
16232
16332
 
16233
- var __signature__$14 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
16333
+ var __signature__$15 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
16234
16334
  return a;
16235
16335
  };
16236
16336
 
@@ -17293,7 +17393,7 @@ var _default$n = {
17293
17393
  enterModule && enterModule(module);
17294
17394
  })();
17295
17395
 
17296
- var __signature__$15 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17396
+ var __signature__$16 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17297
17397
  return a;
17298
17398
  };
17299
17399
  var vtkErrorMacro$1 = macro.vtkErrorMacro; // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -17462,7 +17562,7 @@ function _createSuper$k(Derived) { var hasNativeReflectConstruct = _isNativeRefl
17462
17562
 
17463
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; } }
17464
17564
 
17465
- var __signature__$16 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17565
+ var __signature__$17 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
17466
17566
  return a;
17467
17567
  };
17468
17568
 
@@ -18033,7 +18133,7 @@ var MprImageProcessorWorkerImpl = /*#__PURE__*/function (_ImageProcessorWorker)
18033
18133
  enterModule && enterModule(module);
18034
18134
  })();
18035
18135
 
18036
- var __signature__$17 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18136
+ var __signature__$18 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18037
18137
  return a;
18038
18138
  };
18039
18139
 
@@ -18096,7 +18196,7 @@ var PresentColor = {
18096
18196
  enterModule && enterModule(module);
18097
18197
  })();
18098
18198
 
18099
- var __signature__$18 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18199
+ var __signature__$19 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18100
18200
  return a;
18101
18201
  };
18102
18202
 
@@ -18180,7 +18280,7 @@ var InteractorStyleActionMode = {
18180
18280
  enterModule && enterModule(module);
18181
18281
  })();
18182
18282
 
18183
- var __signature__$19 = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18283
+ var __signature__$1a = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18184
18284
  return a;
18185
18285
  };
18186
18286
 
@@ -18266,7 +18366,7 @@ function _createSuper$l(Derived) { var hasNativeReflectConstruct = _isNativeRefl
18266
18366
 
18267
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; } }
18268
18368
 
18269
- var __signature__$1a = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18369
+ var __signature__$1b = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18270
18370
  return a;
18271
18371
  };
18272
18372
  var MipPixelSegment = /*#__PURE__*/function () {
@@ -18973,7 +19073,7 @@ var MipActionParameterImpl = /*#__PURE__*/function (_ActionParameter) {
18973
19073
  enterModule && enterModule(module);
18974
19074
  })();
18975
19075
 
18976
- var __signature__$1b = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19076
+ var __signature__$1c = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
18977
19077
  return a;
18978
19078
  };
18979
19079
 
@@ -19103,7 +19203,7 @@ function _createSuper$m(Derived) { var hasNativeReflectConstruct = _isNativeRefl
19103
19203
 
19104
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; } }
19105
19205
 
19106
- var __signature__$1c = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19206
+ var __signature__$1d = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19107
19207
  return a;
19108
19208
  };
19109
19209
 
@@ -19223,7 +19323,7 @@ function _createSuper$n(Derived) { var hasNativeReflectConstruct = _isNativeRefl
19223
19323
 
19224
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; } }
19225
19325
 
19226
- var __signature__$1d = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19326
+ var __signature__$1e = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19227
19327
  return a;
19228
19328
  };
19229
19329
 
@@ -19342,7 +19442,7 @@ function _createSuper$o(Derived) { var hasNativeReflectConstruct = _isNativeRefl
19342
19442
 
19343
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; } }
19344
19444
 
19345
- var __signature__$1e = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19445
+ var __signature__$1f = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19346
19446
  return a;
19347
19447
  };
19348
19448
 
@@ -19458,7 +19558,7 @@ defineProperty(CameraEyeSightHelper_RHLF, "Instance", new CameraEyeSightHelper_R
19458
19558
  enterModule && enterModule(module);
19459
19559
  })();
19460
19560
 
19461
- var __signature__$1f = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19561
+ var __signature__$1g = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19462
19562
  return a;
19463
19563
  };
19464
19564
  /**
@@ -19582,7 +19682,7 @@ defineProperty(CameraHelper, "_eyeSightFuncs", new Map([[ImagePlanViewDirection.
19582
19682
  enterModule && enterModule(module);
19583
19683
  })();
19584
19684
 
19585
- var __signature__$1g = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19685
+ var __signature__$1h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
19586
19686
  return a;
19587
19687
  };
19588
19688
  var States = vtkInteractorStyleConstants.States;
@@ -20239,7 +20339,7 @@ function _createSuper$p(Derived) { var hasNativeReflectConstruct = _isNativeRefl
20239
20339
 
20240
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; } }
20241
20341
 
20242
- var __signature__$1h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
20342
+ var __signature__$1i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
20243
20343
  return a;
20244
20344
  };
20245
20345
 
@@ -21441,7 +21541,7 @@ function _createSuper$q(Derived) { var hasNativeReflectConstruct = _isNativeRefl
21441
21541
 
21442
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; } }
21443
21543
 
21444
- var __signature__$1i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21544
+ var __signature__$1j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21445
21545
  return a;
21446
21546
  };
21447
21547
  /**
@@ -21567,7 +21667,7 @@ var CentesisImageResultData = /*#__PURE__*/function (_MprImageResultData) {
21567
21667
  enterModule && enterModule(module);
21568
21668
  })();
21569
21669
 
21570
- var __signature__$1j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21670
+ var __signature__$1k = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21571
21671
  return a;
21572
21672
  };
21573
21673
  /**
@@ -21770,7 +21870,7 @@ function _createSuper$r(Derived) { var hasNativeReflectConstruct = _isNativeRefl
21770
21870
 
21771
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; } }
21772
21872
 
21773
- var __signature__$1k = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21873
+ var __signature__$1l = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
21774
21874
  return a;
21775
21875
  };
21776
21876
  /**
@@ -22634,7 +22734,7 @@ function _createSuper$s(Derived) { var hasNativeReflectConstruct = _isNativeRefl
22634
22734
 
22635
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; } }
22636
22736
 
22637
- var __signature__$1l = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
22737
+ var __signature__$1m = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
22638
22738
  return a;
22639
22739
  };
22640
22740
 
@@ -23020,7 +23120,7 @@ var CentesisImageProcessorWorkerImpl = /*#__PURE__*/function (_ImageProcessorWor
23020
23120
  enterModule && enterModule(module);
23021
23121
  })();
23022
23122
 
23023
- var __signature__$1m = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23123
+ var __signature__$1n = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23024
23124
  return a;
23025
23125
  };
23026
23126
  var workerCache = {};
@@ -23135,7 +23235,7 @@ function _unsupportedIterableToArray$5(o, minLen) { if (!o) return; if (typeof o
23135
23235
 
23136
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; }
23137
23237
 
23138
- var __signature__$1n = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23238
+ var __signature__$1o = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23139
23239
  return a;
23140
23240
  };
23141
23241
  var external$a = cornerstoneTools.external,
@@ -23227,7 +23327,7 @@ function changeMprPositionWithElement(element, positionChange, type) {
23227
23327
  enterModule && enterModule(module);
23228
23328
  })();
23229
23329
 
23230
- var __signature__$1o = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23330
+ var __signature__$1p = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23231
23331
  return a;
23232
23332
  };
23233
23333
  var clip = cornerstoneTools.importInternal('util/clip');
@@ -23406,7 +23506,7 @@ function _createSuper$t(Derived) { var hasNativeReflectConstruct = _isNativeRefl
23406
23506
 
23407
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; } }
23408
23508
 
23409
- var __signature__$1p = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23509
+ var __signature__$1q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23410
23510
  return a;
23411
23511
  };
23412
23512
  var BaseTool$6 = cornerstoneTools.importInternal('base/BaseTool');
@@ -23493,7 +23593,7 @@ var StackScrollMouseWheelTool = /*#__PURE__*/function (_BaseTool) {
23493
23593
  enterModule && enterModule(module);
23494
23594
  })();
23495
23595
 
23496
- var __signature__$1q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23596
+ var __signature__$1r = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23497
23597
  return a;
23498
23598
  };
23499
23599
 
@@ -23671,7 +23771,7 @@ function _createSuper$u(Derived) { var hasNativeReflectConstruct = _isNativeRefl
23671
23771
 
23672
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; } }
23673
23773
 
23674
- var __signature__$1r = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23774
+ var __signature__$1s = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23675
23775
  return a;
23676
23776
  };
23677
23777
  var BaseTool$7 = cornerstoneTools.importInternal('base/BaseTool');
@@ -23832,7 +23932,7 @@ var StackScrollTool = /*#__PURE__*/function (_BaseTool) {
23832
23932
  enterModule && enterModule(module);
23833
23933
  })();
23834
23934
 
23835
- var __signature__$1s = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23935
+ var __signature__$1t = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23836
23936
  return a;
23837
23937
  };
23838
23938
  var external$c = cornerstoneTools.external;
@@ -23975,7 +24075,7 @@ function _createSuper$v(Derived) { var hasNativeReflectConstruct = _isNativeRefl
23975
24075
 
23976
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; } }
23977
24077
 
23978
- var __signature__$1t = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24078
+ var __signature__$1u = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
23979
24079
  return a;
23980
24080
  };
23981
24081
  var getNewContext$7 = cornerstoneTools.importInternal('drawing/getNewContext');
@@ -24245,7 +24345,7 @@ function uid (len) {
24245
24345
  enterModule && enterModule(module);
24246
24346
  })();
24247
24347
 
24248
- var __signature__$1u = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24348
+ var __signature__$1v = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24249
24349
  return a;
24250
24350
  };
24251
24351
 
@@ -24763,7 +24863,7 @@ function _createSuper$w(Derived) { var hasNativeReflectConstruct = _isNativeRefl
24763
24863
 
24764
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; } }
24765
24865
 
24766
- var __signature__$1v = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24866
+ var __signature__$1w = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24767
24867
  return a;
24768
24868
  };
24769
24869
  var moveNewHandle$3 = cornerstoneTools.importInternal('manipulators/moveNewHandle');
@@ -25230,7 +25330,7 @@ var CTRTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
25230
25330
  enterModule && enterModule(module);
25231
25331
  })();
25232
25332
 
25233
- var __signature__$1w = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25333
+ var __signature__$1x = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25234
25334
  return a;
25235
25335
  };
25236
25336
  var planePlaneIntersection = cornerstoneTools.importInternal('util/planePlaneIntersection');
@@ -25284,7 +25384,7 @@ var _default$u = function _default(targetImagePlane, referenceImagePlane) {
25284
25384
  enterModule && enterModule(module);
25285
25385
  })();
25286
25386
 
25287
- var __signature__$1x = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25387
+ var __signature__$1y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25288
25388
  return a;
25289
25389
  };
25290
25390
  var convertToVector3 = cornerstoneTools.importInternal('util/convertToVector3');
@@ -25389,7 +25489,7 @@ function _createSuper$x(Derived) { var hasNativeReflectConstruct = _isNativeRefl
25389
25489
 
25390
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; } }
25391
25491
 
25392
- var __signature__$1y = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25492
+ var __signature__$1z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25393
25493
  return a;
25394
25494
  };
25395
25495
  var BaseTool$8 = cornerstoneTools.importInternal('base/BaseTool');
@@ -25565,7 +25665,7 @@ var ReferenceLinesTool = /*#__PURE__*/function (_BaseTool) {
25565
25665
  enterModule && enterModule(module);
25566
25666
  })();
25567
25667
 
25568
- var __signature__$1z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25668
+ var __signature__$1A = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25569
25669
  return a;
25570
25670
  };
25571
25671
 
@@ -25626,7 +25726,7 @@ function _createSuper$y(Derived) { var hasNativeReflectConstruct = _isNativeRefl
25626
25726
 
25627
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; } }
25628
25728
 
25629
- var __signature__$1A = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25729
+ var __signature__$1B = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25630
25730
  return a;
25631
25731
  };
25632
25732
  var getNewContext$a = cornerstoneTools.importInternal('drawing/getNewContext');
@@ -25888,7 +25988,7 @@ function _createSuper$z(Derived) { var hasNativeReflectConstruct = _isNativeRefl
25888
25988
 
25889
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; } }
25890
25990
 
25891
- var __signature__$1B = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25991
+ var __signature__$1C = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
25892
25992
  return a;
25893
25993
  };
25894
25994
  var external$i = cornerstoneTools.external;
@@ -26043,7 +26143,7 @@ function ownKeys$a(object, enumerableOnly) { var keys = Object.keys(object); if
26043
26143
 
26044
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; }
26045
26145
 
26046
- var __signature__$1C = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26146
+ var __signature__$1D = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26047
26147
  return a;
26048
26148
  };
26049
26149
  var EVENTS$3 = {
@@ -26455,7 +26555,7 @@ function resetToolState(element, mode) {
26455
26555
  enterModule && enterModule(module);
26456
26556
  })();
26457
26557
 
26458
- var __signature__$1D = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26558
+ var __signature__$1E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26459
26559
  return a;
26460
26560
  };
26461
26561
  var convertToVector3$3 = cornerstoneTools.importInternal('util/convertToVector3');
@@ -26496,7 +26596,7 @@ function _createSuper$A(Derived) { var hasNativeReflectConstruct = _isNativeRefl
26496
26596
 
26497
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; } }
26498
26598
 
26499
- var __signature__$1E = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26599
+ var __signature__$1F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26500
26600
  return a;
26501
26601
  };
26502
26602
  var getNewContext$c = cornerstoneTools.importInternal('drawing/getNewContext');
@@ -26942,7 +27042,7 @@ var ReferencePositionTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
26942
27042
  enterModule && enterModule(module);
26943
27043
  })();
26944
27044
 
26945
- var __signature__$1F = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27045
+ var __signature__$1G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26946
27046
  return a;
26947
27047
  };
26948
27048
  var getToolState$c = cornerstoneTools.getToolState;
@@ -26979,7 +27079,7 @@ var _default$w = function _default(element) {
26979
27079
  enterModule && enterModule(module);
26980
27080
  })();
26981
27081
 
26982
- var __signature__$1G = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27082
+ var __signature__$1H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
26983
27083
  return a;
26984
27084
  };
26985
27085
  var scrollToIndex$1 = cornerstoneTools.importInternal('util/scrollToIndex');
@@ -27057,7 +27157,7 @@ var _default$x = {
27057
27157
  enterModule && enterModule(module);
27058
27158
  })();
27059
27159
 
27060
- var __signature__$1H = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27160
+ var __signature__$1I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27061
27161
  return a;
27062
27162
  };
27063
27163
  var external$k = cornerstoneTools.external;
@@ -27344,7 +27444,7 @@ var _default$y = function _default(synchronizer, sourceElement, targetElement, e
27344
27444
  enterModule && enterModule(module);
27345
27445
  })();
27346
27446
 
27347
- var __signature__$1I = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27447
+ var __signature__$1J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27348
27448
  return a;
27349
27449
  };
27350
27450
  var external$l = cornerstoneTools.external;
@@ -27498,7 +27598,7 @@ var _default$z = function _default(synchronizer, sourceElement, targetElement, e
27498
27598
  enterModule && enterModule(module);
27499
27599
  })();
27500
27600
 
27501
- var __signature__$1J = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27601
+ var __signature__$1K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27502
27602
  return a;
27503
27603
  };
27504
27604
  var getToolState$e = cornerstoneTools.getToolState;
@@ -27573,7 +27673,7 @@ var _default$A = function _default(synchronizer, sourceElement, targetElement, e
27573
27673
  enterModule && enterModule(module);
27574
27674
  })();
27575
27675
 
27576
- var __signature__$1K = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27676
+ var __signature__$1L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27577
27677
  return a;
27578
27678
  };
27579
27679
  var external$m = cornerstoneTools.external;
@@ -27657,7 +27757,7 @@ var _default$B = function _default(synchronizer, sourceElement, targetElement, e
27657
27757
  enterModule && enterModule(module);
27658
27758
  })();
27659
27759
 
27660
- var __signature__$1L = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27760
+ var __signature__$1M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27661
27761
  return a;
27662
27762
  };
27663
27763
 
@@ -27698,7 +27798,7 @@ var _MPR_DIRECTION_COLOR;
27698
27798
  enterModule && enterModule(module);
27699
27799
  })();
27700
27800
 
27701
- var __signature__$1M = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27801
+ var __signature__$1N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27702
27802
  return a;
27703
27803
  };
27704
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);
@@ -27723,7 +27823,7 @@ var MPR_DIRECTION_COLOR = (_MPR_DIRECTION_COLOR = {}, defineProperty(_MPR_DIRECT
27723
27823
  enterModule && enterModule(module);
27724
27824
  })();
27725
27825
 
27726
- var __signature__$1N = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27826
+ var __signature__$1O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27727
27827
  return a;
27728
27828
  };
27729
27829
  var external$n = cornerstoneTools.external; // 两条直线求焦点
@@ -27793,7 +27893,7 @@ var _userAgent$cpu, _userAgent$device, _userAgent$os, _userAgent$os2, _userAgent
27793
27893
  enterModule && enterModule(module);
27794
27894
  })();
27795
27895
 
27796
- var __signature__$1O = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27896
+ var __signature__$1P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27797
27897
  return a;
27798
27898
  };
27799
27899
 
@@ -27929,7 +28029,7 @@ var _default$D = {
27929
28029
  enterModule && enterModule(module);
27930
28030
  })();
27931
28031
 
27932
- var __signature__$1P = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28032
+ var __signature__$1Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
27933
28033
  return a;
27934
28034
  };
27935
28035
  var external$o = cornerstoneTools.external;
@@ -28021,7 +28121,7 @@ function _createSuper$B(Derived) { var hasNativeReflectConstruct = _isNativeRefl
28021
28121
 
28022
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; } }
28023
28123
 
28024
- var __signature__$1Q = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28124
+ var __signature__$1R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28025
28125
  return a;
28026
28126
  };
28027
28127
  var external$p = cornerstoneTools.external;
@@ -28069,7 +28169,7 @@ var CrosshairsMPRTool = /*#__PURE__*/function (_BaseTool) {
28069
28169
  _this.currentDragPoint = {}; // 可旋转区域范围
28070
28170
 
28071
28171
  var isMobile = _default$D.isDeviceTypeMobile();
28072
- _this.area = isMobile ? 50 : 10; // 定位线的触发区域
28172
+ _this.area = isMobile ? 50 : 4; // 定位线的触发区域
28073
28173
 
28074
28174
  _this.centerArea = 15;
28075
28175
  _this.rotateArea = 3 / 4; // 旋转响应区域离中心点的距离(百分比
@@ -28727,7 +28827,7 @@ function _createSuper$C(Derived) { var hasNativeReflectConstruct = _isNativeRefl
28727
28827
 
28728
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; } }
28729
28829
 
28730
- var __signature__$1R = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28830
+ var __signature__$1S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28731
28831
  return a;
28732
28832
  };
28733
28833
  var external$q = cornerstoneTools.external;
@@ -28876,12 +28976,15 @@ var OverlayTool = /*#__PURE__*/function (_BaseTool) {
28876
28976
  enterModule && enterModule(module);
28877
28977
  })();
28878
28978
 
28879
- var __signature__$1S = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28979
+ var __signature__$1T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28880
28980
  return a;
28881
28981
  };
28882
28982
  var cornerstoneState = {
28883
28983
  imageViewports: [],
28884
- aiResult: null
28984
+ // 常规情况下
28985
+ aiResult: null,
28986
+ allImageViewports: [] // 全部模式专用
28987
+
28885
28988
  };
28886
28989
 
28887
28990
  function init(series) {
@@ -28916,6 +29019,12 @@ function get$1(key) {
28916
29019
  return cornerstoneState.aiResult;
28917
29020
  }
28918
29021
 
29022
+ if (key === 'allImageViewports') {
29023
+ return function (index) {
29024
+ return cornerstoneState.allImageViewports[index];
29025
+ };
29026
+ }
29027
+
28919
29028
  return cornerstoneState;
28920
29029
  }
28921
29030
 
@@ -28924,6 +29033,17 @@ function set$1(key, value) {
28924
29033
  cornerstoneState.imageViewports = value;
28925
29034
  }
28926
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
+
28927
29047
  if (key === 'image') {
28928
29048
  return function (elementIdx, index, viewport) {
28929
29049
  cornerstoneState.imageViewports[elementIdx][index] = lodash$1.cloneDeep(viewport);
@@ -28990,55 +29110,6 @@ function reset$2(key) {
28990
29110
  enterModule && enterModule(module);
28991
29111
  })();
28992
29112
 
28993
- var __signature__$1T = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
28994
- return a;
28995
- };
28996
- var dicomCache = {};
28997
-
28998
- var loadAndCacheDicom = function loadAndCacheDicom(imageId) {
28999
- return new Promise(function (resolve, reject) {
29000
- if (dicomCache[imageId]) {
29001
- resolve(dicomCache[imageId]);
29002
- return;
29003
- }
29004
-
29005
- var imagePromise = loadAndCacheImagePlus(imageId);
29006
- imagePromise.then(function (image) {
29007
- var dicom = new DicomInfo(image.data, image.getPixelData());
29008
- dicomCache[imageId] = dicom;
29009
- resolve(dicom);
29010
- }, function (e) {
29011
- reject(e);
29012
- });
29013
- });
29014
- };
29015
-
29016
- var purgeDicomCache = function purgeDicomCache() {
29017
- dicomCache = {};
29018
- };
29019
-
29020
- (function () {
29021
- var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
29022
-
29023
- if (!reactHotLoader) {
29024
- return;
29025
- }
29026
-
29027
- reactHotLoader.register(dicomCache, "dicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
29028
- reactHotLoader.register(loadAndCacheDicom, "loadAndCacheDicom", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
29029
- reactHotLoader.register(purgeDicomCache, "purgeDicomCache", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/dicom-parser-plus/dicom/utils/loadAndCacheDicom.js");
29030
- })();
29031
-
29032
- (function () {
29033
- var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
29034
- leaveModule && leaveModule(module);
29035
- })();
29036
-
29037
- (function () {
29038
- var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
29039
- enterModule && enterModule(module);
29040
- })();
29041
-
29042
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; }
29043
29114
 
29044
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; }
@@ -44106,7 +44177,7 @@ var DicomToolFlattenMode = /*#__PURE__*/function (_Component) {
44106
44177
  var IODisconnect = !IO;
44107
44178
  var commonTools = ['Layout', 'StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Rotate', 'ReverseColor', 'Reset', 'Cine', 'FalseColor', 'Link', 'ReferencePosition'];
44108
44179
 
44109
- if (mode === 'imageMode') {
44180
+ if (mode !== 'seriesMode') {
44110
44181
  commonTools = ['Layout', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Save', 'Rotate', 'ReverseColor', 'FalseColor'];
44111
44182
  }
44112
44183
 
@@ -44235,7 +44306,13 @@ var DicomToolFlattenMode = /*#__PURE__*/function (_Component) {
44235
44306
  onClick: function onClick() {
44236
44307
  toggleImageMode('ImageMode');
44237
44308
  }
44238
- }, "\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", {
44239
44316
  className: "paladin-flex-row"
44240
44317
  }, /*#__PURE__*/React__default.createElement(LargeToolItem, {
44241
44318
  active: ReferenceLines,
@@ -44395,7 +44472,7 @@ var DicomToolFlattenMode$1 = /*#__PURE__*/function (_Component) {
44395
44472
  var IODisconnect = !IO;
44396
44473
  var commonTools = ['Layout', 'StackScroll', 'Wwwc', 'Zoom', 'Pan', 'Rotate', 'ReverseColor', 'Reset', 'Cine', 'FalseColor', 'Link', 'ReferencePosition'];
44397
44474
 
44398
- if (mode === 'imageMode') {
44475
+ if (mode !== 'seriesMode') {
44399
44476
  commonTools = ['Layout', 'Wwwc', 'Zoom', 'Pan', 'Reset', 'Save', 'Rotate', 'ReverseColor', 'FalseColor'];
44400
44477
  }
44401
44478
 
@@ -44539,7 +44616,13 @@ var DicomToolFlattenMode$1 = /*#__PURE__*/function (_Component) {
44539
44616
  onClick: function onClick() {
44540
44617
  toggleImageMode('ImageMode');
44541
44618
  }
44542
- }, "\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", {
44543
44626
  className: "paladin-flex-row"
44544
44627
  }, /*#__PURE__*/React__default.createElement(LargeToolItem$1, {
44545
44628
  active: ReferenceLines,
@@ -45946,6 +46029,38 @@ var mergeProps$c = function mergeProps(propsFromState, propsFromDispatch, ownPro
45946
46029
  }
45947
46030
 
45948
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
+ }
45949
46064
 
45950
46065
  if (key === 'SeriesMode') {
45951
46066
  // 回到序列模式
@@ -45964,6 +46079,8 @@ var mergeProps$c = function mergeProps(propsFromState, propsFromDispatch, ownPro
45964
46079
  col: propsFromState.lastCustomCol
45965
46080
  });
45966
46081
  }
46082
+
46083
+ nextMode = 'seriesMode';
45967
46084
  } else {
45968
46085
  // 进入图像模式 如果没有开op则暂存序列的布局(因为op的话已经暂存过了)
45969
46086
  if (!propsFromState.onePickMode) {
@@ -45974,7 +46091,11 @@ var mergeProps$c = function mergeProps(propsFromState, propsFromDispatch, ownPro
45974
46091
  }
45975
46092
  }
45976
46093
 
45977
- propsFromDispatch.toggleViewMode();
46094
+ if (key === 'ImageMode') {
46095
+ nextMode = 'imageMode';
46096
+ }
46097
+
46098
+ propsFromDispatch.setViewMode(nextMode);
45978
46099
  },
45979
46100
  autoLink: function () {
45980
46101
  var _autoLink = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(refresh) {
@@ -46457,7 +46578,7 @@ var ConnectedDicomTool = reactRedux.connect(mapStateToProps$c, {
46457
46578
  activeDicomFunction: activeDicomFunction,
46458
46579
  setLinkSeries: setLinkSeries,
46459
46580
  setCineDireaction: setCineDireaction,
46460
- toggleViewMode: toggleViewMode,
46581
+ setViewMode: setViewMode,
46461
46582
  setScrollLine: setScrollLine,
46462
46583
  setImageScrollLine: setImageScrollLine,
46463
46584
  setLinkImages: setLinkImages,
@@ -47403,13 +47524,55 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
47403
47524
 
47404
47525
  var _super = _createSuper$1b(ViewportOverlay);
47405
47526
 
47406
- function ViewportOverlay() {
47527
+ function ViewportOverlay(props) {
47528
+ var _this;
47529
+
47407
47530
  classCallCheck(this, ViewportOverlay);
47408
47531
 
47409
- return _super.apply(this, arguments);
47532
+ _this = _super.call(this, props);
47533
+ _this.state = {
47534
+ dicom: null
47535
+ };
47536
+ return _this;
47410
47537
  }
47411
47538
 
47412
47539
  createClass(ViewportOverlay, [{
47540
+ key: "componentWillReceiveProps",
47541
+ value: function () {
47542
+ var _componentWillReceiveProps = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(nextProps, nextContext) {
47543
+ var _dicom;
47544
+
47545
+ return regenerator.wrap(function _callee$(_context) {
47546
+ while (1) {
47547
+ switch (_context.prev = _context.next) {
47548
+ case 0:
47549
+ _context.next = 2;
47550
+ return loadAndCacheDicom(nextProps.imageId);
47551
+
47552
+ case 2:
47553
+ _dicom = _context.sent;
47554
+
47555
+ if (_dicom) {
47556
+ this.setState({
47557
+ dicom: _dicom
47558
+ });
47559
+ }
47560
+
47561
+ case 4:
47562
+ case "end":
47563
+ return _context.stop();
47564
+ }
47565
+ }
47566
+ }, _callee, this);
47567
+ }));
47568
+
47569
+ function componentWillReceiveProps(_x, _x2) {
47570
+ return _componentWillReceiveProps.apply(this, arguments);
47571
+ }
47572
+
47573
+ return componentWillReceiveProps;
47574
+ }()
47575
+ }, {
47413
47576
  key: "render",
47414
47577
  value: function render() {
47415
47578
  var _this$props = this.props,
@@ -47423,7 +47586,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
47423
47586
  return null;
47424
47587
  }
47425
47588
 
47426
- var dicom = cornerstone.metaData.get('dicomInfo', imageId);
47589
+ var dicom = this.state.dicom;
47427
47590
 
47428
47591
  if (!dicom) {
47429
47592
  return null;
@@ -50866,7 +51029,7 @@ var mapDispatchToProps$4 = function mapDispatchToProps(dispatch) {
50866
51029
  onViewPortDoubleClick: function onViewPortDoubleClick() {
50867
51030
  // 双击返回序列模式
50868
51031
  dispatch(setLinkImages([]));
50869
- dispatch(toggleViewMode());
51032
+ dispatch(setViewMode('seriesMode'));
50870
51033
  },
50871
51034
  setLinkImages: function setLinkImages$1() {
50872
51035
  dispatch(setLinkImages.apply(void 0, arguments));
@@ -52749,6 +52912,257 @@ function colorMapFix(viewportData) {
52749
52912
  enterModule && enterModule(module);
52750
52913
  })();
52751
52914
 
52915
+ 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; }
52916
+
52917
+ 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; }
52918
+
52919
+ var __signature__$3h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52920
+ return a;
52921
+ };
52922
+ /**
52923
+ * 全部模式
52924
+ *
52925
+ */
52926
+
52927
+ var mapStateToProps$k = function mapStateToProps(state) {
52928
+ var _state$paladin$viewpo = state.paladin.viewport,
52929
+ imageActiveIndex = _state$paladin$viewpo.imageActiveIndex,
52930
+ linkImageIndex = _state$paladin$viewpo.linkImageIndex,
52931
+ linkImageModeSynchronizer = _state$paladin$viewpo.linkImageModeSynchronizer,
52932
+ activeIndex = _state$paladin$viewpo.activeIndex,
52933
+ lastActiveIndex = _state$paladin$viewpo.lastActiveIndex;
52934
+ var _state$paladin$tools$ = state.paladin.tools.layout,
52935
+ row = _state$paladin$tools$.row,
52936
+ col = _state$paladin$tools$.col,
52937
+ currentScrollLine = _state$paladin$tools$.currentScrollLine,
52938
+ currentScrollLineImage = _state$paladin$tools$.currentScrollLineImage,
52939
+ onePickMode = _state$paladin$tools$.onePickMode,
52940
+ lastScrollLine = _state$paladin$tools$.lastScrollLine,
52941
+ lastCustomRow = _state$paladin$tools$.lastCustomRow,
52942
+ lastCustomCol = _state$paladin$tools$.lastCustomCol;
52943
+ var _state$paladin$tools$2 = state.paladin.tools.action,
52944
+ Sync = _state$paladin$tools$2.Sync,
52945
+ showOverlayText = _state$paladin$tools$2.showOverlayText,
52946
+ activeTool = _state$paladin$tools$2.activeTool;
52947
+ return {
52948
+ imageActiveIndex: imageActiveIndex,
52949
+ activeIndex: activeIndex,
52950
+ linkImageIndex: linkImageIndex,
52951
+ row: row,
52952
+ col: col,
52953
+ Sync: Sync,
52954
+ currentScrollLine: currentScrollLine,
52955
+ currentScrollLineImage: currentScrollLineImage,
52956
+ linkImageModeSynchronizer: linkImageModeSynchronizer,
52957
+ showOverlayText: showOverlayText,
52958
+ activeTool: activeTool,
52959
+ onePickMode: onePickMode,
52960
+ lastScrollLine: lastScrollLine,
52961
+ lastActiveIndex: lastActiveIndex,
52962
+ lastCustomRow: lastCustomRow,
52963
+ lastCustomCol: lastCustomCol
52964
+ };
52965
+ };
52966
+
52967
+ var mapDispatchToProps$5 = function mapDispatchToProps(dispatch) {
52968
+ return {
52969
+ setScrollLine: function setScrollLine() {
52970
+ dispatch(setImageScrollLine.apply(void 0, arguments));
52971
+ },
52972
+ onViewPortCellClickDispatch: function onViewPortCellClickDispatch(index) {
52973
+ // 单击选中高亮
52974
+ dispatch(setImageActiveIndex(index));
52975
+ },
52976
+ onViewPortDoubleClick: function onViewPortDoubleClick() {
52977
+ // 双击返回序列模式
52978
+ dispatch(setLinkImages([]));
52979
+ dispatch(setViewMode('seriesMode'));
52980
+ },
52981
+ setLinkImages: function setLinkImages$1() {
52982
+ dispatch(setLinkImages.apply(void 0, arguments));
52983
+ },
52984
+ setLayout: function setLayout$1() {
52985
+ dispatch(setLayout.apply(void 0, arguments));
52986
+ }
52987
+ };
52988
+ };
52989
+
52990
+ var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownProps) {
52991
+ var imageActiveIndex = propsFromState.imageActiveIndex,
52992
+ linkImageIndex = propsFromState.linkImageIndex,
52993
+ activeIndex = propsFromState.activeIndex,
52994
+ currentScrollLine = propsFromState.currentScrollLine,
52995
+ currentScrollLineImage = propsFromState.currentScrollLineImage,
52996
+ row = propsFromState.row,
52997
+ col = propsFromState.col; // 和图像模式几乎一样 就是初始数据的获取方式不同
52998
+
52999
+ var study = ownProps.study;
53000
+ var allSeries = [];
53001
+ lodash$1.map(study, function (studyItem) {
53002
+ lodash$1.map(studyItem.series, function (seriesItem) {
53003
+ // seriesCount和instanceCount为了overlay的正确显示
53004
+ lodash$1.map(seriesItem.imageIds, function (image) {
53005
+ var data = {
53006
+ imageIds: [image],
53007
+ seriesInstanceUID: seriesItem.seriesInstanceUID,
53008
+ currentImageIdIndex: 0,
53009
+ seriesCount: seriesItem.seriesCount,
53010
+ instanceCount: seriesItem.numberOfSeriesRelatedInstances
53011
+ };
53012
+ allSeries.push(data);
53013
+ });
53014
+ });
53015
+ }); // images总数
53016
+
53017
+ var seriesTotalCount = allSeries.length; // 一页的网格总数
53018
+
53019
+ var onePageCount = row * col; // series的原始image数组
53020
+
53021
+ var startIndex = col * currentScrollLineImage;
53022
+ var endIndex = startIndex + onePageCount;
53023
+ var series = allSeries.slice(startIndex, endIndex);
53024
+ var showVerticalScroll = series && series.length / col > row;
53025
+ return _objectSpread$F(_objectSpread$F(_objectSpread$F(_objectSpread$F({}, ownProps), propsFromState), propsFromDispatch), {}, {
53026
+ currentScrollLine: currentScrollLineImage,
53027
+ series: series,
53028
+ activeIndex: imageActiveIndex,
53029
+ customScroll: seriesTotalCount > onePageCount,
53030
+ lazyLoad: seriesTotalCount > onePageCount,
53031
+ linkedIndexArr: linkImageIndex,
53032
+ seriesTotalCount: seriesTotalCount,
53033
+ showCustomScroll: false,
53034
+ showVerticalScroll: showVerticalScroll,
53035
+ onViewPortDoubleClick: function onViewPortDoubleClick() {
53036
+ // 测量工具下不响应双击操作
53037
+ if (!lodash$1.includes(['Wwwc', 'Zoom', 'Pan'], propsFromState.activeTool)) {
53038
+ return;
53039
+ } // 回到序列模式 如果是op模式开启的话 无论现在布局是什么 都回到1*1的op状态
53040
+
53041
+
53042
+ if (propsFromState.onePickMode) {
53043
+ propsFromDispatch.setLayout({
53044
+ row: 1,
53045
+ col: 1
53046
+ });
53047
+ } else {
53048
+ propsFromDispatch.setLayout({
53049
+ row: propsFromState.lastCustomRow,
53050
+ col: propsFromState.lastCustomCol
53051
+ });
53052
+ }
53053
+
53054
+ propsFromState.linkImageModeSynchronizer.destroy();
53055
+ propsFromDispatch.onViewPortDoubleClick();
53056
+ },
53057
+ onImageFirstRender: function onImageFirstRender(index) {
53058
+ // 首次加载把激活状态的element添加到sync中
53059
+ var linkImageModeSynchronizer = propsFromState.linkImageModeSynchronizer;
53060
+
53061
+ if (imageActiveIndex === index) {
53062
+ var dom = getElement(index);
53063
+ linkImageModeSynchronizer.add(dom);
53064
+ }
53065
+ },
53066
+ getCacheViewport: function getCacheViewport(layoutIndex) {
53067
+ // 渲染新图像的时候 优先用viewport缓存池中的
53068
+ // 如果是op模式还开启的状态 需要取缓存的数据来作为真正的seriesIndex
53069
+ var realImageIndex = col * currentScrollLineImage + layoutIndex;
53070
+ return get$1('allImageViewports')(realImageIndex);
53071
+ },
53072
+ handleViewportState: function handleViewportState(layoutIndex, viewport) {
53073
+ // 图像模式下 当image render,把对应的viewport缓存下来
53074
+ var realImageIndex = col * currentScrollLineImage + layoutIndex;
53075
+ set$1('allImageViewportsImage')(realImageIndex, viewport);
53076
+ },
53077
+ onSyncOpen: function onSyncOpen(element) {
53078
+ propsFromState.linkImageModeSynchronizer.add(element);
53079
+ },
53080
+ onSyncClose: function onSyncClose(element, index) {
53081
+ propsFromState.linkImageModeSynchronizer.remove(element);
53082
+
53083
+ if (lodash$1.includes(linkImageIndex, index) || index === imageActiveIndex) {
53084
+ propsFromState.linkImageModeSynchronizer.add(element);
53085
+ }
53086
+ },
53087
+ customScrollPan: function customScrollPan(value) {
53088
+ propsFromDispatch.setScrollLine(value);
53089
+ var realIndex = col * value + propsFromState.imageActiveIndex;
53090
+
53091
+ if (realIndex > seriesTotalCount - 1) {
53092
+ // 当前active的dom是空布局 自动选中当前布局的最后一个影响作为active
53093
+ var lastIndex = seriesTotalCount - col * value - 1;
53094
+ propsFromDispatch.onViewPortCellClickDispatch(lastIndex);
53095
+ }
53096
+ },
53097
+ handleCtrlSelect: function handleCtrlSelect(element, index) {
53098
+ var linkImageModeSynchronizer = propsFromState.linkImageModeSynchronizer;
53099
+ var setLinkImages = propsFromDispatch.setLinkImages;
53100
+ var links = lodash$1.cloneDeep(linkImageIndex);
53101
+
53102
+ if (linkImageIndex && lodash$1.includes(linkImageIndex, index)) {
53103
+ // 去除
53104
+ links = lodash$1.filter(links, function (item) {
53105
+ return item !== index;
53106
+ });
53107
+ linkImageModeSynchronizer.remove(element);
53108
+ } else {
53109
+ // 添加
53110
+ links.push(index);
53111
+ linkImageModeSynchronizer.add(element);
53112
+ }
53113
+
53114
+ setLinkImages(links);
53115
+ },
53116
+ onViewPortCellClick: function onViewPortCellClick(e, index) {
53117
+ // 需求:当前选中的序列默认在同步中
53118
+ // 当同步未开启,mousedown时把即将激活的元素加入sync中
53119
+ var linkImageModeSynchronizer = propsFromState.linkImageModeSynchronizer,
53120
+ Sync = propsFromState.Sync;
53121
+
53122
+ if (!Sync && !e.ctrlKey && e.button === 0) {
53123
+ if (!_.includes(linkImageIndex, imageActiveIndex)) {
53124
+ var oldActiveElement = getElement(imageActiveIndex);
53125
+ linkImageModeSynchronizer.remove(oldActiveElement);
53126
+ }
53127
+
53128
+ if (!_.includes(linkImageIndex, index)) {
53129
+ var element = getElement(index);
53130
+ linkImageModeSynchronizer.add(element);
53131
+ }
53132
+ }
53133
+
53134
+ propsFromDispatch.onViewPortCellClickDispatch(index);
53135
+ }
53136
+ });
53137
+ };
53138
+
53139
+ var ConnectedDicomAllImageModeLayout = reactRedux.connect(mapStateToProps$k, mapDispatchToProps$5, mergeProps$j)(DicomLayout);
53140
+ var _default$19 = ConnectedDicomAllImageModeLayout;
53141
+
53142
+ (function () {
53143
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
53144
+
53145
+ if (!reactHotLoader) {
53146
+ return;
53147
+ }
53148
+
53149
+ reactHotLoader.register(mapStateToProps$k, "mapStateToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53150
+ reactHotLoader.register(mapDispatchToProps$5, "mapDispatchToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53151
+ reactHotLoader.register(mergeProps$j, "mergeProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53152
+ reactHotLoader.register(ConnectedDicomAllImageModeLayout, "ConnectedDicomAllImageModeLayout", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53153
+ reactHotLoader.register(_default$19, "default", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomLayout/ConnectedDicomAllImageModeLayout.js");
53154
+ })();
53155
+
53156
+ (function () {
53157
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
53158
+ leaveModule && leaveModule(module);
53159
+ })();
53160
+
53161
+ (function () {
53162
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
53163
+ enterModule && enterModule(module);
53164
+ })();
53165
+
52752
53166
  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; } } }; }
52753
53167
 
52754
53168
  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); }
@@ -52759,7 +53173,7 @@ function _createSuper$1k(Derived) { var hasNativeReflectConstruct = _isNativeRef
52759
53173
 
52760
53174
  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; } }
52761
53175
 
52762
- var __signature__$3h = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53176
+ var __signature__$3i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
52763
53177
  return a;
52764
53178
  };
52765
53179
 
@@ -53275,13 +53689,16 @@ var DicomView = /*#__PURE__*/function (_Component) {
53275
53689
  study: this.state.study,
53276
53690
  windowLayoutType: this.props.windowLayoutType
53277
53691
  }));
53278
- var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && (this.props.mode === 'seriesMode' ? /*#__PURE__*/React__default.createElement(_default$14, {
53692
+ var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && this.props.mode === 'seriesMode' && /*#__PURE__*/React__default.createElement(_default$14, {
53279
53693
  series: this.props.series,
53280
53694
  showAIResult: this.props.showAIResult,
53281
53695
  onResizeEmit: this.props.onResizeEmit
53282
- }) : /*#__PURE__*/React__default.createElement(_default$15, {
53696
+ }), viewMode === '2D' && this.props.mode === 'imageMode' && /*#__PURE__*/React__default.createElement(_default$15, {
53697
+ onResizeEmit: this.props.onResizeEmit
53698
+ }), viewMode === '2D' && this.props.mode === 'allImageMode' && /*#__PURE__*/React__default.createElement(_default$19, {
53699
+ study: this.state.study,
53283
53700
  onResizeEmit: this.props.onResizeEmit
53284
- })), 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));
53701
+ }), 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));
53285
53702
  var DicomThumbnail = /*#__PURE__*/React__default.createElement("div", {
53286
53703
  className: "paladin-dicomView-dicomThumbnailWrapper"
53287
53704
  }, /*#__PURE__*/React__default.createElement(_default$10, {
@@ -53373,16 +53790,16 @@ function _unsupportedIterableToArray$g(o, minLen) { if (!o) return; if (typeof o
53373
53790
 
53374
53791
  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; }
53375
53792
 
53376
- 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; }
53793
+ 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; }
53377
53794
 
53378
- 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; }
53795
+ 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; }
53379
53796
 
53380
- var __signature__$3i = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53797
+ var __signature__$3j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53381
53798
  return a;
53382
53799
  };
53383
53800
  var scroll = _default$E.importInternal('util/scroll');
53384
53801
 
53385
- var mapStateToProps$k = function mapStateToProps(state) {
53802
+ var mapStateToProps$l = function mapStateToProps(state) {
53386
53803
  var _state$paladin$viewpo = state.paladin.viewport,
53387
53804
  activeIndex = _state$paladin$viewpo.activeIndex,
53388
53805
  imageActiveIndex = _state$paladin$viewpo.imageActiveIndex,
@@ -53436,7 +53853,7 @@ var mapStateToProps$k = function mapStateToProps(state) {
53436
53853
  };
53437
53854
  };
53438
53855
 
53439
- var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownProps) {
53856
+ var mergeProps$k = function mergeProps(propsFromState, propsFromDispatch, ownProps) {
53440
53857
  var activeIndex = propsFromState.activeIndex,
53441
53858
  imageActiveIndex = propsFromState.imageActiveIndex,
53442
53859
  MPR = propsFromState.MPR,
@@ -53483,7 +53900,7 @@ var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownPro
53483
53900
  */
53484
53901
 
53485
53902
 
53486
- return _objectSpread$F(_objectSpread$F(_objectSpread$F({}, ownProps), propsFromState), {}, {
53903
+ return _objectSpread$G(_objectSpread$G(_objectSpread$G({}, ownProps), propsFromState), {}, {
53487
53904
  showDicomThumbnail: showDicomThumbnail,
53488
53905
  viewMode: viewMode,
53489
53906
  keyMap: {
@@ -53878,7 +54295,7 @@ var mergeProps$j = function mergeProps(propsFromState, propsFromDispatch, ownPro
53878
54295
  });
53879
54296
  };
53880
54297
 
53881
- var ConnectedDicomView = reactRedux.connect(mapStateToProps$k, {
54298
+ var ConnectedDicomView = reactRedux.connect(mapStateToProps$l, {
53882
54299
  initSeries: initSeries,
53883
54300
  addSeries: addSeries,
53884
54301
  setCurrentSeries: setCurrentSeries,
@@ -53897,7 +54314,7 @@ var ConnectedDicomView = reactRedux.connect(mapStateToProps$k, {
53897
54314
  activeDicomFunction: activeDicomFunction,
53898
54315
  openIO: openIO,
53899
54316
  closeIO: closeIO
53900
- }, mergeProps$j, withRef())(DicomView);
54317
+ }, mergeProps$k, withRef())(DicomView);
53901
54318
 
53902
54319
  function withRef() {
53903
54320
  var reactReduxVersion = package_json.version.split('.')[0];
@@ -53913,7 +54330,7 @@ function withRef() {
53913
54330
  }
53914
54331
  }
53915
54332
 
53916
- var _default$19 = ConnectedDicomView;
54333
+ var _default$1a = ConnectedDicomView;
53917
54334
 
53918
54335
  (function () {
53919
54336
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -53923,11 +54340,11 @@ var _default$19 = ConnectedDicomView;
53923
54340
  }
53924
54341
 
53925
54342
  reactHotLoader.register(scroll, "scroll", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53926
- reactHotLoader.register(mapStateToProps$k, "mapStateToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53927
- reactHotLoader.register(mergeProps$j, "mergeProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
54343
+ reactHotLoader.register(mapStateToProps$l, "mapStateToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
54344
+ reactHotLoader.register(mergeProps$k, "mergeProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53928
54345
  reactHotLoader.register(ConnectedDicomView, "ConnectedDicomView", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53929
54346
  reactHotLoader.register(withRef, "withRef", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53930
- reactHotLoader.register(_default$19, "default", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
54347
+ reactHotLoader.register(_default$1a, "default", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
53931
54348
  })();
53932
54349
 
53933
54350
  (function () {
@@ -53940,10 +54357,10 @@ var _default$19 = ConnectedDicomView;
53940
54357
  enterModule && enterModule(module);
53941
54358
  })();
53942
54359
 
53943
- var __signature__$3j = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
54360
+ var __signature__$3k = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
53944
54361
  return a;
53945
54362
  };
53946
- var _default$1a = _default$19;
54363
+ var _default$1b = _default$1a;
53947
54364
 
53948
54365
  (function () {
53949
54366
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
@@ -53952,7 +54369,7 @@ var _default$1a = _default$19;
53952
54369
  return;
53953
54370
  }
53954
54371
 
53955
- reactHotLoader.register(_default$1a, "default", "/Users/huyeqing/workspace/chainz/paladin/src/index.js");
54372
+ reactHotLoader.register(_default$1b, "default", "/Users/huyeqing/workspace/chainz/paladin/src/index.js");
53956
54373
  })();
53957
54374
 
53958
54375
  (function () {
@@ -53961,6 +54378,6 @@ var _default$1a = _default$19;
53961
54378
  })();
53962
54379
 
53963
54380
  exports.cornerstoneUtils = index;
53964
- exports.default = _default$1a;
54381
+ exports.default = _default$1b;
53965
54382
  exports.reducers = _default$I;
53966
54383
  //# sourceMappingURL=index.js.map