hellfire 0.23.3 → 0.24.0

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,18 @@
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.24.0](http://10.16.100.57/diffusion/115/paladin/compare/v0.23.5...v0.24.0) (2022-08-23)
6
+
7
+
8
+
9
+ ## [0.23.5](http://10.16.100.57/diffusion/115/paladin/compare/v0.23.4...v0.23.5) (2022-08-17)
10
+
11
+
12
+
13
+ ## [0.23.4](http://10.16.100.57/diffusion/115/paladin/compare/v0.23.3...v0.23.4) (2022-08-15)
14
+
15
+
16
+
5
17
  ## [0.23.3](http://10.16.100.57/diffusion/115/paladin/compare/v0.23.2...v0.23.3) (2022-08-15)
6
18
 
7
19
 
package/dist/index.js CHANGED
@@ -43607,7 +43607,7 @@ var Cine = /*#__PURE__*/function (_Component) {
43607
43607
  }, /*#__PURE__*/React__default.createElement(Input$1, {
43608
43608
  type: "tel",
43609
43609
  disabled: true,
43610
- value: cineFps,
43610
+ value: lodash$1.round(cineFps),
43611
43611
  style: {
43612
43612
  textAlign: 'center'
43613
43613
  }
@@ -43723,9 +43723,7 @@ var __signature__$2z = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoa
43723
43723
  };
43724
43724
 
43725
43725
  var mapStateToProps$6 = function mapStateToProps(state) {
43726
- var _state$paladin$viewpo = state.paladin.viewport,
43727
- activeIndex = _state$paladin$viewpo.activeIndex,
43728
- currentSeries = _state$paladin$viewpo.currentSeries;
43726
+ var activeIndex = state.paladin.viewport.activeIndex;
43729
43727
  var _state$paladin$tools$ = state.paladin.tools.action,
43730
43728
  cineFps = _state$paladin$tools$.cineFps,
43731
43729
  Cine = _state$paladin$tools$.Cine,
@@ -43734,8 +43732,7 @@ var mapStateToProps$6 = function mapStateToProps(state) {
43734
43732
  activeElement: getElement(activeIndex),
43735
43733
  cineFps: cineFps,
43736
43734
  Cine: Cine,
43737
- cineDireaction: cineDireaction,
43738
- currentSeries: currentSeries
43735
+ cineDireaction: cineDireaction
43739
43736
  };
43740
43737
  };
43741
43738
 
@@ -43743,8 +43740,7 @@ var mergeProps$6 = function mergeProps(propsFromState, propsFromDispatch, ownPro
43743
43740
  var activeElement = propsFromState.activeElement,
43744
43741
  cineFps = propsFromState.cineFps,
43745
43742
  Cine = propsFromState.Cine,
43746
- cineDireaction = propsFromState.cineDireaction,
43747
- currentSeries = propsFromState.currentSeries;
43743
+ cineDireaction = propsFromState.cineDireaction;
43748
43744
  var setCineFps = propsFromDispatch.setCineFps,
43749
43745
  setCineDireaction = propsFromDispatch.setCineDireaction,
43750
43746
  activeDicomFunction = propsFromDispatch.activeDicomFunction;
@@ -43765,16 +43761,9 @@ var mergeProps$6 = function mergeProps(propsFromState, propsFromDispatch, ownPro
43765
43761
  break;
43766
43762
 
43767
43763
  case 'forward':
43768
- var _cineFps = cineFps;
43769
-
43770
- if (currentSeries.frameFps) {
43771
- setCineFps(currentSeries.frameFps);
43772
- _cineFps = currentSeries.frameFps;
43773
- }
43774
-
43775
43764
  _default$E.autoCine.startAutoCine(activeElement, {
43776
43765
  direction: -1,
43777
- fps: _cineFps
43766
+ fps: cineFps
43778
43767
  });
43779
43768
  setCineDireaction(-1);
43780
43769
 
@@ -43785,16 +43774,9 @@ var mergeProps$6 = function mergeProps(propsFromState, propsFromDispatch, ownPro
43785
43774
  break;
43786
43775
 
43787
43776
  case 'backward':
43788
- var __cineFps = cineFps;
43789
-
43790
- if (currentSeries.frameFps) {
43791
- setCineFps(currentSeries.frameFps);
43792
- __cineFps = currentSeries.frameFps;
43793
- }
43794
-
43795
43777
  _default$E.autoCine.startAutoCine(activeElement, {
43796
43778
  direction: 1,
43797
- fps: __cineFps
43779
+ fps: cineFps
43798
43780
  });
43799
43781
  setCineDireaction(1);
43800
43782
 
@@ -43810,7 +43792,7 @@ var mergeProps$6 = function mergeProps(propsFromState, propsFromDispatch, ownPro
43810
43792
  break;
43811
43793
 
43812
43794
  case 'fpsAdd':
43813
- var fps = cineFps < 10 ? cineFps + 1 : 10;
43795
+ var fps = cineFps < 10 ? lodash$1.round(cineFps) + 1 : 10;
43814
43796
  setCineFps(fps); // 如果正在播放 则重置播放属性
43815
43797
 
43816
43798
  if (Cine) {
@@ -43823,7 +43805,7 @@ var mergeProps$6 = function mergeProps(propsFromState, propsFromDispatch, ownPro
43823
43805
  break;
43824
43806
 
43825
43807
  case 'fpsMinus':
43826
- var _fps = cineFps > 1 ? cineFps - 1 : 1;
43808
+ var _fps = cineFps > 1 ? lodash$1.round(cineFps) - 1 : 1;
43827
43809
 
43828
43810
  setCineFps(_fps);
43829
43811
 
@@ -50754,16 +50736,9 @@ var mergeProps$e = function mergeProps(propsFromState, propsFromDispatch, ownPro
50754
50736
  if (Cine) {
50755
50737
  _default$E.autoCine.stopAutoCine();
50756
50738
  } else {
50757
- var _cineFps = cineFps;
50758
-
50759
- if (currentSeries.frameFps) {
50760
- propsFromDispatch.setCineFps(currentSeries.frameFps);
50761
- _cineFps = currentSeries.frameFps;
50762
- }
50763
-
50764
50739
  _default$E.autoCine.startAutoCine(activeElement, {
50765
50740
  direction: 1,
50766
- fps: _cineFps
50741
+ fps: cineFps
50767
50742
  });
50768
50743
  propsFromDispatch.setCineDireaction(1);
50769
50744
  }
@@ -51311,8 +51286,7 @@ var ConnectedDicomTool = reactRedux.connect(mapStateToProps$e, {
51311
51286
  closeOnePickLayout: closeOnePickLayout,
51312
51287
  setActiveIndex: setActiveIndex,
51313
51288
  setLayout: setLayout,
51314
- setLastLayout: setLastLayout,
51315
- setCineFps: setCineFps
51289
+ setLastLayout: setLastLayout
51316
51290
  }, mergeProps$e)(DicomTool);
51317
51291
  var _default$11 = ConnectedDicomTool;
51318
51292
 
@@ -56068,38 +56042,87 @@ var mergeProps$g = function mergeProps(propsFromState, propsFromDispatch, ownPro
56068
56042
  },
56069
56043
  // 需求:当前选中的序列默认在同步中
56070
56044
  // 当同步未开启,mousedown时把即将激活的元素加入sync中
56071
- onViewPortCellClick: function onViewPortCellClick(e, index, series) {
56072
- var activeIndex = propsFromState.activeIndex,
56073
- Sync = propsFromState.Sync;
56045
+ onViewPortCellClick: function () {
56046
+ var _onViewPortCellClick = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(e, index, series) {
56047
+ var activeIndex, Sync, oldActiveElement, element, dicom, frameTime;
56048
+ return regenerator.wrap(function _callee$(_context) {
56049
+ while (1) {
56050
+ switch (_context.prev = _context.next) {
56051
+ case 0:
56052
+ activeIndex = propsFromState.activeIndex, Sync = propsFromState.Sync;
56074
56053
 
56075
- if (!Sync && !e.ctrlKey && e.button === 0) {
56076
- if (!_.includes(linkSeriesIndex, activeIndex)) {
56077
- var oldActiveElement = getElement(activeIndex);
56054
+ if (!(!Sync && !e.ctrlKey && e.button === 0)) {
56055
+ _context.next = 14;
56056
+ break;
56057
+ }
56078
56058
 
56079
- if (!oldActiveElement) {
56080
- return;
56081
- }
56059
+ if (_.includes(linkSeriesIndex, activeIndex)) {
56060
+ _context.next = 8;
56061
+ break;
56062
+ }
56082
56063
 
56083
- linkSynchronizer.remove(oldActiveElement);
56084
- linkScrollSynchronizer.remove(oldActiveElement);
56085
- }
56064
+ oldActiveElement = getElement(activeIndex);
56086
56065
 
56087
- if (!_.includes(linkSeriesIndex, index)) {
56088
- var element = getElement(index);
56066
+ if (oldActiveElement) {
56067
+ _context.next = 6;
56068
+ break;
56069
+ }
56089
56070
 
56090
- if (!element) {
56091
- return;
56092
- }
56071
+ return _context.abrupt("return");
56093
56072
 
56094
- linkSynchronizer.add(element);
56095
- linkScrollSynchronizer.add(element);
56096
- }
56097
- } // 单击 1.激活当前影像框 2.设置当前series
56073
+ case 6:
56074
+ linkSynchronizer.remove(oldActiveElement);
56075
+ linkScrollSynchronizer.remove(oldActiveElement);
56098
56076
 
56077
+ case 8:
56078
+ if (_.includes(linkSeriesIndex, index)) {
56079
+ _context.next = 14;
56080
+ break;
56081
+ }
56099
56082
 
56100
- propsFromDispatch.setActiveIndex(index);
56101
- propsFromDispatch.setCurrentSeries(series);
56102
- },
56083
+ element = getElement(index);
56084
+
56085
+ if (element) {
56086
+ _context.next = 12;
56087
+ break;
56088
+ }
56089
+
56090
+ return _context.abrupt("return");
56091
+
56092
+ case 12:
56093
+ linkSynchronizer.add(element);
56094
+ linkScrollSynchronizer.add(element);
56095
+
56096
+ case 14:
56097
+ // 单击 1.激活当前影像框 2.设置当前series
56098
+ propsFromDispatch.setActiveIndex(index);
56099
+ propsFromDispatch.setCurrentSeries(series); // 如果有frameTime的话设置fps
56100
+
56101
+ _context.next = 18;
56102
+ return loadAndCacheDicom(series.imageIds[0]);
56103
+
56104
+ case 18:
56105
+ dicom = _context.sent;
56106
+
56107
+ if (dicom && dicom.FrameTime && dicom.FrameTime.value) {
56108
+ frameTime = dicom.FrameTime.value;
56109
+ propsFromDispatch.setCineFps(lodash$1.round(1000 / frameTime, 3) || 3);
56110
+ }
56111
+
56112
+ case 20:
56113
+ case "end":
56114
+ return _context.stop();
56115
+ }
56116
+ }
56117
+ }, _callee);
56118
+ }));
56119
+
56120
+ function onViewPortCellClick(_x, _x2, _x3) {
56121
+ return _onViewPortCellClick.apply(this, arguments);
56122
+ }
56123
+
56124
+ return onViewPortCellClick;
56125
+ }(),
56103
56126
  onDrop: function onDrop(ev, i, stack) {
56104
56127
  // 下方缩略图拖动到布局中的回调
56105
56128
  // 功能注释同ConnectedDicomThumbnail.js中的selectThumb
@@ -56130,7 +56153,8 @@ var ConnectedDicomLayout = reactRedux.connect(mapStateToProps$h, {
56130
56153
  setScrollLine: setScrollLine,
56131
56154
  setLinkSeries: setLinkSeries,
56132
56155
  openOnePickLayout: openOnePickLayout,
56133
- closeOnePickLayout: closeOnePickLayout
56156
+ closeOnePickLayout: closeOnePickLayout,
56157
+ setCineFps: setCineFps
56134
56158
  }, mergeProps$g)(DicomLayout);
56135
56159
  var _default$17 = ConnectedDicomLayout;
56136
56160
 
@@ -60115,7 +60139,7 @@ var mergeProps$o = function mergeProps(propsFromState, propsFromDispatch, ownPro
60115
60139
  },
60116
60140
  initSeries: function () {
60117
60141
  var _initSeries2 = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(changeStudy, callback) {
60118
- var data, synchronizer, linkSynchronizer, linkImageModeSynchronizer, linkScrollSynchronizer, options, _study, series, needCheckMultiFrame, hasMultiFrame, i, item, wado, url, dataSet, numFrames, imageIds, _i, imageId, frameTime, fps, seriesCurrentIndex, firstReady, maxRequest, retry, clearCacheEveryLoad;
60142
+ var data, synchronizer, linkSynchronizer, linkImageModeSynchronizer, linkScrollSynchronizer, options, _study, series, needCheckMultiFrame, hasMultiFrame, i, item, wado, url, dataSet, numFrames, imageIds, _i, imageId, seriesCurrentIndex, firstReady, maxRequest, retry, clearCacheEveryLoad, dicom, frameTime;
60119
60143
 
60120
60144
  return regenerator.wrap(function _callee$(_context) {
60121
60145
  while (1) {
@@ -60132,6 +60156,7 @@ var mergeProps$o = function mergeProps(propsFromState, propsFromDispatch, ownPro
60132
60156
  * - 设置当前series
60133
60157
  * - 初始化viewport缓存池
60134
60158
  * - 初始化图像预加载
60159
+ * - 如果有frameTime的话设置fps
60135
60160
  *
60136
60161
  * 检查io是否为true是的话打开同屏开关
60137
60162
  */
@@ -60240,17 +60265,14 @@ var mergeProps$o = function mergeProps(propsFromState, propsFromDispatch, ownPro
60240
60265
  imageIds.push(imageId);
60241
60266
  }
60242
60267
 
60243
- frameTime = dataSet.intString('x00181063');
60244
- fps = parseInt(1000 / frameTime, 10) || 3;
60245
60268
  series[i] = _objectSpread$M(_objectSpread$M({}, item), {}, {
60246
60269
  imageIds: imageIds,
60247
60270
  numberOfSeriesRelatedInstances: numFrames,
60248
- isMultiFrame: true,
60249
- frameFps: fps
60271
+ isMultiFrame: true
60250
60272
  });
60251
60273
  }
60252
60274
 
60253
- cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.unload(url);
60275
+ cornerstoneWADOImageLoader.wadouri.dataSetCacheManager.purge();
60254
60276
 
60255
60277
  case 38:
60256
60278
  i++;
@@ -60311,9 +60333,20 @@ var mergeProps$o = function mergeProps(propsFromState, propsFromDispatch, ownPro
60311
60333
  study: [_objectSpread$M(_objectSpread$M({}, ownProps.study[0]), {}, {
60312
60334
  series: series
60313
60335
  })]
60314
- });
60336
+ }); // 如果有frameTime的话设置fps
60315
60337
 
60316
- case 54:
60338
+ _context.next = 56;
60339
+ return loadAndCacheDicom(series[0].imageIds[0]);
60340
+
60341
+ case 56:
60342
+ dicom = _context.sent;
60343
+
60344
+ if (dicom && dicom.FrameTime && dicom.FrameTime.value) {
60345
+ frameTime = dicom.FrameTime.value;
60346
+ propsFromDispatch.setCineFps(lodash$1.round(1000 / frameTime, 3) || 3);
60347
+ }
60348
+
60349
+ case 58:
60317
60350
  case "end":
60318
60351
  return _context.stop();
60319
60352
  }
@@ -60333,11 +60366,20 @@ var mergeProps$o = function mergeProps(propsFromState, propsFromDispatch, ownPro
60333
60366
 
60334
60367
  if (onePickMode) {
60335
60368
  propsFromDispatch.closeOnePickLayout();
60336
- } // 清除image缓存和dicom缓存
60369
+ } // 清除dicom缓存
60337
60370
 
60338
60371
 
60339
- cornerstone.imageCache.purgeCache();
60340
- purgeDicomCache();
60372
+ purgeDicomCache(); // 清除imageCache时做判断,超出60%的时候删除前30%
60373
+
60374
+ var cacheInfo = cornerstone.imageCache.getCacheInfo();
60375
+ var maximumSizeInBytes = cacheInfo.maximumSizeInBytes,
60376
+ cacheSizeInBytes = cacheInfo.cacheSizeInBytes;
60377
+
60378
+ if (cacheSizeInBytes > maximumSizeInBytes * 0.6) {
60379
+ // 暂未找到更合适的接口,setMaximumSizeBytes时会触发purgeCacheIfNecessary,可以达到效果
60380
+ cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes * 0.3);
60381
+ cornerstone.imageCache.setMaximumSizeBytes(maximumSizeInBytes);
60382
+ }
60341
60383
  },
60342
60384
  // 匹配序列 切换到指定图像位置
60343
60385
  scrollSeriesImageToIndex: function scrollSeriesImageToIndex(seriesUID, SOPInstanceUID) {
@@ -60382,7 +60424,8 @@ var ConnectedDicomView = reactRedux.connect(mapStateToProps$p, {
60382
60424
  activeDicomFunction: activeDicomFunction,
60383
60425
  openIO: openIO,
60384
60426
  closeIO: closeIO,
60385
- setActiveTool: setActiveTool
60427
+ setActiveTool: setActiveTool,
60428
+ setCineFps: setCineFps
60386
60429
  }, mergeProps$o, withRef())(DicomView);
60387
60430
 
60388
60431
  function withRef() {