hellfire 0.25.12 → 0.25.14

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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [0.25.14](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.13...v0.25.14) (2023-04-20)
6
+
7
+
8
+
9
+ ## [0.25.13](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.12...v0.25.13) (2023-04-03)
10
+
11
+
12
+
5
13
  ## [0.25.12](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.11...v0.25.12) (2023-04-03)
6
14
 
7
15
 
package/dist/index.js CHANGED
@@ -32530,10 +32530,19 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
32530
32530
  _this = _super.call(this, props, defaultProps);
32531
32531
  _this.aiResult = get$1('aiResult');
32532
32532
  _this.color = '#faa80a';
32533
+ _this.simpleMode = false;
32533
32534
  return _this;
32534
32535
  }
32535
32536
 
32536
32537
  createClass(AIAnalysisOverlayTool, [{
32538
+ key: "enabledCallback",
32539
+ value: function enabledCallback(element) {
32540
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
32541
+ simpleMode = _ref.simpleMode;
32542
+
32543
+ this.simpleMode = simpleMode;
32544
+ }
32545
+ }, {
32537
32546
  key: "addMeasurement",
32538
32547
  value: function addMeasurement(data, element, imagePlane, index) {
32539
32548
  var measurementData = this.createNewMeasurement(data, imagePlane, index);
@@ -32588,18 +32597,20 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
32588
32597
 
32589
32598
  var columns = imagePlane.columns,
32590
32599
  rows = imagePlane.rows;
32591
- var text = getAIText(data);
32600
+ var text = this.simpleMode ? getSimpleAIText(data) : getAIText(data);
32592
32601
  var textBoxX = coords.x;
32593
32602
  var textBoxY = coords.y;
32594
32603
 
32595
- if (index === 0) {
32596
- textBoxX = 20;
32597
- textBoxY = columns - 50;
32598
- }
32604
+ if (!this.simpleMode) {
32605
+ if (index === 0) {
32606
+ textBoxX = 20;
32607
+ textBoxY = columns - 50;
32608
+ }
32599
32609
 
32600
- if (index === 1) {
32601
- textBoxX = rows - 20;
32602
- textBoxY = columns - 50;
32610
+ if (index === 1) {
32611
+ textBoxX = rows - 20;
32612
+ textBoxY = columns - 50;
32613
+ }
32603
32614
  }
32604
32615
 
32605
32616
  return {
@@ -32633,10 +32644,10 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
32633
32644
  }
32634
32645
  }, {
32635
32646
  key: "drawAI",
32636
- value: function drawAI(_ref) {
32637
- var context = _ref.context,
32638
- element = _ref.element,
32639
- handles = _ref.handles;
32647
+ value: function drawAI(_ref2) {
32648
+ var context = _ref2.context,
32649
+ element = _ref2.element,
32650
+ handles = _ref2.handles;
32640
32651
  var p1 = handles.start,
32641
32652
  p2 = handles.end,
32642
32653
  p3 = handles.start2,
@@ -32682,7 +32693,7 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
32682
32693
  case 4:
32683
32694
  toolData = cornerstoneTools.getToolState(evt.currentTarget, this.name);
32684
32695
 
32685
- if (toolData) {
32696
+ if (!(!toolData || toolData.data.length === 0)) {
32686
32697
  _context.next = 20;
32687
32698
  break;
32688
32699
  }
@@ -32806,11 +32817,9 @@ function getAIText(data) {
32806
32817
  }
32807
32818
 
32808
32819
  if (longAxisDiameter_mm && shortAxisDiameter_mm) {
32809
- text.push("\u5927\u5C0F: ".concat(lodash$1.round(longAxisDiameter_mm, 1), "mm \xD7 ").concat(lodash$1.round(shortAxisDiameter_mm, 1), "mm"));
32820
+ text.push("\u5927\u5C0F: ".concat(lodash$1.round(longAxisDiameter_mm / 10, 1), "cm \xD7 ").concat(lodash$1.round(shortAxisDiameter_mm / 10, 1), "cm"));
32810
32821
  }
32811
32822
 
32812
- text.push("\u7ED3\u8282\u5BC6\u5EA6\u5C5E\u6027: ".concat(characteristic && characteristic.texture && textureDic(characteristic.texture) || '无'));
32813
-
32814
32823
  if (characteristic && lodash$1.has(characteristic, ['isCalcification'])) {
32815
32824
  text.push("\u9499\u5316: ".concat(characteristic && characteristic.isCalcification ? '是' : '否'));
32816
32825
  }
@@ -32819,6 +32828,11 @@ function getAIText(data) {
32819
32828
  return text;
32820
32829
  }
32821
32830
 
32831
+ function getSimpleAIText(data) {
32832
+ var title = "#".concat(data.index);
32833
+ return [title];
32834
+ }
32835
+
32822
32836
  function textBoxAnchorPoints(handles) {
32823
32837
  var midpoint = {
32824
32838
  x: (handles.start.x + handles.end.x) / 2,
@@ -32894,6 +32908,7 @@ var textureDic = function textureDic(value) {
32894
32908
  reactHotLoader.register(external$t, "external", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32895
32909
  reactHotLoader.register(AIAnalysisOverlayTool, "AIAnalysisOverlayTool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32896
32910
  reactHotLoader.register(getAIText, "getAIText", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32911
+ reactHotLoader.register(getSimpleAIText, "getSimpleAIText", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32897
32912
  reactHotLoader.register(textBoxAnchorPoints, "textBoxAnchorPoints", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32898
32913
  reactHotLoader.register(riskTypeDic, "riskTypeDic", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32899
32914
  reactHotLoader.register(inspectionTypeDic, "inspectionTypeDic", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
@@ -54490,9 +54505,13 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54490
54505
  var aiResult = get$1('aiResult');
54491
54506
 
54492
54507
  if (aiResult) {
54508
+ _default$E.setToolEnabledForElement(_this.element, 'AIAnalysisOverlay', {
54509
+ simpleMode: _this.props.showSimpleAIResult
54510
+ });
54493
54511
  _default$E.setToolActiveForElement(_this.element, 'AIAnalysisOverlay', {
54494
54512
  mouseButtonMask: 1,
54495
- isTouchActive: true
54513
+ isTouchActive: true,
54514
+ simpleMode: _this.props.showSimpleAIResult
54496
54515
  });
54497
54516
  }
54498
54517
  } // 只在手术路径规划中触发的
@@ -55323,16 +55342,18 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
55323
55342
  var aiResult = get$1('aiResult');
55324
55343
 
55325
55344
  if (aiResult) {
55345
+ var config = {
55346
+ mouseButtonMask: 1,
55347
+ isTouchActive: true
55348
+ };
55349
+
55326
55350
  if (this.props.showAIResult) {
55327
- _default$E.setToolActiveForElement(this.element, 'AIAnalysisOverlay', {
55328
- mouseButtonMask: 1,
55329
- isTouchActive: true
55351
+ _default$E.setToolEnabledForElement(this.element, 'AIAnalysisOverlay', {
55352
+ simpleMode: this.props.showSimpleAIResult
55330
55353
  });
55354
+ _default$E.setToolActiveForElement(this.element, 'AIAnalysisOverlay', config);
55331
55355
  } else {
55332
- _default$E.setToolDisabledForElement(this.element, 'AIAnalysisOverlay', {
55333
- mouseButtonMask: 1,
55334
- isTouchActive: true
55335
- });
55356
+ _default$E.setToolDisabledForElement(this.element, 'AIAnalysisOverlay', config);
55336
55357
  }
55337
55358
 
55338
55359
  var enableElement = cornerstone.getEnabledElement(this.element);
@@ -55342,6 +55363,34 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
55342
55363
 
55343
55364
  break;
55344
55365
 
55366
+ case prevProps.showSimpleAIResult !== this.props.showSimpleAIResult:
55367
+ var _aiResult = get$1('aiResult');
55368
+
55369
+ if (_aiResult) {
55370
+ // 先清除所有ai tool state数据
55371
+ var imageIds = this.state.stack.imageIds;
55372
+
55373
+ for (var i = 0; i < imageIds.length; i++) {
55374
+ var aiToolState = _default$E.globalImageIdSpecificToolStateManager.getImageIdToolState(imageIds[i], 'AIAnalysisOverlay');
55375
+
55376
+ if (aiToolState && aiToolState.data && aiToolState.data.length > 0) {
55377
+ _default$E.globalImageIdSpecificToolStateManager.setImageIdToolState(imageIds[i], 'AIAnalysisOverlay', {
55378
+ data: []
55379
+ });
55380
+ }
55381
+ }
55382
+
55383
+ _default$E.setToolEnabledForElement(this.element, 'AIAnalysisOverlay', {
55384
+ simpleMode: this.props.showSimpleAIResult
55385
+ });
55386
+
55387
+ var _enableElement = cornerstone.getEnabledElement(this.element);
55388
+
55389
+ cornerstone.updateImage(_enableElement.element, true);
55390
+ }
55391
+
55392
+ break;
55393
+
55345
55394
  case prevProps.ReferencePosition !== this.props.ReferencePosition:
55346
55395
  this.initReferencePosition();
55347
55396
 
@@ -56066,6 +56115,7 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
56066
56115
  onCustomScroll: _this2.onCustomScroll,
56067
56116
  onDrop: _this2.props.onDrop,
56068
56117
  showAIResult: _this2.props.showAIResult,
56118
+ showSimpleAIResult: _this2.props.showSimpleAIResult,
56069
56119
  onResizeEmit: _this2.props.onResizeEmit,
56070
56120
  onClickDomErrorReRenderButton: _this2.props.onClickDomErrorReRenderButton
56071
56121
  });
@@ -59958,6 +60008,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
59958
60008
  var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && this.props.mode === 'seriesMode' && /*#__PURE__*/React__default.createElement(_default$18, {
59959
60009
  series: this.props.series,
59960
60010
  showAIResult: this.props.showAIResult,
60011
+ showSimpleAIResult: this.props.showSimpleAIResult,
59961
60012
  onResizeEmit: this.props.onResizeEmit
59962
60013
  }), viewMode === '2D' && this.props.mode === 'imageMode' && /*#__PURE__*/React__default.createElement(_default$19, {
59963
60014
  onResizeEmit: this.props.onResizeEmit