hellfire 0.30.4 → 0.30.5

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.30.5](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.4...v0.30.5) (2025-07-29)
6
+
7
+
8
+
5
9
  ## [0.30.4](http://10.16.100.57/diffusion/115/paladin/compare/v0.30.3...v0.30.4) (2025-07-28)
6
10
 
7
11
 
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;
@@ -49358,7 +49368,7 @@ function calcTargetIndex(sourceImageLength, targetElement, currentImageIdIndex)
49358
49368
  }
49359
49369
  }
49360
49370
 
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";
49371
+ 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
49372
  styleInject$1(css_248z$v);
49363
49373
 
49364
49374
  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 +49405,15 @@ var UserSettingModal = /*#__PURE__*/function (_Component) {
49395
49405
  _this = _super.call(this, props);
49396
49406
 
49397
49407
  defineProperty(assertThisInitialized(_this), "handleSave", function () {
49408
+ if (!_this.state.cacheMaxSize || _this.state.cacheMaxSize < 0.5 || _this.state.cacheMaxSize > 2) {
49409
+ message.error('缓存大小范围为 0.5 ~ 2G');
49410
+ return;
49411
+ }
49412
+
49398
49413
  var dicomSettingChange = _this.props.dicomSettingChange;
49399
49414
  window.localStorage.setItem('hellfire-hotkey-open', _this.state.hotKeyIsOpen);
49400
49415
  window.localStorage.setItem('hellfire-dicom-basic-info-from', _this.state.dicomBasicInfoFrom);
49416
+ window.localStorage.setItem('hellfire-image-cache-max-size', _this.state.cacheMaxSize);
49401
49417
 
49402
49418
  if (dicomSettingChange) {
49403
49419
  dicomSettingChange && dicomSettingChange({
@@ -49428,7 +49444,8 @@ var UserSettingModal = /*#__PURE__*/function (_Component) {
49428
49444
  rightMouseTool = _this$state.rightMouseTool,
49429
49445
  middleMouseTool = _this$state.middleMouseTool,
49430
49446
  hotKeyIsOpen = _this$state.hotKeyIsOpen,
49431
- dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom;
49447
+ dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom,
49448
+ cacheMaxSize = _this$state.cacheMaxSize;
49432
49449
  var close = this.props.close;
49433
49450
  return /*#__PURE__*/React__default.createElement("div", {
49434
49451
  className: 'paladin-user-setting'
@@ -49554,7 +49571,27 @@ var UserSettingModal = /*#__PURE__*/function (_Component) {
49554
49571
  className: 'paladin-setting-hotkey-item',
49555
49572
  key: "setting-hotkey-".concat(index)
49556
49573
  }, value.label, "(", value.hotkey, ")");
49557
- })), /*#__PURE__*/React__default.createElement("div", {
49574
+ })), /*#__PURE__*/React__default.createElement("p", {
49575
+ style: {
49576
+ marginTop: '30px'
49577
+ }
49578
+ }, /*#__PURE__*/React__default.createElement(SvgCertificate, null), "\u7F13\u5B58\u5927\u5C0F\u8BBE\u7F6E\uFF1A"), /*#__PURE__*/React__default.createElement("div", {
49579
+ className: 'paladin-setting-cache'
49580
+ }, /*#__PURE__*/React__default.createElement(Input$1, {
49581
+ type: "number",
49582
+ value: cacheMaxSize,
49583
+ min: 0,
49584
+ max: 2,
49585
+ onChange: function onChange(e) {
49586
+ _this2.setState({
49587
+ cacheMaxSize: e.target.value
49588
+ });
49589
+ }
49590
+ }), /*#__PURE__*/React__default.createElement("span", {
49591
+ className: 'paladin-setting-cache-unit'
49592
+ }, " G")), /*#__PURE__*/React__default.createElement("div", {
49593
+ className: 'paladin-setting-cache-info'
49594
+ }, "\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
49595
  className: 'paladin-user-setting-remark'
49559
49596
  }, "\u6CE8\uFF1A\u4FDD\u5B58\u540E\u4F1A\u81EA\u52A8\u5237\u65B0\u9875\u9762"), /*#__PURE__*/React__default.createElement("div", {
49560
49597
  className: 'paladin-user-setting-footer'
@@ -49852,9 +49889,15 @@ var UserSettingModalEn = /*#__PURE__*/function (_Component) {
49852
49889
  _this = _super.call(this, props);
49853
49890
 
49854
49891
  defineProperty(assertThisInitialized(_this), "handleSave", function () {
49892
+ if (!_this.state.cacheMaxSize || _this.state.cacheMaxSize < 0.5 || _this.state.cacheMaxSize > 2) {
49893
+ message.error('Size Range in 0.5 ~ 2G');
49894
+ return;
49895
+ }
49896
+
49855
49897
  var dicomSettingChange = _this.props.dicomSettingChange;
49856
49898
  window.localStorage.setItem('hellfire-hotkey-open', _this.state.hotKeyIsOpen);
49857
49899
  window.localStorage.setItem('hellfire-dicom-basic-info-from', _this.state.dicomBasicInfoFrom);
49900
+ window.localStorage.setItem('hellfire-image-cache-max-size', _this.state.cacheMaxSize);
49858
49901
 
49859
49902
  if (dicomSettingChange) {
49860
49903
  dicomSettingChange && dicomSettingChange({
@@ -49885,7 +49928,8 @@ var UserSettingModalEn = /*#__PURE__*/function (_Component) {
49885
49928
  rightMouseTool = _this$state.rightMouseTool,
49886
49929
  middleMouseTool = _this$state.middleMouseTool,
49887
49930
  hotKeyIsOpen = _this$state.hotKeyIsOpen,
49888
- dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom;
49931
+ dicomBasicInfoFrom = _this$state.dicomBasicInfoFrom,
49932
+ cacheMaxSize = _this$state.cacheMaxSize;
49889
49933
  var close = this.props.close;
49890
49934
  return /*#__PURE__*/React__default.createElement("div", {
49891
49935
  className: 'paladin-user-setting'
@@ -50011,7 +50055,27 @@ var UserSettingModalEn = /*#__PURE__*/function (_Component) {
50011
50055
  className: 'paladin-setting-hotkey-item',
50012
50056
  key: "setting-hotkey-".concat(index)
50013
50057
  }, value.label_en, "(", value.hotkey, ")");
50014
- })), /*#__PURE__*/React__default.createElement("div", {
50058
+ })), /*#__PURE__*/React__default.createElement("p", {
50059
+ style: {
50060
+ marginTop: '30px'
50061
+ }
50062
+ }, /*#__PURE__*/React__default.createElement(SvgCertificate, null), "Cache Max Size\uFF1A"), /*#__PURE__*/React__default.createElement("div", {
50063
+ className: 'paladin-setting-cache'
50064
+ }, /*#__PURE__*/React__default.createElement(Input$1, {
50065
+ type: "number",
50066
+ value: cacheMaxSize,
50067
+ min: 0,
50068
+ max: 2,
50069
+ onChange: function onChange(e) {
50070
+ _this2.setState({
50071
+ cacheMaxSize: e.target.value
50072
+ });
50073
+ }
50074
+ }), /*#__PURE__*/React__default.createElement("span", {
50075
+ className: 'paladin-setting-cache-unit'
50076
+ }, " G")), /*#__PURE__*/React__default.createElement("div", {
50077
+ className: 'paladin-setting-cache-info'
50078
+ }, "Device Memory 16G Recommend Setting 2G\uFF1B8G Recommend Setting 1G\uFF1B4G Recommend Setting 0.5G"), /*#__PURE__*/React__default.createElement("div", {
50015
50079
  className: 'paladin-user-setting-remark'
50016
50080
  }, "Note: The page will refresh automatically after saving."), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Button, {
50017
50081
  onClick: this.props.toggleFilmPrinterEntrance
@@ -55845,34 +55909,7 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
55845
55909
 
55846
55910
  if (timeSinceLastClick < 500) {
55847
55911
  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
-
55912
+ _this.props.onViewPortDoubleClick && _this.props.onViewPortDoubleClick(index, series[index], true);
55876
55913
  _this.lastRightClickTime = 0;
55877
55914
  } else {
55878
55915
  _this.lastRightClickTime = currentTime;
@@ -55927,12 +55964,12 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
55927
55964
  var active = false;
55928
55965
 
55929
55966
  if (toolData && toolData.data && toolData.data.length > 0) {
55930
- var _iterator2 = _createForOfIteratorHelper$c(toolData.data),
55931
- _step2;
55967
+ var _iterator = _createForOfIteratorHelper$c(toolData.data),
55968
+ _step;
55932
55969
 
55933
55970
  try {
55934
- for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
55935
- var handler = _step2.value;
55971
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
55972
+ var handler = _step.value;
55936
55973
 
55937
55974
  if (handler && handler.active) {
55938
55975
  active = true;
@@ -55940,9 +55977,9 @@ var DicomLayout = /*#__PURE__*/function (_Component) {
55940
55977
  }
55941
55978
  }
55942
55979
  } catch (err) {
55943
- _iterator2.e(err);
55980
+ _iterator.e(err);
55944
55981
  } finally {
55945
- _iterator2.f();
55982
+ _iterator.f();
55946
55983
  }
55947
55984
  }
55948
55985
 
@@ -56212,7 +56249,7 @@ var mergeProps$r = function mergeProps(propsFromState, propsFromDispatch, ownPro
56212
56249
  showVerticalScroll: showVerticalScroll,
56213
56250
  linkedIndexArr: linkSeriesIndex,
56214
56251
  showCustomScroll: !isMobile,
56215
- onViewPortDoubleClick: function onViewPortDoubleClick(index, series) {
56252
+ onViewPortDoubleClick: function onViewPortDoubleClick(index, series, ignoreLengthTool) {
56216
56253
  /** 双击
56217
56254
  * - 切换 自定义布局 or 1*1布局
56218
56255
  * - 移动端不响应
@@ -56223,7 +56260,7 @@ var mergeProps$r = function mergeProps(propsFromState, propsFromDispatch, ownPro
56223
56260
  return;
56224
56261
  }
56225
56262
 
56226
- if (lodash$1.includes(LengthTools, propsFromState.activeTool)) {
56263
+ if (lodash$1.includes(LengthTools, propsFromState.activeTool) && !ignoreLengthTool) {
56227
56264
  return;
56228
56265
  }
56229
56266