hellfire 0.30.4 → 0.30.6

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,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.30.6](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.5...v0.30.6) (2025-08-01)
6
+
7
+
8
+
9
+ ## [0.30.5](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.4...v0.30.5) (2025-07-29)
10
+
11
+
12
+
5
13
  ## [0.30.4](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.3...v0.30.4) (2025-07-28)
6
14
 
7
15
 
package/dist/index.html CHANGED
@@ -9,4 +9,4 @@
9
9
  width: 100%;
10
10
  overflow: auto;
11
11
  margin: 0;
12
- }</style><link rel="icon" href="./favicon.ico?504bd2f206cadb4f4aee"><script defer="defer" src="./v0.17.0-140-g0429685/main-504bd2f206cadb4f4aee.js?504bd2f206cadb4f4aee"></script><link href="./v0.17.0-140-g0429685/main-504bd2f206cadb4f4aee.css?504bd2f206cadb4f4aee" rel="stylesheet"></head><body><div id="app" style="height: 100%;"></div></body></html>
12
+ }</style><link rel="icon" href="./favicon.ico?a3ff9f5ae9aaba10e321"><script defer="defer" src="./v0.17.0-236-g6378d92/main-a3ff9f5ae9aaba10e321.js?a3ff9f5ae9aaba10e321"></script><link href="./v0.17.0-236-g6378d92/main-a3ff9f5ae9aaba10e321.css?a3ff9f5ae9aaba10e321" rel="stylesheet"></head><body><div id="app" style="height: 100%;"></div></body></html>
package/dist/index.js CHANGED
@@ -10628,19 +10628,19 @@ function changePriorityBySeries(seriesInstanceUID, series) {
10628
10628
  });
10629
10629
  changeCurrentTopPriority(index);
10630
10630
  executeSpecificTask();
10631
- } else {
10632
- // taskPool中无内容 + cache达到max + 序列第一张不在cache中 重新加载整个序列
10633
- var cacheInfo = cornerstone.imageCache.getCacheInfo();
10634
- var maximumSizeInBytes = cacheInfo.maximumSizeInBytes,
10635
- cacheSizeInBytes = cacheInfo.cacheSizeInBytes;
10631
+ } // cache达到max + 序列第一张不在cache中 重新加载整个序列
10636
10632
 
10637
- if (series && cacheSizeInBytes > maximumSizeInBytes * 0.99) {
10638
- var firstImageId = series.imageIds[0];
10639
- var imageLoadObject = cornerstone.imageCache.getImageLoadObject(firstImageId);
10640
10633
 
10641
- if (!imageLoadObject) {
10642
- addTaskPool([series]);
10643
- }
10634
+ var cacheInfo = cornerstone.imageCache.getCacheInfo();
10635
+ var maximumSizeInBytes = cacheInfo.maximumSizeInBytes,
10636
+ cacheSizeInBytes = cacheInfo.cacheSizeInBytes;
10637
+
10638
+ if (series && cacheSizeInBytes > maximumSizeInBytes * 0.99) {
10639
+ var firstImageId = series.imageIds[0];
10640
+ var imageLoadObject = cornerstone.imageCache.getImageLoadObject(firstImageId);
10641
+
10642
+ if (!imageLoadObject) {
10643
+ addTaskPool([series]);
10644
10644
  }
10645
10645
  }
10646
10646
  }
@@ -25737,12 +25737,14 @@ var dicomSettingHotKeyDic = [{
25737
25737
  }];
25738
25738
  var hotKeyIsOpen = window.localStorage.getItem('hellfire-hotkey-open') || 'open';
25739
25739
  var dicomBasicInfoFrom = window.localStorage.getItem('hellfire-dicom-basic-info-from') || 'dicom';
25740
+ var cacheMaxSize = window.localStorage.getItem('hellfire-image-cache-max-size') || '1';
25740
25741
  var customDicomSetting = {
25741
25742
  leftMouseTool: 'Wwwc',
25742
25743
  rightMouseTool: 'Zoom',
25743
25744
  middleMouseTool: 'Pan',
25744
25745
  hotKeyIsOpen: hotKeyIsOpen,
25745
- dicomBasicInfoFrom: dicomBasicInfoFrom
25746
+ dicomBasicInfoFrom: dicomBasicInfoFrom,
25747
+ cacheMaxSize: cacheMaxSize
25746
25748
  };
25747
25749
 
25748
25750
  var saveCustomDicomSetting = function saveCustomDicomSetting() {
@@ -30580,7 +30582,15 @@ function _createImage$2() {
30580
30582
  var isMobileTablet = ua.isDeviceTypeMobileOrTablet();
30581
30583
 
30582
30584
  if (!isMobileTablet) {
30583
- cornerstone.imageCache.setMaximumSizeBytes(1024 * 1024 * 1024 * 1);
30585
+ var cacheMaxSize$1 = window.localStorage.getItem('hellfire-image-cache-max-size') || '1';
30586
+
30587
+ var _cacheMaxSize = parseFloat(cacheMaxSize$1);
30588
+
30589
+ if (!_cacheMaxSize || isNaN(_cacheMaxSize)) {
30590
+ cornerstone.imageCache.setMaximumSizeBytes(1024 * 1024 * 1024 * 1);
30591
+ } else {
30592
+ cornerstone.imageCache.setMaximumSizeBytes(1024 * 1024 * 1024 * _cacheMaxSize);
30593
+ }
30584
30594
  }
30585
30595
 
30586
30596
  cornerstoneTools.external.cornerstone = cornerstone;
@@ -46782,6 +46792,8 @@ var mergeProps$h = function mergeProps(propsFromState, propsFromDispatch, ownPro
46782
46792
  var maxIndex = currentSeries && currentSeries.imageIds.length - 1;
46783
46793
  return _objectSpread$G(_objectSpread$G(_objectSpread$G({}, ownProps), propsFromState), {}, {
46784
46794
  onRowClick: function onRowClick(key) {
46795
+ changePriorityBySeries(currentSeries.seriesInstanceUID);
46796
+
46785
46797
  switch (key) {
46786
46798
  case 'prev':
46787
46799
  var prevIndex = currentImageIndex - 1;
@@ -49358,7 +49370,7 @@ function calcTargetIndex(sourceImageLength, targetElement, currentImageIdIndex)
49358
49370
  }
49359
49371
  }
49360
49372
 
49361
- var css_248z$v = ".paladin-user-setting {\n padding: 0 20px;\n margin-bottom: 30px;\n font-size: 15px;\n}\n.paladin-user-setting p {\n font-size: 16px;\n}\n.paladin-user-setting p svg {\n width: 10px;\n margin-right: 2px;\n}\n.paladin-user-setting .paladin-user-setting-remark {\n color: #d43f3a;\n margin: 10px 0 0 0;\n}\n.paladin-user-setting .paladin-user-setting-footer {\n margin-top: 15px;\n text-align: right;\n}\n.paladin-user-setting .paladin-user-setting-footer button {\n margin-left: 10px;\n}\n.paladin-user-setting .paladin-setting-radio {\n display: flex;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-label {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item {\n display: flex;\n flex-direction: row;\n margin-right: 10px;\n align-items: center;\n justify-content: center;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item .paladin-ipt {\n padding: 0 !important;\n margin: 0 3px 0 0 !important;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item input {\n display: flex;\n flex-direction: column;\n width: 20px;\n height: 20px;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item span {\n display: flex;\n flex-direction: column;\n}\n.paladin-user-setting .paladin-setting-hotkey {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n.paladin-user-setting .paladin-setting-hotkey .paladin-setting-hotkey-item {\n display: flex;\n flex-direction: column;\n flex: none;\n padding: 5px 10px;\n border: 1px solid #666;\n border-radius: 3px;\n margin-right: 10px;\n margin-bottom: 10px;\n}\n";
49373
+ var css_248z$v = ".paladin-user-setting {\n padding: 0 20px;\n margin-bottom: 30px;\n font-size: 15px;\n}\n.paladin-user-setting p {\n font-size: 16px;\n}\n.paladin-user-setting p svg {\n width: 10px;\n margin-right: 2px;\n}\n.paladin-user-setting .paladin-user-setting-remark {\n color: #d43f3a;\n margin: 10px 0 0 0;\n}\n.paladin-user-setting .paladin-user-setting-footer {\n margin-top: 15px;\n text-align: right;\n}\n.paladin-user-setting .paladin-user-setting-footer button {\n margin-left: 10px;\n}\n.paladin-user-setting .paladin-setting-radio {\n display: flex;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-label {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item {\n display: flex;\n flex-direction: row;\n margin-right: 10px;\n align-items: center;\n justify-content: center;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item .paladin-ipt {\n padding: 0 !important;\n margin: 0 3px 0 0 !important;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item input {\n display: flex;\n flex-direction: column;\n width: 20px;\n height: 20px;\n}\n.paladin-user-setting .paladin-setting-radio .paladin-setting-radio-item span {\n display: flex;\n flex-direction: column;\n}\n.paladin-user-setting .paladin-setting-hotkey {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n}\n.paladin-user-setting .paladin-setting-hotkey .paladin-setting-hotkey-item {\n display: flex;\n flex-direction: column;\n flex: none;\n padding: 5px 10px;\n border: 1px solid #666;\n border-radius: 3px;\n margin-right: 10px;\n margin-bottom: 10px;\n}\n.paladin-user-setting .paladin-setting-cache .paladin-ipt {\n width: 70px;\n display: inline-block;\n text-align: center;\n}\n.paladin-user-setting .paladin-setting-cache .paladin-setting-cache-unit {\n font-weight: bold;\n margin-left: 2px;\n}\n.paladin-user-setting .paladin-setting-cache-info {\n margin-top: 4px;\n font-size: 13px;\n}\n";
49362
49374
  styleInject$1(css_248z$v);
49363
49375
 
49364
49376
  function _extends$1t() { _extends$1t = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1t.apply(this, arguments); }
@@ -49395,9 +49407,15 @@ var UserSettingModal = /*#__PURE__*/function (_Component) {
49395
49407
  _this = _super.call(this, props);
49396
49408
 
49397
49409
  defineProperty(assertThisInitialized(_this), "handleSave", function () {
49410
+ if (!_this.state.cacheMaxSize || _this.state.cacheMaxSize < 0.5 || _this.state.cacheMaxSize > 2) {
49411
+ message.error('缓存大小范围为 0.5 ~ 2G');
49412
+ return;
49413
+ }
49414
+
49398
49415
  var dicomSettingChange = _this.props.dicomSettingChange;
49399
49416
  window.localStorage.setItem('hellfire-hotkey-open', _this.state.hotKeyIsOpen);
49400
49417
  window.localStorage.setItem('hellfire-dicom-basic-info-from', _this.state.dicomBasicInfoFrom);
49418
+ window.localStorage.setItem('hellfire-image-cache-max-size', _this.state.cacheMaxSize);
49401
49419
 
49402
49420
  if (dicomSettingChange) {
49403
49421
  dicomSettingChange && dicomSettingChange({
@@ -49428,7 +49446,8 @@ var UserSettingModal = /*#__PURE__*/function (_Component) {
49428
49446
  rightMouseTool = _this$state.rightMouseTool,
49429
49447
  middleMouseTool = _this$state.middleMouseTool,
49430
49448
  hotKeyIsOpen = _this$state.hotKeyIsOpen,
49431
- dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom;
49449
+ dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom,
49450
+ cacheMaxSize = _this$state.cacheMaxSize;
49432
49451
  var close = this.props.close;
49433
49452
  return /*#__PURE__*/React__default.createElement("div", {
49434
49453
  className: 'paladin-user-setting'
@@ -49554,7 +49573,27 @@ var UserSettingModal = /*#__PURE__*/function (_Component) {
49554
49573
  className: 'paladin-setting-hotkey-item',
49555
49574
  key: "setting-hotkey-".concat(index)
49556
49575
  }, value.label, "(", value.hotkey, ")");
49557
- })), /*#__PURE__*/React__default.createElement("div", {
49576
+ })), /*#__PURE__*/React__default.createElement("p", {
49577
+ style: {
49578
+ marginTop: '30px'
49579
+ }
49580
+ }, /*#__PURE__*/React__default.createElement(SvgCertificate, null), "\u7F13\u5B58\u5927\u5C0F\u8BBE\u7F6E\uFF1A"), /*#__PURE__*/React__default.createElement("div", {
49581
+ className: 'paladin-setting-cache'
49582
+ }, /*#__PURE__*/React__default.createElement(Input$1, {
49583
+ type: "number",
49584
+ value: cacheMaxSize,
49585
+ min: 0,
49586
+ max: 2,
49587
+ onChange: function onChange(e) {
49588
+ _this2.setState({
49589
+ cacheMaxSize: e.target.value
49590
+ });
49591
+ }
49592
+ }), /*#__PURE__*/React__default.createElement("span", {
49593
+ className: 'paladin-setting-cache-unit'
49594
+ }, " G")), /*#__PURE__*/React__default.createElement("div", {
49595
+ className: 'paladin-setting-cache-info'
49596
+ }, "\u7535\u8111\u5185\u5B5816G\u63A8\u8350\u8BBE\u7F6E2G\uFF1B8G\u63A8\u8350\u8BBE\u7F6E1G\uFF1B4G\u63A8\u8350\u8BBE\u7F6E0.5G"), /*#__PURE__*/React__default.createElement("div", {
49558
49597
  className: 'paladin-user-setting-remark'
49559
49598
  }, "\u6CE8\uFF1A\u4FDD\u5B58\u540E\u4F1A\u81EA\u52A8\u5237\u65B0\u9875\u9762"), /*#__PURE__*/React__default.createElement("div", {
49560
49599
  className: 'paladin-user-setting-footer'
@@ -49852,9 +49891,15 @@ var UserSettingModalEn = /*#__PURE__*/function (_Component) {
49852
49891
  _this = _super.call(this, props);
49853
49892
 
49854
49893
  defineProperty(assertThisInitialized(_this), "handleSave", function () {
49894
+ if (!_this.state.cacheMaxSize || _this.state.cacheMaxSize < 0.5 || _this.state.cacheMaxSize > 2) {
49895
+ message.error('Size Range in 0.5 ~ 2G');
49896
+ return;
49897
+ }
49898
+
49855
49899
  var dicomSettingChange = _this.props.dicomSettingChange;
49856
49900
  window.localStorage.setItem('hellfire-hotkey-open', _this.state.hotKeyIsOpen);
49857
49901
  window.localStorage.setItem('hellfire-dicom-basic-info-from', _this.state.dicomBasicInfoFrom);
49902
+ window.localStorage.setItem('hellfire-image-cache-max-size', _this.state.cacheMaxSize);
49858
49903
 
49859
49904
  if (dicomSettingChange) {
49860
49905
  dicomSettingChange && dicomSettingChange({
@@ -49885,7 +49930,8 @@ var UserSettingModalEn = /*#__PURE__*/function (_Component) {
49885
49930
  rightMouseTool = _this$state.rightMouseTool,
49886
49931
  middleMouseTool = _this$state.middleMouseTool,
49887
49932
  hotKeyIsOpen = _this$state.hotKeyIsOpen,
49888
- dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom;
49933
+ dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom,
49934
+ cacheMaxSize = _this$state.cacheMaxSize;
49889
49935
  var close = this.props.close;
49890
49936
  return /*#__PURE__*/React__default.createElement("div", {
49891
49937
  className: 'paladin-user-setting'
@@ -50011,7 +50057,27 @@ var UserSettingModalEn = /*#__PURE__*/function (_Component) {
50011
50057
  className: 'paladin-setting-hotkey-item',
50012
50058
  key: "setting-hotkey-".concat(index)
50013
50059
  }, value.label_en, "(", value.hotkey, ")");
50014
- })), /*#__PURE__*/React__default.createElement("div", {
50060
+ })), /*#__PURE__*/React__default.createElement("p", {
50061
+ style: {
50062
+ marginTop: '30px'
50063
+ }
50064
+ }, /*#__PURE__*/React__default.createElement(SvgCertificate, null), "Cache Max Size\uFF1A"), /*#__PURE__*/React__default.createElement("div", {
50065
+ className: 'paladin-setting-cache'
50066
+ }, /*#__PURE__*/React__default.createElement(Input$1, {
50067
+ type: "number",
50068
+ value: cacheMaxSize,
50069
+ min: 0,
50070
+ max: 2,
50071
+ onChange: function onChange(e) {
50072
+ _this2.setState({
50073
+ cacheMaxSize: e.target.value
50074
+ });
50075
+ }
50076
+ }), /*#__PURE__*/React__default.createElement("span", {
50077
+ className: 'paladin-setting-cache-unit'
50078
+ }, " G")), /*#__PURE__*/React__default.createElement("div", {
50079
+ className: 'paladin-setting-cache-info'
50080
+ }, "Device Memory 16G Recommend Setting 2G\uFF1B8G Recommend Setting 1G\uFF1B4G Recommend Setting 0.5G"), /*#__PURE__*/React__default.createElement("div", {
50015
50081
  className: 'paladin-user-setting-remark'
50016
50082
  }, "Note: The page will refresh automatically after saving."), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
50017
50083
  onClick: this.props.toggleFilmPrinterEntrance
@@ -55321,6 +55387,7 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
55321
55387
  this.element.addEventListener(cornerstoneTools.EVENTS.MPR_REFERENCE_LINE, this.onMPRProcessed);
55322
55388
  } else {
55323
55389
  this.element.addEventListener('mouseup', this.onMouseUp);
55390
+ this.element.addEventListener('touchend', this.onMouseDown);
55324
55391
  }
55325
55392
 
55326
55393
  this.element.addEventListener('mousedown', this.onMouseDown);
@@ -55342,6 +55409,7 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
55342
55409
  this.element.removeEventListener(cornerstoneTools.EVENTS.MPR_REFERENCE_LINE, this.onMPRProcessed);
55343
55410
  } else {
55344
55411
  this.element.removeEventListener('mouseup', this.onMouseUp);
55412
+ this.element.removeEventListener('touchend', this.onMouseDown);
55345
55413
  }
55346
55414
 
55347
55415
  this.element.removeEventListener(cornerstoneTools.EVENTS.STACK_SCROLL, this.onStackScroll);
@@ -55845,34 +55913,7 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
55845
55913
 
55846
55914
  if (timeSinceLastClick < 500) {
55847
55915
  var series = _this.props.series;
55848
- var selectEle = getElement(index);
55849
- var toolData = cornerstoneTools.getToolState(selectEle, 'ArrowAnnotate');
55850
- var active = false;
55851
-
55852
- if (toolData && toolData.data && toolData.data.length > 0) {
55853
- var _iterator = _createForOfIteratorHelper$c(toolData.data),
55854
- _step;
55855
-
55856
- try {
55857
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
55858
- var handler = _step.value;
55859
-
55860
- if (handler && handler.active) {
55861
- active = true;
55862
- return;
55863
- }
55864
- }
55865
- } catch (err) {
55866
- _iterator.e(err);
55867
- } finally {
55868
- _iterator.f();
55869
- }
55870
- }
55871
-
55872
- if (!active) {
55873
- _this.props.onViewPortDoubleClick && _this.props.onViewPortDoubleClick(index, series[index]);
55874
- }
55875
-
55916
+ _this.props.onViewPortDoubleClick && _this.props.onViewPortDoubleClick(index, series[index], true);
55876
55917
  _this.lastRightClickTime = 0;
55877
55918
  } else {
55878
55919
  _this.lastRightClickTime = currentTime;
@@ -55927,12 +55968,12 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
55927
55968
  var active = false;
55928
55969
 
55929
55970
  if (toolData && toolData.data && toolData.data.length > 0) {
55930
- var _iterator2 = _createForOfIteratorHelper$c(toolData.data),
55931
- _step2;
55971
+ var _iterator = _createForOfIteratorHelper$c(toolData.data),
55972
+ _step;
55932
55973
 
55933
55974
  try {
55934
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
55935
- var handler = _step2.value;
55975
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
55976
+ var handler = _step.value;
55936
55977
 
55937
55978
  if (handler && handler.active) {
55938
55979
  active = true;
@@ -55940,9 +55981,9 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
55940
55981
  }
55941
55982
  }
55942
55983
  } catch (err) {
55943
- _iterator2.e(err);
55984
+ _iterator.e(err);
55944
55985
  } finally {
55945
- _iterator2.f();
55986
+ _iterator.f();
55946
55987
  }
55947
55988
  }
55948
55989
 
@@ -56212,7 +56253,7 @@ var mergeProps$r = function mergeProps(propsFromState, propsFromDispatch, ownPro
56212
56253
  showVerticalScroll: showVerticalScroll,
56213
56254
  linkedIndexArr: linkSeriesIndex,
56214
56255
  showCustomScroll: !isMobile,
56215
- onViewPortDoubleClick: function onViewPortDoubleClick(index, series) {
56256
+ onViewPortDoubleClick: function onViewPortDoubleClick(index, series, ignoreLengthTool) {
56216
56257
  /** 双击
56217
56258
  * - 切换 自定义布局 or 1*1布局
56218
56259
  * - 移动端不响应
@@ -56223,7 +56264,7 @@ var mergeProps$r = function mergeProps(propsFromState, propsFromDispatch, ownPro
56223
56264
  return;
56224
56265
  }
56225
56266
 
56226
- if (lodash$1.includes(LengthTools, propsFromState.activeTool)) {
56267
+ if (lodash$1.includes(LengthTools, propsFromState.activeTool) && !ignoreLengthTool) {
56227
56268
  return;
56228
56269
  }
56229
56270