hellfire 0.25.13 → 0.25.15
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 +8 -0
- package/README.md +7 -0
- package/dist/index.js +106 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.15](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.14...v0.25.15) (2023-04-23)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.25.14](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.13...v0.25.14) (2023-04-20)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [0.25.13](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.12...v0.25.13) (2023-04-03)
|
|
6
14
|
|
|
7
15
|
|
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -32530,10 +32530,20 @@ 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
|
+
this.aiResult = get$1('aiResult');
|
|
32545
|
+
}
|
|
32546
|
+
}, {
|
|
32537
32547
|
key: "addMeasurement",
|
|
32538
32548
|
value: function addMeasurement(data, element, imagePlane, index) {
|
|
32539
32549
|
var measurementData = this.createNewMeasurement(data, imagePlane, index);
|
|
@@ -32588,18 +32598,20 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32588
32598
|
|
|
32589
32599
|
var columns = imagePlane.columns,
|
|
32590
32600
|
rows = imagePlane.rows;
|
|
32591
|
-
var text = getAIText(data);
|
|
32601
|
+
var text = this.simpleMode ? getSimpleAIText(data) : getAIText(data);
|
|
32592
32602
|
var textBoxX = coords.x;
|
|
32593
32603
|
var textBoxY = coords.y;
|
|
32594
32604
|
|
|
32595
|
-
if (
|
|
32596
|
-
|
|
32597
|
-
|
|
32598
|
-
|
|
32605
|
+
if (!this.simpleMode) {
|
|
32606
|
+
if (index === 0) {
|
|
32607
|
+
textBoxX = 20;
|
|
32608
|
+
textBoxY = columns - 50;
|
|
32609
|
+
}
|
|
32599
32610
|
|
|
32600
|
-
|
|
32601
|
-
|
|
32602
|
-
|
|
32611
|
+
if (index === 1) {
|
|
32612
|
+
textBoxX = rows - 20;
|
|
32613
|
+
textBoxY = columns - 50;
|
|
32614
|
+
}
|
|
32603
32615
|
}
|
|
32604
32616
|
|
|
32605
32617
|
return {
|
|
@@ -32633,10 +32645,10 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32633
32645
|
}
|
|
32634
32646
|
}, {
|
|
32635
32647
|
key: "drawAI",
|
|
32636
|
-
value: function drawAI(
|
|
32637
|
-
var context =
|
|
32638
|
-
element =
|
|
32639
|
-
handles =
|
|
32648
|
+
value: function drawAI(_ref2) {
|
|
32649
|
+
var context = _ref2.context,
|
|
32650
|
+
element = _ref2.element,
|
|
32651
|
+
handles = _ref2.handles;
|
|
32640
32652
|
var p1 = handles.start,
|
|
32641
32653
|
p2 = handles.end,
|
|
32642
32654
|
p3 = handles.start2,
|
|
@@ -32682,7 +32694,7 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32682
32694
|
case 4:
|
|
32683
32695
|
toolData = cornerstoneTools.getToolState(evt.currentTarget, this.name);
|
|
32684
32696
|
|
|
32685
|
-
if (toolData) {
|
|
32697
|
+
if (!(!toolData || toolData.data.length === 0)) {
|
|
32686
32698
|
_context.next = 20;
|
|
32687
32699
|
break;
|
|
32688
32700
|
}
|
|
@@ -32806,7 +32818,7 @@ function getAIText(data) {
|
|
|
32806
32818
|
}
|
|
32807
32819
|
|
|
32808
32820
|
if (longAxisDiameter_mm && shortAxisDiameter_mm) {
|
|
32809
|
-
text.push("\u5927\u5C0F: ".concat(lodash$1.round(longAxisDiameter_mm, 1), "
|
|
32821
|
+
text.push("\u5927\u5C0F: ".concat(lodash$1.round(longAxisDiameter_mm / 10, 1), "cm \xD7 ").concat(lodash$1.round(shortAxisDiameter_mm / 10, 1), "cm"));
|
|
32810
32822
|
}
|
|
32811
32823
|
|
|
32812
32824
|
if (characteristic && lodash$1.has(characteristic, ['isCalcification'])) {
|
|
@@ -32817,6 +32829,11 @@ function getAIText(data) {
|
|
|
32817
32829
|
return text;
|
|
32818
32830
|
}
|
|
32819
32831
|
|
|
32832
|
+
function getSimpleAIText(data) {
|
|
32833
|
+
var title = "#".concat(data.index);
|
|
32834
|
+
return [title];
|
|
32835
|
+
}
|
|
32836
|
+
|
|
32820
32837
|
function textBoxAnchorPoints(handles) {
|
|
32821
32838
|
var midpoint = {
|
|
32822
32839
|
x: (handles.start.x + handles.end.x) / 2,
|
|
@@ -32892,6 +32909,7 @@ var textureDic = function textureDic(value) {
|
|
|
32892
32909
|
reactHotLoader.register(external$t, "external", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
|
|
32893
32910
|
reactHotLoader.register(AIAnalysisOverlayTool, "AIAnalysisOverlayTool", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
|
|
32894
32911
|
reactHotLoader.register(getAIText, "getAIText", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
|
|
32912
|
+
reactHotLoader.register(getSimpleAIText, "getSimpleAIText", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
|
|
32895
32913
|
reactHotLoader.register(textBoxAnchorPoints, "textBoxAnchorPoints", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
|
|
32896
32914
|
reactHotLoader.register(riskTypeDic, "riskTypeDic", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
|
|
32897
32915
|
reactHotLoader.register(inspectionTypeDic, "inspectionTypeDic", "/Users/huyeqing/workspace/chainz/paladin/src/cornerstone-plus/cornerstone-tools-plus/AIAnalysisOverlayTool.js");
|
|
@@ -54488,9 +54506,13 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
54488
54506
|
var aiResult = get$1('aiResult');
|
|
54489
54507
|
|
|
54490
54508
|
if (aiResult) {
|
|
54509
|
+
_default$E.setToolEnabledForElement(_this.element, 'AIAnalysisOverlay', {
|
|
54510
|
+
simpleMode: _this.props.showSimpleAIResult
|
|
54511
|
+
});
|
|
54491
54512
|
_default$E.setToolActiveForElement(_this.element, 'AIAnalysisOverlay', {
|
|
54492
54513
|
mouseButtonMask: 1,
|
|
54493
|
-
isTouchActive: true
|
|
54514
|
+
isTouchActive: true,
|
|
54515
|
+
simpleMode: _this.props.showSimpleAIResult
|
|
54494
54516
|
});
|
|
54495
54517
|
}
|
|
54496
54518
|
} // 只在手术路径规划中触发的
|
|
@@ -54667,6 +54689,33 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
54667
54689
|
});
|
|
54668
54690
|
});
|
|
54669
54691
|
|
|
54692
|
+
defineProperty(assertThisInitialized(_this), "resetAIToolState", function () {
|
|
54693
|
+
// 先清除所有ai tool state数据
|
|
54694
|
+
var imageIds = _this.state.stack.imageIds;
|
|
54695
|
+
|
|
54696
|
+
for (var i = 0; i < imageIds.length; i++) {
|
|
54697
|
+
var aiToolState = _default$E.globalImageIdSpecificToolStateManager.getImageIdToolState(imageIds[i], 'AIAnalysisOverlay');
|
|
54698
|
+
|
|
54699
|
+
if (aiToolState && aiToolState.data && aiToolState.data.length > 0) {
|
|
54700
|
+
_default$E.globalImageIdSpecificToolStateManager.setImageIdToolState(imageIds[i], 'AIAnalysisOverlay', {
|
|
54701
|
+
data: []
|
|
54702
|
+
});
|
|
54703
|
+
}
|
|
54704
|
+
}
|
|
54705
|
+
|
|
54706
|
+
var config = {
|
|
54707
|
+
mouseButtonMask: 1,
|
|
54708
|
+
isTouchActive: true
|
|
54709
|
+
};
|
|
54710
|
+
_default$E.setToolDisabledForElement(_this.element, 'AIAnalysisOverlay', config);
|
|
54711
|
+
_default$E.setToolEnabledForElement(_this.element, 'AIAnalysisOverlay', {
|
|
54712
|
+
simpleMode: _this.props.showSimpleAIResult
|
|
54713
|
+
});
|
|
54714
|
+
_default$E.setToolActiveForElement(_this.element, 'AIAnalysisOverlay', config);
|
|
54715
|
+
var enableElement = cornerstone.getEnabledElement(_this.element);
|
|
54716
|
+
cornerstone.updateImage(enableElement.element, true);
|
|
54717
|
+
});
|
|
54718
|
+
|
|
54670
54719
|
_this.mouseDownViewport = null; // 记录鼠标操作前的viewport,为了相对同步
|
|
54671
54720
|
// 拷贝一份 使得作用域内stack的修改不污染外部的series
|
|
54672
54721
|
|
|
@@ -55321,16 +55370,18 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
55321
55370
|
var aiResult = get$1('aiResult');
|
|
55322
55371
|
|
|
55323
55372
|
if (aiResult) {
|
|
55373
|
+
var config = {
|
|
55374
|
+
mouseButtonMask: 1,
|
|
55375
|
+
isTouchActive: true
|
|
55376
|
+
};
|
|
55377
|
+
|
|
55324
55378
|
if (this.props.showAIResult) {
|
|
55325
|
-
_default$E.
|
|
55326
|
-
|
|
55327
|
-
isTouchActive: true
|
|
55379
|
+
_default$E.setToolEnabledForElement(this.element, 'AIAnalysisOverlay', {
|
|
55380
|
+
simpleMode: this.props.showSimpleAIResult
|
|
55328
55381
|
});
|
|
55382
|
+
_default$E.setToolActiveForElement(this.element, 'AIAnalysisOverlay', config);
|
|
55329
55383
|
} else {
|
|
55330
|
-
_default$E.setToolDisabledForElement(this.element, 'AIAnalysisOverlay',
|
|
55331
|
-
mouseButtonMask: 1,
|
|
55332
|
-
isTouchActive: true
|
|
55333
|
-
});
|
|
55384
|
+
_default$E.setToolDisabledForElement(this.element, 'AIAnalysisOverlay', config);
|
|
55334
55385
|
}
|
|
55335
55386
|
|
|
55336
55387
|
var enableElement = cornerstone.getEnabledElement(this.element);
|
|
@@ -55340,6 +55391,23 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
|
|
|
55340
55391
|
|
|
55341
55392
|
break;
|
|
55342
55393
|
|
|
55394
|
+
case prevProps.showSimpleAIResult !== this.props.showSimpleAIResult:
|
|
55395
|
+
var _aiResult = get$1('aiResult');
|
|
55396
|
+
|
|
55397
|
+
if (_aiResult) {
|
|
55398
|
+
this.resetAIToolState();
|
|
55399
|
+
}
|
|
55400
|
+
|
|
55401
|
+
break;
|
|
55402
|
+
|
|
55403
|
+
case JSON.stringify(prevProps.aiResult) !== JSON.stringify(this.props.aiResult):
|
|
55404
|
+
// 滚动条的ai标记更新
|
|
55405
|
+
this.checkAITipInCustomScroll({
|
|
55406
|
+
stack: this.state.stack
|
|
55407
|
+
});
|
|
55408
|
+
this.resetAIToolState();
|
|
55409
|
+
break;
|
|
55410
|
+
|
|
55343
55411
|
case prevProps.ReferencePosition !== this.props.ReferencePosition:
|
|
55344
55412
|
this.initReferencePosition();
|
|
55345
55413
|
|
|
@@ -56064,8 +56132,10 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
|
|
|
56064
56132
|
onCustomScroll: _this2.onCustomScroll,
|
|
56065
56133
|
onDrop: _this2.props.onDrop,
|
|
56066
56134
|
showAIResult: _this2.props.showAIResult,
|
|
56135
|
+
showSimpleAIResult: _this2.props.showSimpleAIResult,
|
|
56067
56136
|
onResizeEmit: _this2.props.onResizeEmit,
|
|
56068
|
-
onClickDomErrorReRenderButton: _this2.props.onClickDomErrorReRenderButton
|
|
56137
|
+
onClickDomErrorReRenderButton: _this2.props.onClickDomErrorReRenderButton,
|
|
56138
|
+
aiResult: _this2.props.aiResult
|
|
56069
56139
|
});
|
|
56070
56140
|
}));
|
|
56071
56141
|
})), showVerticalScroll && /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -59583,7 +59653,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
|
|
|
59583
59653
|
}
|
|
59584
59654
|
|
|
59585
59655
|
if (JSON.stringify(nextProps.aiResult) !== JSON.stringify(this.props.aiResult)) {
|
|
59586
|
-
if (nextProps.aiResult && nextProps.aiResult.inspectionDetails
|
|
59656
|
+
if (nextProps.aiResult && nextProps.aiResult.inspectionDetails) {
|
|
59587
59657
|
console.log('添加联动 -> ai 变化');
|
|
59588
59658
|
set$1('aiResult', nextProps.aiResult.inspectionDetails);
|
|
59589
59659
|
}
|
|
@@ -59956,6 +60026,8 @@ var DicomView = /*#__PURE__*/function (_Component) {
|
|
|
59956
60026
|
var DicomLayout = /*#__PURE__*/React__default.createElement(DicomLayoutContainerWrap, null, viewMode === '2D' && this.props.mode === 'seriesMode' && /*#__PURE__*/React__default.createElement(_default$18, {
|
|
59957
60027
|
series: this.props.series,
|
|
59958
60028
|
showAIResult: this.props.showAIResult,
|
|
60029
|
+
showSimpleAIResult: this.props.showSimpleAIResult,
|
|
60030
|
+
aiResult: this.props.aiResult,
|
|
59959
60031
|
onResizeEmit: this.props.onResizeEmit
|
|
59960
60032
|
}), viewMode === '2D' && this.props.mode === 'imageMode' && /*#__PURE__*/React__default.createElement(_default$19, {
|
|
59961
60033
|
onResizeEmit: this.props.onResizeEmit
|
|
@@ -60254,6 +60326,11 @@ var mergeProps$p = function mergeProps(propsFromState, propsFromDispatch, ownPro
|
|
|
60254
60326
|
}
|
|
60255
60327
|
},
|
|
60256
60328
|
IMAGE_MODE_UP: function IMAGE_MODE_UP() {
|
|
60329
|
+
if (ownProps.disableUpDownKeyAction) {
|
|
60330
|
+
// disableUpDownKeyAction 禁用上下键
|
|
60331
|
+
return;
|
|
60332
|
+
}
|
|
60333
|
+
|
|
60257
60334
|
if (threeDMode) {
|
|
60258
60335
|
return;
|
|
60259
60336
|
}
|
|
@@ -60278,6 +60355,11 @@ var mergeProps$p = function mergeProps(propsFromState, propsFromDispatch, ownPro
|
|
|
60278
60355
|
}
|
|
60279
60356
|
},
|
|
60280
60357
|
IMAGE_MODE_DOWN: function IMAGE_MODE_DOWN() {
|
|
60358
|
+
if (ownProps.disableUpDownKeyAction) {
|
|
60359
|
+
// disableUpDownKeyAction 禁用上下键
|
|
60360
|
+
return;
|
|
60361
|
+
}
|
|
60362
|
+
|
|
60281
60363
|
if (threeDMode) {
|
|
60282
60364
|
return;
|
|
60283
60365
|
}
|