hellfire 0.25.1 → 0.25.3
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 -7
- package/dist/index.js +38 -18
- 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.3](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.2...v0.25.3) (2023-01-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.25.2](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.1...v0.25.2) (2023-01-13)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [0.25.1](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.0...v0.25.1) (2023-01-13)
|
|
6
14
|
|
|
7
15
|
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
## Paladin (hellfire)
|
|
2
|
+
|
|
3
3
|
|
|
4
4
|
云图本地渲染引擎
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
## Usage
|
|
7
7
|
|
|
8
8
|
Example:
|
|
9
9
|
|
|
@@ -21,9 +21,9 @@ const Example = ()=> (
|
|
|
21
21
|
)
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## API documentation
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
### DicomView允许传入的参数:
|
|
27
27
|
|
|
28
28
|
<b>`study`</b>
|
|
29
29
|
|
|
@@ -144,7 +144,7 @@ toolSortChange: ()=> void
|
|
|
144
144
|
|
|
145
145
|
传入工具栏自定义排序的回调函数(用于早期的单列工具栏)
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
### DicomView提供给父组件调用的方法:
|
|
148
148
|
|
|
149
149
|
<b>`addStudy(data)`</b>
|
|
150
150
|
|
|
@@ -162,7 +162,7 @@ toolSortChange: ()=> void
|
|
|
162
162
|
|
|
163
163
|
模拟触发paladin内的各种操作行为(提供给同屏使用)
|
|
164
164
|
|
|
165
|
-
|
|
165
|
+
### paladin对外暴露的对象:
|
|
166
166
|
|
|
167
167
|
用法:
|
|
168
168
|
```
|
package/dist/index.js
CHANGED
|
@@ -32528,14 +32528,14 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32528
32528
|
};
|
|
32529
32529
|
_this = _super.call(this, props, defaultProps);
|
|
32530
32530
|
_this.aiResult = get$1('aiResult');
|
|
32531
|
-
_this.color = '#
|
|
32531
|
+
_this.color = '#faa80a';
|
|
32532
32532
|
return _this;
|
|
32533
32533
|
}
|
|
32534
32534
|
|
|
32535
32535
|
createClass(AIAnalysisOverlayTool, [{
|
|
32536
32536
|
key: "addMeasurement",
|
|
32537
|
-
value: function addMeasurement(data, element) {
|
|
32538
|
-
var measurementData = this.createNewMeasurement(data);
|
|
32537
|
+
value: function addMeasurement(data, element, imagePlane, index) {
|
|
32538
|
+
var measurementData = this.createNewMeasurement(data, imagePlane, index);
|
|
32539
32539
|
addToolState$5(element, this.name, measurementData);
|
|
32540
32540
|
external$t.cornerstone.updateImage(element);
|
|
32541
32541
|
}
|
|
@@ -32552,7 +32552,7 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32552
32552
|
}
|
|
32553
32553
|
}, {
|
|
32554
32554
|
key: "createNewMeasurement",
|
|
32555
|
-
value: function createNewMeasurement(data) {
|
|
32555
|
+
value: function createNewMeasurement(data, imagePlane, index) {
|
|
32556
32556
|
var edgePoints = data.edgePoints;
|
|
32557
32557
|
|
|
32558
32558
|
if (!edgePoints) {
|
|
@@ -32585,7 +32585,22 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32585
32585
|
coords.y = end.y;
|
|
32586
32586
|
}
|
|
32587
32587
|
|
|
32588
|
+
var columns = imagePlane.columns,
|
|
32589
|
+
rows = imagePlane.rows;
|
|
32588
32590
|
var text = getAIText(data);
|
|
32591
|
+
var textBoxX = coords.x;
|
|
32592
|
+
var textBoxY = coords.y;
|
|
32593
|
+
|
|
32594
|
+
if (index === 0) {
|
|
32595
|
+
textBoxX = 20;
|
|
32596
|
+
textBoxY = columns - 50;
|
|
32597
|
+
}
|
|
32598
|
+
|
|
32599
|
+
if (index === 1) {
|
|
32600
|
+
textBoxX = rows - 20;
|
|
32601
|
+
textBoxY = columns - 50;
|
|
32602
|
+
}
|
|
32603
|
+
|
|
32589
32604
|
return {
|
|
32590
32605
|
visible: true,
|
|
32591
32606
|
active: false,
|
|
@@ -32597,11 +32612,11 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32597
32612
|
start2: start2,
|
|
32598
32613
|
end2: end2,
|
|
32599
32614
|
textBox: {
|
|
32600
|
-
x:
|
|
32601
|
-
y:
|
|
32615
|
+
x: textBoxX,
|
|
32616
|
+
y: textBoxY,
|
|
32602
32617
|
text: text,
|
|
32603
32618
|
active: false,
|
|
32604
|
-
hasMoved:
|
|
32619
|
+
hasMoved: true,
|
|
32605
32620
|
movesIndependently: false,
|
|
32606
32621
|
drawnIndependently: true,
|
|
32607
32622
|
allowedOutsideImage: true,
|
|
@@ -32648,7 +32663,7 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32648
32663
|
var _renderToolData = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(evt) {
|
|
32649
32664
|
var _this2 = this;
|
|
32650
32665
|
|
|
32651
|
-
var eventData, element, toolData, stack, seriesInstanceUID, dicom, instanceNumber, aiData, drawData, context, lineWidth, i, data, xOffset;
|
|
32666
|
+
var eventData, element, toolData, stack, imagePlane, seriesInstanceUID, dicom, instanceNumber, aiData, drawData, context, lineWidth, i, data, xOffset;
|
|
32652
32667
|
return regenerator.wrap(function _callee$(_context) {
|
|
32653
32668
|
while (1) {
|
|
32654
32669
|
switch (_context.prev = _context.next) {
|
|
@@ -32667,7 +32682,7 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32667
32682
|
toolData = cornerstoneTools.getToolState(evt.currentTarget, this.name);
|
|
32668
32683
|
|
|
32669
32684
|
if (toolData) {
|
|
32670
|
-
_context.next =
|
|
32685
|
+
_context.next = 20;
|
|
32671
32686
|
break;
|
|
32672
32687
|
}
|
|
32673
32688
|
|
|
@@ -32682,11 +32697,12 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32682
32697
|
return _context.abrupt("return");
|
|
32683
32698
|
|
|
32684
32699
|
case 9:
|
|
32700
|
+
imagePlane = external$t.cornerstone.metaData.get('imagePlaneModule', eventData.image.imageId);
|
|
32685
32701
|
seriesInstanceUID = stack.data[0].seriesInstanceUID;
|
|
32686
|
-
_context.next =
|
|
32702
|
+
_context.next = 13;
|
|
32687
32703
|
return loadAndCacheDicom(eventData.image.imageId);
|
|
32688
32704
|
|
|
32689
|
-
case
|
|
32705
|
+
case 13:
|
|
32690
32706
|
dicom = _context.sent;
|
|
32691
32707
|
instanceNumber = lodash$1.toNumber(dicom.InstanceNumber.value);
|
|
32692
32708
|
aiData = [];
|
|
@@ -32712,16 +32728,16 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32712
32728
|
});
|
|
32713
32729
|
|
|
32714
32730
|
if (drawData && drawData.length > 0) {
|
|
32715
|
-
lodash$1.forEach(drawData, function (data) {
|
|
32716
|
-
_this2.addMeasurement(data, element);
|
|
32731
|
+
lodash$1.forEach(drawData, function (data, i) {
|
|
32732
|
+
_this2.addMeasurement(data, element, imagePlane, i);
|
|
32717
32733
|
});
|
|
32718
32734
|
}
|
|
32719
32735
|
}
|
|
32720
32736
|
|
|
32721
|
-
_context.next =
|
|
32737
|
+
_context.next = 23;
|
|
32722
32738
|
break;
|
|
32723
32739
|
|
|
32724
|
-
case
|
|
32740
|
+
case 20:
|
|
32725
32741
|
// 绘制
|
|
32726
32742
|
context = getNewContext$g(eventData.canvasContext.canvas);
|
|
32727
32743
|
lineWidth = cornerstoneTools.toolStyle.getToolWidth();
|
|
@@ -32737,7 +32753,7 @@ var AIAnalysisOverlayTool = /*#__PURE__*/function (_BaseAnnotationPlusTo) {
|
|
|
32737
32753
|
drawLinkedTextBox$8(context, element, data.handles.textBox, data.handles.textBox.text, data.handles, textBoxAnchorPoints, this.color, lineWidth, xOffset, true);
|
|
32738
32754
|
}
|
|
32739
32755
|
|
|
32740
|
-
case
|
|
32756
|
+
case 23:
|
|
32741
32757
|
case "end":
|
|
32742
32758
|
return _context.stop();
|
|
32743
32759
|
}
|
|
@@ -51935,8 +51951,12 @@ var DicomThumbnailLayout = /*#__PURE__*/function (_Component) {
|
|
|
51935
51951
|
|
|
51936
51952
|
defineProperty(assertThisInitialized(_this), "handleRefresh", function () {
|
|
51937
51953
|
paladinRefreshEvent();
|
|
51938
|
-
|
|
51939
|
-
|
|
51954
|
+
|
|
51955
|
+
if (_this.props.onRefresh) {
|
|
51956
|
+
_this.props.onRefresh();
|
|
51957
|
+
} else {
|
|
51958
|
+
window.location.reload();
|
|
51959
|
+
}
|
|
51940
51960
|
});
|
|
51941
51961
|
|
|
51942
51962
|
defineProperty(assertThisInitialized(_this), "handleThumbSelect", function (i) {
|