hellfire 0.25.0 → 0.25.1

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.1](http://10.16.100.57/diffusion/115/paladin/compare/v0.25.0...v0.25.1) (2023-01-13)
6
+
7
+
8
+
5
9
  # [0.25.0](http://10.16.100.57/diffusion/115/paladin/compare/v0.24.1...v0.25.0) (2022-09-29)
6
10
 
7
11
 
package/README.md CHANGED
@@ -1,28 +1,32 @@
1
- ### Paladin
1
+ ### Paladin (hellfire)
2
2
  ---
3
3
 
4
- 承泽本地渲染引擎
4
+ 云图本地渲染引擎
5
5
 
6
6
  ### Usage
7
7
 
8
8
  Example:
9
9
 
10
10
  ```
11
- import DicomView from 'paladin';
11
+ import DicomView from 'hellfire';
12
12
  const Example = ()=> (
13
13
  <DicomView
14
+ ref='dicomViewLocal'
14
15
  study={study}
16
+ token={token}
15
17
  options={options}
16
18
  toolSortChange={this.toolSortChange}
19
+ ...
17
20
  />
18
21
  )
19
22
  ```
20
23
 
21
24
  ### API documentation
22
25
 
23
- Paladin允许传入参数为 `study`, `options`, `toolSortChange`
26
+ > 1.DicomView允许传入的参数
24
27
 
25
28
  <b>`study`</b>
29
+
26
30
  ```
27
31
  [
28
32
  {
@@ -38,9 +42,11 @@ Paladin允许传入参数为 `study`, `options`, `toolSortChange`
38
42
  }
39
43
  ]
40
44
  ```
45
+
41
46
  需要按此格式传入的检查相关数据集
42
47
 
43
48
  <b>`options`</b>
49
+
44
50
  ```
45
51
  {
46
52
  layout: {
@@ -51,15 +57,129 @@ Paladin允许传入参数为 `study`, `options`, `toolSortChange`
51
57
  toolbarSize: 20
52
58
  }
53
59
  ```
54
- 传入配置项,控制布局和工具栏等
60
+
61
+ 传入配置项,控制布局和工具栏等(用于早期的单列工具栏)
55
62
 
56
63
  - <b>layout</b> :传入初始化布局,不传则默认2*2
57
64
  - <b>tools</b> :传入初始化工具栏顺序
58
65
  - <b>toolbarSize</b> :传入初始化工具栏图标大小
59
66
 
67
+ <b>`helpLink`</b>
68
+
69
+ ```
70
+ helpLink = {'http://www.baidu.com'}
71
+ ```
72
+
73
+ 工具栏"使用帮助"跳转的链接
74
+
75
+ <b>`aiResult`</b>
76
+
77
+ ```
78
+ aiResult = {}
79
+ ```
80
+
81
+ ai结果在影像上打的标记
82
+
83
+ <b>`showAIResult`</b>
84
+
85
+ ```
86
+ showAIResult: boolean
87
+ ```
88
+
89
+ 是否在影像上显示ai结果标记
90
+
91
+ <b>`windowSetting`</b>
92
+
93
+ ```
94
+ windowSetting = {}
95
+ ```
96
+
97
+ 初始化窗值的配置
98
+
99
+ <b>`onLoadReady`</b>
100
+
101
+ ```
102
+ onLoadReady: ()=> void
103
+ ```
104
+
105
+ 所有序列图像加载完毕触发
106
+
107
+ <b>`changeWindowSet`</b>
108
+
109
+ ```
110
+ changeWindowSet: (key, body, index)=> void
111
+ ```
112
+
113
+ 触发自定义窗值 key有:add update delete
114
+
115
+ <b>`operateServerToolState`</b>
116
+
117
+ ```
118
+ operateServerToolState: (key, data) => void
119
+ ```
120
+
121
+ 触发测量工具保存 key有:save delete clear
122
+
123
+ <b>`operateCentesisPath`</b>
124
+
125
+ ```
126
+ operateCentesisPath: (key, data) => void
127
+ ```
128
+
129
+ 触发手术路径规划数据的保存 key有:save
130
+
131
+ <b>`onRefresh`</b>
132
+
133
+ ```
134
+ onRefresh: () => void
135
+ ```
136
+
137
+ 界面下方的重新加载触发的方法(在reload之前)
138
+
60
139
  <b>`toolSortChange`</b>
140
+
61
141
  ```
62
142
  toolSortChange: ()=> void
63
143
  ```
64
- 传入工具栏自定义排序的回调函数
144
+
145
+ 传入工具栏自定义排序的回调函数(用于早期的单列工具栏)
146
+
147
+ > 2.DicomView提供给父组件调用的方法
148
+
149
+ <b>`addStudy(data)`</b>
150
+
151
+ 添加序列,data格式参考study
152
+
153
+ <b>`scrollSeriesImageToIndex(SeriesInstanceUID, SOPInstanceUID)`</b>
154
+
155
+ 指定某个序列跳转到某个图像上
156
+
157
+ <b>`emitImageResize()`</b>
158
+
159
+ 视窗大小的改变
160
+
161
+ <b>`cornerstoneActionEmit({type:xxx,data:xxx})`</b>
162
+
163
+ 模拟触发paladin内的各种操作行为(提供给同屏使用)
164
+
165
+ > 3.paladin对外暴露的对象
166
+
167
+ 用法:
168
+ ```
169
+ import { reducers as hellfireReducer, paladinUtils} from 'hellfire'
170
+ ```
171
+
172
+ <b>`reducers`</b>
173
+
174
+ 暴露给外部hellfire的redux数据
175
+
176
+ <b>`paladinUtils`</b>
177
+
178
+ - getMultiImageDataFromWodo:将wodo url生成base64的image数据
179
+ ```
180
+ paladinUtils.getMultiImageDataFromWodo({
181
+ wodoList
182
+ })
183
+ ```
184
+
65
185
 
package/dist/index.js CHANGED
@@ -51935,6 +51935,7 @@ var DicomThumbnailLayout = /*#__PURE__*/function (_Component) {
51935
51935
 
51936
51936
  defineProperty(assertThisInitialized(_this), "handleRefresh", function () {
51937
51937
  paladinRefreshEvent();
51938
+ _this.props.onRefresh && _this.props.onRefresh();
51938
51939
  window.location.reload();
51939
51940
  });
51940
51941
 
@@ -52587,7 +52588,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
52587
52588
  var patientAge = dicom.PatientAge.toString();
52588
52589
  var patientID = dicom.PatientID.toString();
52589
52590
  var bodyPartExamined = dicom.BodyPartExamined.toString();
52590
- var laterality = dicom.Laterality.toString() || ''; //左下
52591
+ var laterality = dicom.Laterality.toString() || dicom.ImageLaterality.toString() || ''; //左下
52591
52592
 
52592
52593
  var patientOrientation = dicom.PatientOrientation.toString();
52593
52594
  var protocolName = dicom.ProtocolName.toString();
@@ -59844,7 +59845,8 @@ var DicomView = /*#__PURE__*/function (_Component) {
59844
59845
  var isMobile = _default$3.isDeviceTypeMobile();
59845
59846
  var _this$props5 = this.props,
59846
59847
  viewMode = _this$props5.viewMode,
59847
- toolMode = _this$props5.toolMode;
59848
+ toolMode = _this$props5.toolMode,
59849
+ onRefresh = _this$props5.onRefresh;
59848
59850
  var dcStyle = {
59849
59851
  display: 'flex',
59850
59852
  position: 'absolute',
@@ -59880,7 +59882,8 @@ var DicomView = /*#__PURE__*/function (_Component) {
59880
59882
  className: "paladin-dicomView-dicomThumbnailWrapper"
59881
59883
  }, /*#__PURE__*/React__default.createElement(_default$14, {
59882
59884
  isMobile: isMobile,
59883
- study: this.state.study
59885
+ study: this.state.study,
59886
+ onRefresh: onRefresh
59884
59887
  }));
59885
59888
  var mobile = /*#__PURE__*/React__default.createElement("div", {
59886
59889
  style: dcStyle
@@ -59975,6 +59978,7 @@ var __signature__$3A = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoa
59975
59978
  return a;
59976
59979
  };
59977
59980
  var scroll = _default$E.importInternal('util/scroll');
59981
+ var throttle$9 = _default$E.importInternal('util/throttle');
59978
59982
 
59979
59983
  var mapStateToProps$q = function mapStateToProps(state) {
59980
59984
  var _state$paladin$viewpo = state.paladin.viewport,
@@ -60084,6 +60088,39 @@ var mergeProps$p = function mergeProps(propsFromState, propsFromDispatch, ownPro
60084
60088
  var getCurrentElement = function getCurrentElement() {
60085
60089
  return getActiveElement(mode, activeIndex, imageActiveIndex, threeDMode, mprActiveIndex, Surgery, surgeryActiveIndex, CPR);
60086
60090
  };
60091
+ /**
60092
+ * 前进、后退快捷键,加入频率控制
60093
+ * 频率依据序列数量决定
60094
+ * 目前按照一个序列10s播完的标准来计算
60095
+ */
60096
+
60097
+
60098
+ var forwardFunc = function forwardFunc() {
60099
+ var activeElement = getCurrentElement();
60100
+ if (!activeElement) return;
60101
+
60102
+ if (threeDMode) {
60103
+ changeMprPositionWithElement(activeElement, -1, threeScrollType);
60104
+ } else {
60105
+ scroll(activeElement, -1, true, true);
60106
+ }
60107
+ };
60108
+
60109
+ var backFunc = function backFunc() {
60110
+ var activeElement = getCurrentElement();
60111
+ if (!activeElement) return;
60112
+
60113
+ if (threeDMode) {
60114
+ changeMprPositionWithElement(activeElement, 1, threeScrollType);
60115
+ } else {
60116
+ scroll(activeElement, 1, true, true);
60117
+ }
60118
+ };
60119
+
60120
+ var totalCount = propsFromState.currentSeries && propsFromState.currentSeries.imageIds.length || 0;
60121
+ var stepTime = lodash$1.floor(10 * 1000 / totalCount);
60122
+ var throttleForwardFunc = throttle$9(forwardFunc, stepTime);
60123
+ var throttleBackFunc = throttle$9(backFunc, stepTime);
60087
60124
  /**
60088
60125
  *
60089
60126
  * Key values:
@@ -60092,7 +60129,6 @@ var mergeProps$p = function mergeProps(propsFromState, propsFromDispatch, ownPro
60092
60129
  *
60093
60130
  */
60094
60131
 
60095
-
60096
60132
  return _objectSpread$N(_objectSpread$N(_objectSpread$N({}, ownProps), propsFromState), {}, {
60097
60133
  showDicomThumbnail: showDicomThumbnail,
60098
60134
  viewMode: viewMode,
@@ -60205,24 +60241,10 @@ var mergeProps$p = function mergeProps(propsFromState, propsFromDispatch, ownPro
60205
60241
  }
60206
60242
  },
60207
60243
  FORWARD: function FORWARD() {
60208
- var activeElement = getCurrentElement();
60209
- if (!activeElement) return;
60210
-
60211
- if (threeDMode) {
60212
- changeMprPositionWithElement(activeElement, -1, threeScrollType);
60213
- } else {
60214
- scroll(activeElement, -1, true, true);
60215
- }
60244
+ throttleForwardFunc();
60216
60245
  },
60217
60246
  BACKWARD: function BACKWARD() {
60218
- var activeElement = getCurrentElement();
60219
- if (!activeElement) return;
60220
-
60221
- if (threeDMode) {
60222
- changeMprPositionWithElement(activeElement, 1, threeScrollType);
60223
- } else {
60224
- scroll(activeElement, 1, true, true);
60225
- }
60247
+ throttleBackFunc();
60226
60248
  },
60227
60249
  SCALE_ADD: function SCALE_ADD() {
60228
60250
  setScaleRelative(getCurrentElement(), 1.1);
@@ -60699,6 +60721,7 @@ var _default$1g = ConnectedDicomView;
60699
60721
  }
60700
60722
 
60701
60723
  reactHotLoader.register(scroll, "scroll", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
60724
+ reactHotLoader.register(throttle$9, "throttle", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
60702
60725
  reactHotLoader.register(mapStateToProps$q, "mapStateToProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
60703
60726
  reactHotLoader.register(mergeProps$p, "mergeProps", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");
60704
60727
  reactHotLoader.register(ConnectedDicomView, "ConnectedDicomView", "/Users/huyeqing/workspace/chainz/paladin/src/Viewer/DicomView/ConnectedDicomView.js");