hellfire 0.30.13 → 0.31.0

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
@@ -72,6 +72,8 @@ function _defineProperty(obj, key, value) {
72
72
 
73
73
  var defineProperty = _defineProperty;
74
74
 
75
+ var SOCKET_INIT_REDUX = 'SOCKET_INIT_REDUX';
76
+
75
77
  function ownKeys(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; }
76
78
 
77
79
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -106,12 +108,12 @@ var phoneTools = ["Prev", "Next", "StackScroll", "Wwwc", "Zoom", "Pan", "Reset",
106
108
  var mprTools = ["MprExit", "PrevNext", "MprSwitchPerspective", "CrosshairsMPR", "StackScroll", "Wwwc", "Zoom", "Pan", "Reset", "Rotate", "Tool", "Length", "Fullscreen", "MprRefresh"];
107
109
  var mprPhoneTools = ["MprExit", "StackScroll", "MprSwitchPerspective", "CrosshairsMPR", "Wwwc", "Zoom", "Pan", "Reset", "Rotate", "Tool", "Length", "MprRefresh"]; // VR 允许使用的工具, 及其排序
108
110
 
109
- var vrTools = ["MprExit", "PrevNext", "VRMode", "VRPresentColor", "VRCenterPointShow", "VRDirection", "VRClip", "VRRefresh", "VRInfo", "MprSwitchPerspective", "CrosshairsMPR", "StackScroll", "Wwwc", "Zoom", "Pan", "Reset", "Rotate", "Tool", "Length", "Fullscreen", "MprRefresh"];
111
+ var vrTools = ["MprExit", "PrevNext", "VRMode", "VRPresentColor", "VRCenterPointShow", "VRDirection", "VRClip", "VRResetClip", "VRRefresh", "VRInfo", "MprSwitchPerspective", "CrosshairsMPR", "StackScroll", "Wwwc", "Zoom", "Pan", "Reset", "Rotate", "Tool", "Length", "Fullscreen", "MprRefresh"];
110
112
  var vrPhoneTools = ["MprExit", "VRMode", "VRPresentColor", "VRCenterPointShow", "VRDirection", "VRClip", "VRInfo", "Prev", "Next", "MprSwitchPerspective", "CrosshairsMPR", "StackScroll", "Wwwc", "Zoom", "Pan", "Reset", "Rotate", "Tool", "Length", "MprRefresh"];
111
113
  var surgeryTools = ["SurgeryExit", "CentesisStart", "CentesisEnd", "CentesisSave", "PrevNext", "StackScroll", "Wwwc", "Zoom", "Pan", "Reset", "Rotate", "Tool", "Length", "Fullscreen"];
112
114
  var surgeryPhoneTools = ["SurgeryExit", "CentesisStart", "CentesisEnd", "CentesisSave", "Prev", "Next", "StackScroll", "Wwwc", "Zoom", "Pan", "Reset", "Rotate", "Tool", "Length"]; // MIP 允许使用的工具, 及其排序
113
115
 
114
- var mipTools = ["MprExit", "MipWWWc", "MipRotate", "MipZoom", "VRDirection", "VRCine", "VRRefresh"]; // 初始化时工具栏平铺or单列
116
+ var mipTools = ["MprExit", "MipWWWc", "MipRotate", "MipZoom", "VRDirection", "VRCine", "VRResetClip", "VRRefresh"]; // 初始化时工具栏平铺or单列
115
117
 
116
118
  var initToolMode = 'flatten'; // const localToolMode = window.localStorage.getItem('hellfire-custom-toolMode');
117
119
  // if (localToolMode) {
@@ -12614,6 +12616,7 @@ var resources = {
12614
12616
  tool_center_show: 'Show Center Point',
12615
12617
  tool_center_hide: 'Hide Center Point',
12616
12618
  tool_clip: 'Clip',
12619
+ reset_clip: 'Reset Clip',
12617
12620
  tool_mode_tooltip: 'View Mode, Click to switch',
12618
12621
  tool_mode_std: 'Std',
12619
12622
  tool_mode_std_detail: 'Standard Mode',
@@ -12836,6 +12839,8 @@ var resources = {
12836
12839
  tool_center_show: '显示中心点',
12837
12840
  tool_center_hide: '隐藏中心点',
12838
12841
  tool_clip: '裁剪',
12842
+ reset_clip: '撤销',
12843
+ reset_clip_tooltip: '撤销裁剪',
12839
12844
  tool_mode_tooltip: '看图模式,可点击后修改',
12840
12845
  tool_mode_std: '常规',
12841
12846
  tool_mode_std_detail: '常规',
@@ -16973,7 +16978,12 @@ var InteractorStyleActionMode = {
16973
16978
  /**
16974
16979
  * 填充区域
16975
16980
  */
16976
- FillInClip: 71024
16981
+ FillInClip: 71024,
16982
+
16983
+ /**
16984
+ * 自定义裁剪撤销
16985
+ */
16986
+ ResetClip: 91024
16977
16987
  };
16978
16988
 
16979
16989
  /*
@@ -18219,23 +18229,6 @@ var CameraHelper = /*#__PURE__*/function () {
18219
18229
 
18220
18230
  defineProperty(CameraHelper, "_eyeSightFuncs", new Map([[ImagePlanViewDirection.eRALP, CameraEyeSightHelper_RALP.Instance], [ImagePlanViewDirection.eAHPF, CameraEyeSightHelper_AHPF.Instance], [ImagePlanViewDirection.eRHLF, CameraEyeSightHelper_RHLF.Instance]]));
18221
18231
 
18222
- /*
18223
- *****************************************************************
18224
- * C O P Y R I G H T (c) 2018-2019
18225
- * Suzhou Chainz Medical Technology Co.
18226
- * All Rights Reserved
18227
- *****************************************************************
18228
- *
18229
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
18230
- * Suzhou Chainz Medical Technology Co.
18231
- * The copyright notice above does not evidence any
18232
- * actual or intended publication of such source code.
18233
- *
18234
- *****************************************************************
18235
- *
18236
- * Author: Zhang Jiaqi
18237
- *
18238
- */
18239
18232
  var States = vtkInteractorStyleConstants.States;
18240
18233
  var vtkErrorMacro$2 = macro.vtkErrorMacro,
18241
18234
  vtkDebugMacro$1 = macro.vtkDebugMacro;
@@ -18289,23 +18282,28 @@ function vtkInteractorStyleEx(publicAPI, model) {
18289
18282
  case InteractorStyleActionMode.SelectClipIn:
18290
18283
  case InteractorStyleActionMode.SelectClipOut:
18291
18284
  case InteractorStyleActionMode.FillInClip:
18292
- model._clipRect.bottomRight = [pos.x, pos.y];
18293
- model._clipRect.topRight = [pos.x, model._clipRect.topRight[1]];
18294
- model._clipRect.bottomLeft = [model._clipRect.bottomLeft[0], pos.y];
18295
- model._clipRect3D.topRight = publicAPI.displayToWorld(model._clipRect.topRight, callData);
18296
- model._clipRect3D.bottomLeft = publicAPI.displayToWorld(model._clipRect.bottomLeft, callData);
18297
- model._clipRect3D.bottomRight = publicAPI.displayToWorld(model._clipRect.bottomRight, callData);
18298
- model._clipRect3D.topLeft2 = publicAPI.displayToWorld({
18299
- x: model._clipRect.topLeft[0],
18300
- y: model._clipRect.topLeft[1]
18301
- }, callData);
18302
- var clipNormal = normalizeVector([model._clipRect3D.topLeft2[0] - model._clipRect3D.topLeft[0], model._clipRect3D.topLeft2[1] - model._clipRect3D.topLeft[1], model._clipRect3D.topLeft2[2] - model._clipRect3D.topLeft[2]]);
18285
+ var newPoint2D = [pos.x, pos.y];
18286
+ var newPoint3D = publicAPI.displayToWorld(newPoint2D, callData);
18287
+
18288
+ model._clipPath2D.push(newPoint2D);
18289
+
18290
+ model._clipPath3D.push(newPoint3D);
18291
+
18292
+ if (model._clipPath3D.length === 1) {
18293
+ var nearPoint = model._clipPath3D[0];
18294
+ var farPoint = publicAPI.displayToWorld({
18295
+ x: newPoint2D[0],
18296
+ y: newPoint2D[1]
18297
+ }, callData);
18298
+ model._clipPath3D2 = farPoint;
18299
+ model._clipNormal = normalizeVector([farPoint[0] - nearPoint[0], farPoint[1] - nearPoint[1], farPoint[2] - nearPoint[2]]);
18300
+ }
18303
18301
 
18304
18302
  if (model.isMouseButtonPress) {
18305
18303
  Messager.Instance.call(MessagerKeys.MipAddClipPathPoint, model.messageGroupId, {
18306
- clipRect: model._clipRect,
18307
- clipRect3D: model._clipRect3D,
18308
- clipNormal: clipNormal,
18304
+ clipPath2D: model._clipPath2D,
18305
+ clipPath3D: model._clipPath3D,
18306
+ clipNormal: model._clipNormal,
18309
18307
  clipId: model.currentClipGuid
18310
18308
  });
18311
18309
  }
@@ -18387,34 +18385,47 @@ function vtkInteractorStyleEx(publicAPI, model) {
18387
18385
  case InteractorStyleActionMode.SelectClipOut:
18388
18386
  case InteractorStyleActionMode.FillInClip:
18389
18387
  {
18390
- model._clipRect = {
18391
- topLeft: [pos.x, pos.y],
18392
- topRight: [pos.x, pos.y],
18393
- bottomLeft: [pos.x, pos.y],
18394
- bottomRight: [pos.x, pos.y]
18395
- };
18396
- model._clipRect3D = {
18397
- topLeft: [0, 0, 0],
18398
- topRight: [0, 0, 0],
18399
- bottomLeft: [0, 0, 0],
18400
- bottomRight: [0, 0, 0]
18401
- };
18402
- model._clipRect3D.topLeft = publicAPI.displayToWorld(model._clipRect.topLeft, callData);
18403
- model._clipRect3D.topRight = publicAPI.displayToWorld(model._clipRect.topRight, callData);
18404
- model._clipRect3D.bottomLeft = publicAPI.displayToWorld(model._clipRect.bottomLeft, callData);
18405
- model._clipRect3D.bottomRight = publicAPI.displayToWorld(model._clipRect.bottomRight, callData);
18406
- model._clipRect3D.topLeft2 = publicAPI.displayToWorld({
18407
- x: model._clipRect.topLeft[0],
18408
- y: model._clipRect.topLeft[1]
18409
- }, callData);
18410
- var clipNormal = normalizeVector([model._clipRect3D.topLeft2[0] - model._clipRect3D.topLeft[0], model._clipRect3D.topLeft2[1] - model._clipRect3D.topLeft[1], model._clipRect3D.topLeft2[2] - model._clipRect3D.topLeft[2]]);
18411
- model.currentClipGuid = guid();
18412
- Messager.Instance.call(MessagerKeys.MipAddClipPathPoint, model.messageGroupId, {
18413
- clipRect: model._clipRect,
18414
- clipRect3D: model._clipRect3D,
18415
- clipNormal: clipNormal,
18416
- clipId: model.currentClipGuid
18417
- });
18388
+ if (!model.currentClipGuid) {
18389
+ model.currentClipGuid = guid();
18390
+ }
18391
+
18392
+ if (!Array.isArray(model._clipPath2D)) {
18393
+ model._clipPath2D = [];
18394
+ }
18395
+
18396
+ if (!Array.isArray(model._clipPath3D)) {
18397
+ model._clipPath3D = [];
18398
+ }
18399
+
18400
+ if (!Array.isArray(model._clipNormal)) {
18401
+ model._clipNormal = [];
18402
+ }
18403
+
18404
+ var newPoint2D = [pos.x, pos.y];
18405
+ var newPoint3D = publicAPI.displayToWorld(newPoint2D, callData);
18406
+
18407
+ model._clipPath2D.push(newPoint2D);
18408
+
18409
+ model._clipPath3D.push(newPoint3D);
18410
+
18411
+ if (model._clipPath3D.length === 1) {
18412
+ var nearPoint = model._clipPath3D[0];
18413
+ var farPoint = publicAPI.displayToWorld({
18414
+ x: newPoint2D[0],
18415
+ y: newPoint2D[1]
18416
+ }, callData);
18417
+ model._clipPath3D2 = farPoint;
18418
+ model._clipNormal = normalizeVector([farPoint[0] - nearPoint[0], farPoint[1] - nearPoint[1], farPoint[2] - nearPoint[2]]);
18419
+ }
18420
+
18421
+ if (model.isMouseButtonPress) {
18422
+ Messager.Instance.call(MessagerKeys.MipAddClipPathPoint, model.messageGroupId, {
18423
+ clipPath2D: model._clipPath2D,
18424
+ clipPath3D: model._clipPath3D,
18425
+ clipNormal: model._clipNormal,
18426
+ clipId: model.currentClipGuid
18427
+ });
18428
+ }
18418
18429
  }
18419
18430
  break;
18420
18431
 
@@ -18469,28 +18480,19 @@ function vtkInteractorStyleEx(publicAPI, model) {
18469
18480
  case InteractorStyleActionMode.SelectClipOut:
18470
18481
  case InteractorStyleActionMode.FillInClip:
18471
18482
  {
18472
- model._clipRect.bottomRight = [pos.x, pos.y];
18473
- model._clipRect.topRight = [pos.x, model._clipRect.topRight[1]];
18474
- model._clipRect.bottomLeft = [model._clipRect.bottomLeft[0], pos.y];
18475
- model._clipRect3D.topLeft = publicAPI.displayToWorld(model._clipRect.topLeft, callData);
18476
- model._clipRect3D.topRight = publicAPI.displayToWorld(model._clipRect.topRight, callData);
18477
- model._clipRect3D.bottomLeft = publicAPI.displayToWorld(model._clipRect.bottomLeft, callData);
18478
- model._clipRect3D.bottomRight = publicAPI.displayToWorld(model._clipRect.bottomRight, callData);
18479
- model._clipRect3D.topLeft2 = publicAPI.displayToWorld({
18480
- x: model._clipRect.topLeft[0],
18481
- y: model._clipRect.topLeft[1]
18482
- }, callData);
18483
- var clipNormal = normalizeVector([model._clipRect3D.topLeft2[0] - model._clipRect3D.topLeft[0], model._clipRect3D.topLeft2[1] - model._clipRect3D.topLeft[1], model._clipRect3D.topLeft2[2] - model._clipRect3D.topLeft[2]]);
18484
18483
  var clipPositions = publicAPI.createValidClipPositions2D(callData);
18485
18484
  Messager.Instance.call(MessagerKeys.MipFinishClipPath, model.messageGroupId, {
18486
- clipRect: model._clipRect,
18487
- clipRect3D: model._clipRect3D,
18488
- clipNormal: clipNormal,
18489
- clipPositions: clipPositions,
18485
+ clipPath2D: toConsumableArray(model._clipPath2D),
18486
+ clipPath3D: toConsumableArray(model._clipPath3D),
18487
+ clipNormal: toConsumableArray(model._clipNormal),
18490
18488
  clipId: model.currentClipGuid,
18491
- mode: model.interactorStyleActionMode
18489
+ clipPath3D2: model._clipPath3D2,
18490
+ clipPolygonPositions: clipPositions
18492
18491
  });
18493
18492
  model.currentClipGuid = null;
18493
+ model._clipPath2D = [];
18494
+ model._clipPath3D = [];
18495
+ model._clipNormal = null;
18494
18496
  Messager.Instance.call(MessagerKeys.GlobalMprCommandReconstruct, MessagerKeys.Empty);
18495
18497
  Messager.Instance.call(MessagerKeys.MipFinishClipPathExport, model.messageGroupId, null);
18496
18498
  }
@@ -18536,17 +18538,54 @@ function vtkInteractorStyleEx(publicAPI, model) {
18536
18538
  };
18537
18539
 
18538
18540
  publicAPI.createValidClipPositions2D = function (callData) {
18539
- var left = Math.round(Math.min(model._clipRect.topLeft[0], model._clipRect.bottomRight[0]));
18540
- var right = Math.round(Math.max(model._clipRect.topLeft[0], model._clipRect.bottomRight[0]));
18541
- var top = Math.round(Math.min(model._clipRect.topLeft[1], model._clipRect.bottomRight[1]));
18542
- var bottom = Math.round(Math.max(model._clipRect.topLeft[1], model._clipRect.bottomRight[1]));
18543
- var size = (right - left + 1) * (bottom - top + 1);
18544
- var positions = new Array(size);
18541
+ var polygon = model._clipPath2D;
18542
+
18543
+ if (!Array.isArray(polygon) || polygon.length < 3) {
18544
+ return [];
18545
+ }
18546
+
18547
+ var xs = polygon.map(function (p) {
18548
+ return p[0];
18549
+ });
18550
+ var ys = polygon.map(function (p) {
18551
+ return p[1];
18552
+ });
18553
+ var minX = Math.floor(Math.min.apply(Math, toConsumableArray(xs)));
18554
+ var maxX = Math.ceil(Math.max.apply(Math, toConsumableArray(xs)));
18555
+ var minY = Math.floor(Math.min.apply(Math, toConsumableArray(ys)));
18556
+ var maxY = Math.ceil(Math.max.apply(Math, toConsumableArray(ys)));
18557
+
18558
+ function isPointInPolygon(x, y, poly) {
18559
+ var inside = false;
18560
+
18561
+ for (var i = 0, j = poly.length - 1; i < poly.length; j = i++) {
18562
+ var xi = poly[i][0],
18563
+ yi = poly[i][1];
18564
+ var xj = poly[j][0],
18565
+ yj = poly[j][1];
18566
+ var intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi || 0.00001) + xi;
18567
+ if (intersect) inside = !inside;
18568
+ }
18569
+
18570
+ return inside;
18571
+ }
18572
+
18573
+ var count = 0;
18574
+
18575
+ for (var x = minX; x <= maxX; ++x) {
18576
+ for (var y = minY; y <= maxY; ++y) {
18577
+ if (isPointInPolygon(x, y, polygon)) count++;
18578
+ }
18579
+ }
18580
+
18581
+ var positions = new Array(count);
18545
18582
  var index = 0;
18546
18583
 
18547
- for (var i = left; i <= right; ++i) {
18548
- for (var j = top; j <= bottom; ++j) {
18549
- positions[index++] = publicAPI.displayToWorld([i, j], callData);
18584
+ for (var _x = minX; _x <= maxX; ++_x) {
18585
+ for (var _y = minY; _y <= maxY; ++_y) {
18586
+ if (isPointInPolygon(_x, _y, polygon)) {
18587
+ positions[index++] = publicAPI.displayToWorld([_x, _y], callData);
18588
+ }
18550
18589
  }
18551
18590
  }
18552
18591
 
@@ -19930,51 +19969,50 @@ var MipImageProcessorWorkerImpl = /*#__PURE__*/function (_ImageProcessorWorker)
19930
19969
  }, {
19931
19970
  key: "displayClipPath",
19932
19971
  value: function displayClipPath(param) {
19933
- if (!this._shutterActor) {
19934
- this._shutterActor = [];
19935
- this._shutterLine = [];
19936
- this._topShutterLineIndex = 0;
19937
- this._rightShutterLineIndex = 1;
19938
- this._bottomShutterLineIndex = 2;
19939
- this._leftShutterLineIndex = 3;
19972
+ var clipPath3D = param.clipPath3D,
19973
+ clipNormal = param.clipNormal;
19974
+ if (!Array.isArray(clipPath3D) || clipPath3D.length < 2) return;
19940
19975
 
19941
- for (var i = 0; i < 4; i++) {
19942
- this._shutterLine[i] = vtkLineSource.newInstance();
19943
- var mapper = vtkMapper.newInstance();
19944
- this._shutterActor[i] = vtkActor.newInstance();
19976
+ if (!this._polyActors) {
19977
+ this._polyActors = [];
19978
+ this._polyLines = [];
19979
+ }
19945
19980
 
19946
- this._shutterActor[i].getProperty().setEdgeVisibility(false);
19981
+ var stepNormal = [-clipNormal[0] * 2, -clipNormal[1] * 2, -clipNormal[2] * 2];
19947
19982
 
19948
- this._shutterActor[i].getProperty().setColor(250, 0, 0);
19983
+ for (var i = this._polyLines.length; i < clipPath3D.length - 1; i++) {
19984
+ var line = vtkLineSource.newInstance();
19985
+ var mapper = vtkMapper.newInstance();
19986
+ var actor = vtkActor.newInstance();
19987
+ actor.getProperty().setColor(0, 1, 0);
19988
+ actor.getProperty().setLighting(false);
19989
+ actor.getProperty().setLineWidth(2);
19990
+ actor.getProperty().setOpacity(1.0);
19991
+ mapper.setInputConnection(line.getOutputPort());
19992
+ actor.setMapper(mapper);
19949
19993
 
19950
- mapper.setInputConnection(this._shutterLine[i].getOutputPort());
19994
+ this._polyLines.push(line);
19951
19995
 
19952
- this._shutterActor[i].setMapper(mapper);
19953
- }
19996
+ this._polyActors.push(actor);
19997
+
19998
+ this.renderer.addActor(actor);
19954
19999
  }
19955
20000
 
19956
- var top = this._shutterLine[this._topShutterLineIndex];
19957
- var right = this._shutterLine[this._rightShutterLineIndex];
19958
- var bottom = this._shutterLine[this._bottomShutterLineIndex];
19959
- var left = this._shutterLine[this._leftShutterLineIndex];
19960
- var normal = param.clipNormal; // 偏向于内里一点,可以避免浮点误差导致的直线超界
20001
+ for (var _i = 0; _i < clipPath3D.length - 1; _i++) {
20002
+ var p1 = clipPath3D[_i].map(function (v, idx) {
20003
+ return v - stepNormal[idx];
20004
+ });
20005
+
20006
+ var p2 = clipPath3D[_i + 1].map(function (v, idx) {
20007
+ return v - stepNormal[idx];
20008
+ });
19961
20009
 
19962
- var stepNormal = [-normal[0] * 2, -normal[1] * 2, -normal[2] * 2];
19963
- var topLeft = [param.clipRect3D.topLeft[0] - stepNormal[0], param.clipRect3D.topLeft[1] - stepNormal[1], param.clipRect3D.topLeft[2] - stepNormal[2]];
19964
- var topRight = [param.clipRect3D.topRight[0] - stepNormal[0], param.clipRect3D.topRight[1] - stepNormal[1], param.clipRect3D.topRight[2] - stepNormal[2]];
19965
- var bottomRight = [param.clipRect3D.bottomRight[0] - stepNormal[0], param.clipRect3D.bottomRight[1] - stepNormal[1], param.clipRect3D.bottomRight[2] - stepNormal[2]];
19966
- var bottomLeft = [param.clipRect3D.bottomLeft[0] - stepNormal[0], param.clipRect3D.bottomLeft[1] - stepNormal[1], param.clipRect3D.bottomLeft[2] - stepNormal[2]];
19967
- top.setPoint1(topLeft);
19968
- top.setPoint2(topRight);
19969
- right.setPoint2(bottomRight);
19970
- right.setPoint1(topRight);
19971
- bottom.setPoint1(bottomRight);
19972
- bottom.setPoint2(bottomLeft);
19973
- left.setPoint2(topLeft);
19974
- left.setPoint1(bottomLeft);
20010
+ var eps = 1e-3;
20011
+ if (Math.abs(p1[0] - p2[0]) < eps && Math.abs(p1[1] - p2[1]) < eps && Math.abs(p1[2] - p2[2]) < eps) continue;
19975
20012
 
19976
- for (var i = 0; i < 4; i++) {
19977
- this.renderer.addActor(this._shutterActor[i]);
20013
+ this._polyLines[_i].setPoint1(p1);
20014
+
20015
+ this._polyLines[_i].setPoint2(p2);
19978
20016
  }
19979
20017
 
19980
20018
  this.renderWindow.render();
@@ -19986,20 +20024,31 @@ var MipImageProcessorWorkerImpl = /*#__PURE__*/function (_ImageProcessorWorker)
19986
20024
  }, {
19987
20025
  key: "hideClipPath",
19988
20026
  value: function hideClipPath() {
19989
- if (this._shutterActor) {
19990
- for (var i = 0; i < 4; i++) {
19991
- this.renderer.removeActor(this._shutterActor[i]); // 如果不删除则会在下次render时出现残影
20027
+ var _this6 = this;
19992
20028
 
19993
- this._shutterActor[i].delete();
20029
+ if (this._polyLines) {
20030
+ this._polyLines.forEach(function (line) {
20031
+ if (line) line.delete();
20032
+ });
19994
20033
 
19995
- this._shutterLine[i].delete();
19996
- }
20034
+ this._polyLines = [];
20035
+ }
20036
+
20037
+ if (this._polyActors) {
20038
+ this._polyActors.forEach(function (actor) {
20039
+ if (actor) {
20040
+ _this6.renderer.removeActor(actor);
20041
+
20042
+ actor.delete();
20043
+ }
20044
+ });
19997
20045
 
19998
- this._shutterLine = null;
19999
- this._shutterActor = null;
20046
+ this._polyActors = [];
20000
20047
  }
20001
20048
 
20002
- this.renderWindow.render();
20049
+ if (this.renderWindow) {
20050
+ this.renderWindow.render();
20051
+ }
20003
20052
  }
20004
20053
  /**
20005
20054
  * 添加裁剪路径点
@@ -20037,70 +20086,52 @@ var MipImageProcessorWorkerImpl = /*#__PURE__*/function (_ImageProcessorWorker)
20037
20086
 
20038
20087
  this._clipPathParams.push(param);
20039
20088
  }
20040
- /**
20041
- * 根据clipPath生成映射的Volume坐标点集合,为了简化循环计算,position直接是volume的下标
20042
- * @param param
20043
- */
20044
-
20045
20089
  }, {
20046
20090
  key: "createValidClipPositions",
20047
20091
  value: function createValidClipPositions(param, spacing, pixelData, extent) {
20048
- var firstSlicePositions = param.clipPositions;
20092
+ var firstSlicePositions = param.clipPolygonPositions || [];
20049
20093
  var normal = param.clipNormal;
20050
- var steps = normal; // [normal[0] * spacing[0], normal[1] * spacing[1], normal[2] * spacing[2]];
20094
+
20095
+ if (!Array.isArray(firstSlicePositions) || firstSlicePositions.length === 0) {
20096
+ return;
20097
+ } // 计算法向步长
20098
+
20051
20099
 
20052
20100
  var firstIndex = [0, 0, 0];
20053
- this.imageData.worldToIndexVec3(param.clipRect3D.topLeft, firstIndex);
20101
+ this.imageData.worldToIndexVec3(param.clipPath3D[0], firstIndex);
20054
20102
  var lastIndex = [0, 0, 0];
20055
- this.imageData.worldToIndexVec3(param.clipRect3D.topLeft2, lastIndex); // 视角方向从【0,1】的起始方向模
20056
- // 2 ? 因为lastIndex取自0.5的world View 位置,全长是 1,所以需要lastInde跟firstIndex的两倍才是原始长度
20057
-
20058
- var modVolume =
20059
- /*2 * */
20060
- Math.sqrt((lastIndex[0] - firstIndex[0]) * (lastIndex[0] - firstIndex[0]) + (lastIndex[1] - firstIndex[1]) * (lastIndex[1] - firstIndex[1]) + (lastIndex[2] - firstIndex[2]) * (lastIndex[2] - firstIndex[2]));
20061
- var modSpacing = Math.sqrt(steps[0] * steps[0] + steps[1] * steps[1] + steps[2] * steps[2]);
20062
- var loop = Math.round(modVolume / modSpacing + 0.5);
20103
+ this.imageData.worldToIndexVec3(param.clipPath3D2, lastIndex);
20104
+ var steps = normalizeVector([lastIndex[0] - firstIndex[0], lastIndex[1] - firstIndex[1], lastIndex[2] - firstIndex[2]]);
20105
+ var modVolume = Math.sqrt(Math.pow(lastIndex[0] - firstIndex[0], 2) + Math.pow(lastIndex[1] - firstIndex[1], 2) + Math.pow(lastIndex[2] - firstIndex[2], 2));
20106
+ var modSpacing = Math.sqrt(Math.pow(normal[0], 2) + Math.pow(normal[1], 2) + Math.pow(normal[2], 2));
20107
+ var samplingDensity = 0.5;
20108
+ var loop = Math.round(modVolume / (modSpacing * samplingDensity) + 0.5);
20063
20109
  var w = extent[1] - extent[0] + 1;
20064
20110
  var h = extent[3] - extent[2] + 1;
20065
- var s = extent[5] - extent[4] + 1;
20066
20111
  var aS = w * h;
20067
- steps = normalizeVector([lastIndex[0] - firstIndex[0], lastIndex[1] - firstIndex[1], lastIndex[2] - firstIndex[2]]); // if( this.backupPoints) {
20068
- // var backupPointsCount = this.backupPoints.length;
20069
- //
20070
- // // 可能存在重复的点,所以需要从末端开始倒序遍历
20071
- // for(var backupIndex = backupPointsCount-1; backupIndex >= 0; --backupIndex) {
20072
- // pixelData[this.backupPoints[backupIndex][0]] = this.backupPoints[backupIndex][1];
20073
- // }
20074
- //
20075
- // return;
20076
- // }
20077
-
20078
20112
  param.backupClipPixels = new Int16Array(pixelData.length);
20079
- param.backupClipPixels.set(pixelData, 0); //param.backupClipPoints = {steps : [...steps], positions : new Array(firstSlicePositions.length)};
20113
+ param.backupClipPixels.set(pixelData, 0);
20080
20114
 
20081
20115
  for (var n = 0; n < firstSlicePositions.length; ++n) {
20082
20116
  var begin = [0, 0, 0];
20083
- this.imageData.worldToIndexVec3(firstSlicePositions[n], begin); //param.backupClipPoints.positions[n] = [...begin];
20117
+ this.imageData.worldToIndexVec3(firstSlicePositions[n], begin);
20084
20118
 
20085
- for (var i = 0; i < loop; i++, begin[0] += steps[0], begin[1] += steps[1], begin[2] += steps[2]) {
20119
+ for (var i = 0; i < loop; i++) {
20120
+ // 沿法向移动
20121
+ begin[0] += steps[0];
20122
+ begin[1] += steps[1];
20123
+ begin[2] += steps[2];
20086
20124
  var a = Math.round(begin[0]);
20087
- if (a < extent[0]) continue;
20088
- if (a > extent[1]) continue;
20089
20125
  var b = Math.round(begin[1]);
20090
- if (b < extent[2]) continue;
20091
- if (b > extent[3]) continue;
20092
20126
  var c = Math.round(begin[2]);
20093
- if (c < extent[4]) continue;
20094
- if (c > extent[5]) continue;
20127
+ if (a < extent[0] || a > extent[1]) continue;
20128
+ if (b < extent[2] || b > extent[3]) continue;
20129
+ if (c < extent[4] || c > extent[5]) continue;
20095
20130
  var pixelIndex = c * aS + b * w + a;
20096
20131
  var aa = Math.floor(begin[0]);
20097
20132
  var bb = Math.floor(begin[1]);
20098
20133
  var cc = Math.floor(begin[2]);
20099
- var pixelIndex2 = cc * aS + bb * w + aa; // param.backupPoints[param.backupPointIndex++] = pixelIndex;
20100
- // param.backupPoints[param.backupPointIndex++] = pixelData[pixelIndex];
20101
- // param.backupPoints[param.backupPointIndex++] = pixelIndex2;
20102
- // param.backupPoints[param.backupPointIndex++] = pixelData[pixelIndex2];
20103
-
20134
+ var pixelIndex2 = cc * aS + bb * w + aa;
20104
20135
  pixelData[pixelIndex] = 0;
20105
20136
  pixelData[pixelIndex2] = 0;
20106
20137
  }
@@ -31471,7 +31502,6 @@ var createReducer = function createReducer() {
31471
31502
  };
31472
31503
 
31473
31504
  var index$1 = createReducer();
31474
- var SOCKET_INIT_REDUX = 'SOCKET_INIT_REDUX';
31475
31505
  function socketInitRedux(payload) {
31476
31506
  return {
31477
31507
  type: SOCKET_INIT_REDUX,
@@ -45760,7 +45790,7 @@ var DicomToolFlattenMode = /*#__PURE__*/function (_Component) {
45760
45790
 
45761
45791
 
45762
45792
  var mprTools = ['LayoutMPR', 'CrosshairsMPR', 'MprSwitchPerspective', 'MprRefresh'];
45763
- var vrTools = ['VRMode', 'VRPresentColor', 'VRDirection', 'VRCenterPointShow', 'VRClip', 'VRInfo', 'VRRefresh']; // 测量工具
45793
+ var vrTools = ['VRMode', 'VRPresentColor', 'VRDirection', 'VRCenterPointShow', 'VRClip', 'VRResetClip', 'VRInfo', 'VRRefresh']; // 测量工具
45764
45794
 
45765
45795
  var lengthTools = ['LengthTool', 'Angle', 'ArrowAnnotate', 'TextMarker', 'RectangleRoi', 'Polygon', 'EllipticalRoi', 'Probe', 'CobbAngle', 'CTR'];
45766
45796
 
@@ -46131,7 +46161,7 @@ var DicomToolFlattenMode$1 = /*#__PURE__*/function (_Component) {
46131
46161
 
46132
46162
 
46133
46163
  var mprTools = ['LayoutMPR', 'CrosshairsMPR', 'MprSwitchPerspective', 'MprRefresh'];
46134
- var vrTools = ['VRMode', 'VRPresentColor', 'VRDirection', 'VRCenterPointShow', 'VRClip', 'VRInfo', 'VRRefresh'];
46164
+ var vrTools = ['VRMode', 'VRPresentColor', 'VRDirection', 'VRCenterPointShow', 'VRClip', 'VRResetClip', 'VRInfo', 'VRRefresh'];
46135
46165
  var lengthTools = ['LengthTool', 'Angle', 'ArrowAnnotate', 'TextMarker', 'RectangleRoi', 'Polygon', 'EllipticalRoi', 'Probe', 'CobbAngle', 'CTR'];
46136
46166
 
46137
46167
  if (IODisconnect && !Fusion) {
@@ -46439,7 +46469,7 @@ const SvgMenuUp = props => /*#__PURE__*/React__default.createElement("svg", _ext
46439
46469
  fill: "currentColor"
46440
46470
  }, props), _ref$1i);
46441
46471
 
46442
- var css_248z$n = ".paladin-mobile-button,\n.paladin-mobile-button-nohover {\n text-align: center;\n width: 100%;\n height: 100%;\n color: #C9C9C9;\n cursor: pointer;\n background: #1D1D1D;\n box-sizing: border-box;\n}\n.paladin-mobile-button svg,\n.paladin-mobile-button-nohover svg {\n height: 20px !important;\n}\n.paladin-mobile-more-button,\n.paladin-mobile-more-button-nohover {\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 20px;\n line-height: 20px;\n justify-content: center;\n align-items: center;\n color: #C9C9C9;\n cursor: pointer;\n background: #1D1D1D;\n}\n.paladin-tool-mobile-active {\n border-bottom: 2px solid #F5F5F5;\n color: #F5F5F5;\n}\n.paladin-mobile-more-active {\n color: #F5F5F5;\n}\n.paladin-dicomToolItem-text {\n height: 100%;\n display: inline-block;\n}\n";
46472
+ var css_248z$n = ".paladin-mobile-button,\n.paladin-mobile-button-nohover {\n text-align: center;\n width: 100%;\n height: 100%;\n color: #C9C9C9;\n cursor: pointer;\n background: #1D1D1D;\n box-sizing: border-box;\n}\n.paladin-mobile-button svg,\n.paladin-mobile-button-nohover svg {\n height: 20px !important;\n}\n.paladin-mobile-more-button,\n.paladin-mobile-more-button-nohover {\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 20px;\n line-height: 20px;\n justify-content: center;\n align-items: center;\n color: #C9C9C9;\n cursor: pointer;\n background: #1D1D1D;\n}\n.paladin-mobile-more-button-nohover-direction-bottom {\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 10px;\n line-height: 10px;\n justify-content: center;\n align-items: center;\n color: #C9C9C9;\n cursor: pointer;\n background: #1D1D1D;\n transform: rotate(180deg);\n}\n.paladin-tool-mobile-active {\n border-bottom: 2px solid #F5F5F5;\n color: #F5F5F5;\n}\n.paladin-mobile-more-active {\n color: #F5F5F5;\n}\n.paladin-dicomToolItem-text {\n height: 100%;\n display: inline-block;\n}\n";
46443
46473
  styleInject$1(css_248z$n);
46444
46474
 
46445
46475
  function _createSuper$1j(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1j(); 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); }; }
@@ -46579,12 +46609,13 @@ var DicomToolItemMobile = /*#__PURE__*/function (_Component) {
46579
46609
  size = _this$props3.size,
46580
46610
  width = _this$props3.width,
46581
46611
  height = _this$props3.height,
46582
- noPaddingTop = _this$props3.noPaddingTop;
46612
+ noPaddingTop = _this$props3.noPaddingTop,
46613
+ moreIconDirection = _this$props3.moreIconDirection;
46583
46614
  var buttonActive = this.state.buttonActive;
46584
- var isMobile = ua.isDeviceTypeMobile();
46585
46615
 
46586
46616
  var _height = height || 60;
46587
46617
 
46618
+ var moreArrowBottom = tool.moreComponent && moreIconDirection === 'bottom';
46588
46619
  return /*#__PURE__*/React__default.createElement("div", {
46589
46620
  style: {
46590
46621
  height: "".concat(_height, "px"),
@@ -46595,21 +46626,21 @@ var DicomToolItemMobile = /*#__PURE__*/function (_Component) {
46595
46626
  }
46596
46627
  }, tool.moreComponent && /*#__PURE__*/React__default.createElement("div", {
46597
46628
  style: {
46598
- height: '20px'
46629
+ height: moreArrowBottom ? '10px' : '20px'
46599
46630
  }
46600
46631
  }, /*#__PURE__*/React__default.createElement(PopperBox, {
46601
46632
  popover: tool.moreComponent,
46602
46633
  onPopoverClose: this.onPopoverClose,
46603
46634
  popoverArrow: tool.popoverArrow,
46604
- popoverPlacement: isMobile ? 'top' : 'right',
46635
+ popoverPlacement: "top",
46605
46636
  customProps: tool.customProps
46606
46637
  }, /*#__PURE__*/React__default.createElement("div", {
46607
- className: "".concat(isMobile ? 'paladin-mobile-more-button-nohover' : 'paladin-mobile-more-button', " ").concat(buttonActive ? 'paladin-mobile-more-active' : ''),
46638
+ className: "".concat(moreArrowBottom ? 'paladin-mobile-more-button-nohover-direction-bottom' : 'paladin-mobile-more-button-nohover', " ").concat(buttonActive ? 'paladin-mobile-more-active' : ''),
46608
46639
  onClick: this.clickMoreButton
46609
46640
  }, /*#__PURE__*/React__default.createElement("span", {
46610
46641
  className: "paladin-dicomToolItem-text",
46611
46642
  style: {
46612
- width: isMobile ? 12 : size / 3 + 'px'
46643
+ width: '12px'
46613
46644
  }
46614
46645
  }, /*#__PURE__*/React__default.createElement(SvgMenuUp, null))))), /*#__PURE__*/React__default.createElement("div", {
46615
46646
  style: {
@@ -46620,13 +46651,13 @@ var DicomToolItemMobile = /*#__PURE__*/function (_Component) {
46620
46651
  popover: !tool.moreComponent && tool.popover,
46621
46652
  onPopoverClose: this.onPopoverClose,
46622
46653
  popoverArrow: tool.popoverArrow,
46623
- popoverPlacement: isMobile ? 'top' : 'right',
46624
- tooltipPlacement: isMobile ? 'right' : 'bottom',
46654
+ popoverPlacement: "top",
46655
+ tooltipPlacement: "right",
46625
46656
  customProps: tool.customProps
46626
46657
  }, /*#__PURE__*/React__default.createElement("div", {
46627
46658
  className: "paladin-mobile-button ".concat(this.checkMainButtonActive(tool)),
46628
46659
  style: {
46629
- paddingTop: noPaddingTop ? '15px' : tool.moreComponent ? '4px' : '24px'
46660
+ paddingTop: noPaddingTop ? moreArrowBottom ? '5px' : '15px' : tool.moreComponent ? '4px' : '24px'
46630
46661
  },
46631
46662
  onClick: function onClick(e) {
46632
46663
  _this2.clickMainButton(e, tool);
@@ -46648,7 +46679,8 @@ var DicomToolItemMobile = /*#__PURE__*/function (_Component) {
46648
46679
  defineProperty(DicomToolItemMobile, "propTypes", {
46649
46680
  tool: PropTypes$1.any,
46650
46681
  activeTool: PropTypes$1.any,
46651
- setActiveTool: PropTypes$1.func
46682
+ setActiveTool: PropTypes$1.func,
46683
+ moreIconDirection: PropTypes$1.string
46652
46684
  });
46653
46685
 
46654
46686
  var css_248z$o = ".paladin-mobile-tool-mode {\n background: #000;\n}\n.paladin-mobile-tool-mode .mobile-tool-cine-content {\n display: flex;\n height: 55px;\n color: #ECECEC;\n}\n.paladin-mobile-tool-mode .mobile-tool-icon-content {\n display: flex;\n flex-direction: row;\n}\n.paladin-mobile-tool-mode .mobile-tool-icon-content .fix-icon-content {\n display: flex;\n flex-direction: column;\n padding-right: 2px;\n z-index: 999;\n background: #000;\n}\n.paladin-mobile-tool-mode .mobile-tool-icon-content .fix-icon-content-right {\n display: flex;\n flex-direction: column;\n padding-left: 2px;\n z-index: 999;\n background: #000;\n}\n.paladin-mobile-tool-mode .mobile-tool-icon-content .scroll-icon-content {\n display: flex;\n flex-direction: column;\n flex: 1;\n background: #1D1D1D;\n}\n";
@@ -47395,8 +47427,8 @@ var DicomToolMobileThreeModeBottom = /*#__PURE__*/function (_Component) {
47395
47427
  }
47396
47428
  });
47397
47429
 
47398
- var phoneToolsFixed = ["StackScroll", "Wwwc", "Zoom"];
47399
- var phoneTools = ["Layout", "Pan", "Rotate", "Length", "Reset", "Tool", "ReferenceLine", "MPR", "VR", "MIP", "Settings"]; // 关键图工具
47430
+ var phoneToolsFixed = ["StackScroll", "Wwwc"];
47431
+ var phoneTools = ["Zoom", "Layout", "Pan", "Rotate", "Length", "Reset", "Tool", "ReferenceLine", "MPR", "VR", "MIP", "Settings"]; // 关键图工具
47400
47432
 
47401
47433
  if (operateKeyImages) {
47402
47434
  var referenceLineIndex = phoneTools.indexOf("ReferenceLine");
@@ -47625,7 +47657,8 @@ var DicomToolMobileThreeModeHead = /*#__PURE__*/function (_Component) {
47625
47657
  size: 20,
47626
47658
  width: 50,
47627
47659
  height: 50,
47628
- noPaddingTop: true
47660
+ noPaddingTop: true,
47661
+ moreIconDirection: "bottom"
47629
47662
  }));
47630
47663
  }
47631
47664
  })))), /*#__PURE__*/React__default.createElement("div", {
@@ -47663,9 +47696,33 @@ var VRClip = /*#__PURE__*/function (_Component) {
47663
47696
  var _super = _createSuper$1o(VRClip);
47664
47697
 
47665
47698
  function VRClip(props) {
47699
+ var _this;
47700
+
47666
47701
  classCallCheck(this, VRClip);
47667
47702
 
47668
- return _super.call(this, props);
47703
+ _this = _super.call(this, props);
47704
+
47705
+ defineProperty(assertThisInitialized(_this), "handleResetPolygon", function () {
47706
+ var ModalContent = function ModalContent(props) {
47707
+ return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("p", null, "\u786E\u5B9A\u8981\u64A4\u9500\u5168\u90E8\u88C1\u526A\u5417"));
47708
+ };
47709
+
47710
+ Modal.create( /*#__PURE__*/React__default.createElement(ModalContent, null), {
47711
+ title: '撤销全部裁剪',
47712
+ onOk: function onOk() {
47713
+ if (_this.props.onRowClick) {
47714
+ _this.props.onRowClick('reset');
47715
+ }
47716
+ },
47717
+ okText: '确定',
47718
+ cancelText: '取消',
47719
+ style: {
47720
+ width: '500px'
47721
+ }
47722
+ });
47723
+ });
47724
+
47725
+ return _this;
47669
47726
  }
47670
47727
 
47671
47728
  createClass(VRClip, [{
@@ -47680,7 +47737,8 @@ var VRClip = /*#__PURE__*/function (_Component) {
47680
47737
  }, {
47681
47738
  key: 'reset',
47682
47739
  text: '撤销全部',
47683
- icon: null
47740
+ icon: null,
47741
+ onClick: this.handleResetPolygon
47684
47742
  }]
47685
47743
  }];
47686
47744
  return /*#__PURE__*/React__default.createElement(ToolPopoverTemplate, _extends_1({}, this.props, {
@@ -48555,7 +48613,8 @@ var DicomTool = /*#__PURE__*/function (_Component) {
48555
48613
  tooltip: getI18nMessage('mpr', 'tool_crosshair_tooltip'),
48556
48614
  component: /*#__PURE__*/React__default.createElement(SvgMove, null),
48557
48615
  activeInRedux: true,
48558
- moreComponent: ConnectedCrosshairsMPR
48616
+ moreComponent: ConnectedCrosshairsMPR,
48617
+ moreIconDirection: 'right'
48559
48618
  },
48560
48619
  Wwwc: {
48561
48620
  label: getI18nMessage('dicom_tool_wwwc'),
@@ -48751,7 +48810,15 @@ var DicomTool = /*#__PURE__*/function (_Component) {
48751
48810
  singleActive: true,
48752
48811
  onClick: function onClick() {
48753
48812
  _this.props.toggleVRClip();
48754
- },
48813
+ }
48814
+ },
48815
+ VRResetClip: {
48816
+ label: getI18nMessage('vr', 'reset_clip'),
48817
+ name: "VRResetClip",
48818
+ tooltip: getI18nMessage('vr', 'reset_clip_tooltip'),
48819
+ component: /*#__PURE__*/React__default.createElement(SvgReply, null),
48820
+ inActive: true,
48821
+ borderBottom: true,
48755
48822
  moreComponent: ConnectedVRClip
48756
48823
  },
48757
48824
  VRPresentColor: {
@@ -50182,6 +50249,7 @@ var mapStateToProps$p = function mapStateToProps(state) {
50182
50249
  CentesisStart = _state$paladin$tools$3.CentesisStart,
50183
50250
  CentesisEnd = _state$paladin$tools$3.CentesisEnd,
50184
50251
  VRClip = _state$paladin$tools$3.VRClip,
50252
+ VRResetClip = _state$paladin$tools$3.VRResetClip,
50185
50253
  IO = _state$paladin$tools$3.IO,
50186
50254
  ReferencePosition = _state$paladin$tools$3.ReferencePosition,
50187
50255
  MIP = _state$paladin$tools$3.MIP,
@@ -50303,6 +50371,7 @@ var mapStateToProps$p = function mapStateToProps(state) {
50303
50371
  CentesisStart: CentesisStart,
50304
50372
  CentesisEnd: CentesisEnd,
50305
50373
  VRClip: VRClip,
50374
+ VRResetClip: VRResetClip,
50306
50375
  IO: IO,
50307
50376
  ReferencePosition: ReferencePosition,
50308
50377
  MIP: MIP,
@@ -74888,7 +74957,10 @@ var DicomView = /*#__PURE__*/function (_Component) {
74888
74957
  }
74889
74958
  }); // 自定义窗值设置
74890
74959
 
74891
- this.props.windowSetting && saveWwwcCustomDic(this.props.windowSetting); // 自定义的功能设置初始值 1.外部传入、保存 2.内部本地存储
74960
+ if (this.props.windowSetting && this.props.windowSetting.length > 0) {
74961
+ saveWwwcCustomDic(this.props.windowSetting);
74962
+ } // 自定义的功能设置初始值 1.外部传入、保存 2.内部本地存储
74963
+
74892
74964
 
74893
74965
  if (this.props.dicomSetting) {
74894
74966
  saveCustomDicomSetting(this.props.dicomSetting);