hellfire 0.25.13 → 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,10 @@
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
+
5
9
  ## [0.25.13](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.12...v0.25.13) (2023-04-03)
6
10
 
7
11
 
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,7 +32817,7 @@ 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
32823
  if (characteristic && lodash$1.has(characteristic, ['isCalcification'])) {
@@ -32817,6 +32828,11 @@ function getAIText(data) {
32817
32828
  return text;
32818
32829
  }
32819
32830
 
32831
+ function getSimpleAIText(data) {
32832
+ var title = "#".concat(data.index);
32833
+ return [title];
32834
+ }
32835
+
32820
32836
  function textBoxAnchorPoints(handles) {
32821
32837
  var midpoint = {
32822
32838
  x: (handles.start.x + handles.end.x) / 2,
@@ -32892,6 +32908,7 @@ var textureDic = function textureDic(value) {
32892
32908
  reactHotLoader.register(external$t, "external", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32893
32909
  reactHotLoader.register(AIAnalysisOverlayTool, "AIAnalysisOverlayTool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32894
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");
32895
32912
  reactHotLoader.register(textBoxAnchorPoints, "textBoxAnchorPoints", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32896
32913
  reactHotLoader.register(riskTypeDic, "riskTypeDic", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
32897
32914
  reactHotLoader.register(inspectionTypeDic, "inspectionTypeDic", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
@@ -54488,9 +54505,13 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54488
54505
  var aiResult = get$1('aiResult');
54489
54506
 
54490
54507
  if (aiResult) {
54508
+ _default$E.setToolEnabledForElement(_this.element, 'AIAnalysisOverlay', {
54509
+ simpleMode: _this.props.showSimpleAIResult
54510
+ });
54491
54511
  _default$E.setToolActiveForElement(_this.element, 'AIAnalysisOverlay', {
54492
54512
  mouseButtonMask: 1,
54493
- isTouchActive: true
54513
+ isTouchActive: true,
54514
+ simpleMode: _this.props.showSimpleAIResult
54494
54515
  });
54495
54516
  }
54496
54517
  } // 只在手术路径规划中触发的
@@ -55321,16 +55342,18 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
55321
55342
  var aiResult = get$1('aiResult');
55322
55343
 
55323
55344
  if (aiResult) {
55345
+ var config = {
55346
+ mouseButtonMask: 1,
55347
+ isTouchActive: true
55348
+ };
55349
+
55324
55350
  if (this.props.showAIResult) {
55325
- _default$E.setToolActiveForElement(this.element, 'AIAnalysisOverlay', {
55326
- mouseButtonMask: 1,
55327
- isTouchActive: true
55351
+ _default$E.setToolEnabledForElement(this.element, 'AIAnalysisOverlay', {
55352
+ simpleMode: this.props.showSimpleAIResult
55328
55353
  });
55354
+ _default$E.setToolActiveForElement(this.element, 'AIAnalysisOverlay', config);
55329
55355
  } else {
55330
- _default$E.setToolDisabledForElement(this.element, 'AIAnalysisOverlay', {
55331
- mouseButtonMask: 1,
55332
- isTouchActive: true
55333
- });
55356
+ _default$E.setToolDisabledForElement(this.element, 'AIAnalysisOverlay', config);
55334
55357
  }
55335
55358
 
55336
55359
  var enableElement = cornerstone.getEnabledElement(this.element);
@@ -55340,6 +55363,34 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
55340
55363
 
55341
55364
  break;
55342
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
+
55343
55394
  case prevProps.ReferencePosition !== this.props.ReferencePosition:
55344
55395
  this.initReferencePosition();
55345
55396
 
@@ -56064,6 +56115,7 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
56064
56115
  onCustomScroll: _this2.onCustomScroll,
56065
56116
  onDrop: _this2.props.onDrop,
56066
56117
  showAIResult: _this2.props.showAIResult,
56118
+ showSimpleAIResult: _this2.props.showSimpleAIResult,
56067
56119
  onResizeEmit: _this2.props.onResizeEmit,
56068
56120
  onClickDomErrorReRenderButton: _this2.props.onClickDomErrorReRenderButton
56069
56121
  });
@@ -59956,6 +60008,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
59956
60008
  var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && this.props.mode === 'seriesMode' && /*#__PURE__*/React__default.createElement(_default$18, {
59957
60009
  series: this.props.series,
59958
60010
  showAIResult: this.props.showAIResult,
60011
+ showSimpleAIResult: this.props.showSimpleAIResult,
59959
60012
  onResizeEmit: this.props.onResizeEmit
59960
60013
  }), viewMode === '2D' && this.props.mode === 'imageMode' && /*#__PURE__*/React__default.createElement(_default$19, {
59961
60014
  onResizeEmit: this.props.onResizeEmit