hellfire 0.29.11 → 0.29.13

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.29.13](http://10.16.100.57/diffusion/115/paladin/compare/v0.29.12...v0.29.13) (2025-05-29)
6
+
7
+
8
+
9
+ ## [0.29.12](http://10.16.100.57/diffusion/115/paladin/compare/v0.29.11...v0.29.12) (2025-05-14)
10
+
11
+
12
+
5
13
  ## [0.29.11](http://10.16.100.57/diffusion/115/paladin/compare/v0.29.10...v0.29.11) (2025-05-13)
6
14
 
7
15
 
package/dist/index.js CHANGED
@@ -12558,7 +12558,9 @@ var resources = {
12558
12558
  pan: 'Reset Pan',
12559
12559
  rotate: 'Reset Rotate',
12560
12560
  measurement: 'Reset Measurement',
12561
- all: 'Reset All'
12561
+ all: 'Reset All',
12562
+ title2: 'Clear',
12563
+ cache: 'Clear Cache'
12562
12564
  },
12563
12565
  cine: {
12564
12566
  title: 'Cine Settings',
@@ -12699,7 +12701,7 @@ var resources = {
12699
12701
  loading_image_message: '正在加载图像',
12700
12702
  loading_image_completed: '图像加载完毕',
12701
12703
  warning_message_position: '检测到该序列包含不同方位信息的图像,是否需要软件自动选择其中符合条件的进行重建?',
12702
- tool_crosshair: '定位线',
12704
+ tool_crosshair: '十字线',
12703
12705
  tool_crosshair_tooltip: '十字定位线',
12704
12706
  tool_direction: '视角',
12705
12707
  tool_direction_tooltip: '切换视角',
@@ -12764,7 +12766,9 @@ var resources = {
12764
12766
  pan: '重置移动',
12765
12767
  rotate: '重置旋转',
12766
12768
  measurement: '重置测量',
12767
- all: '重置所有'
12769
+ all: '重置所有',
12770
+ title2: '清理',
12771
+ cache: '清理缓存'
12768
12772
  },
12769
12773
  cine: {
12770
12774
  title: '设置播放参数',
@@ -29724,9 +29728,9 @@ function _ref() {
29724
29728
  newImageIdIndex = eventData.newImageIdIndex;
29725
29729
 
29726
29730
  if (targetImageLength > sourceImageLength) {
29727
- targetNewIndex = lodash$1.round(targetImageLength / sourceImageLength) * newImageIdIndex;
29731
+ targetNewIndex = lodash$1.round(targetImageLength / sourceImageLength * newImageIdIndex);
29728
29732
  } else {
29729
- targetNewIndex = lodash$1.floor(newImageIdIndex / lodash$1.round(sourceImageLength / targetImageLength));
29733
+ targetNewIndex = lodash$1.round(newImageIdIndex / (sourceImageLength / targetImageLength));
29730
29734
  }
29731
29735
 
29732
29736
  if (targetNewIndex < 0) {
@@ -40033,7 +40037,8 @@ var PopperBox = /*#__PURE__*/function (_Component) {
40033
40037
  ref: ref,
40034
40038
  style: _objectSpread$r(_objectSpread$r(_objectSpread$r({}, style), popperStyle), {}, {
40035
40039
  // zIndex: -1,
40036
- margin: popoverArrow ? '10px' : 0
40040
+ margin: popoverArrow ? '10px' : 0,
40041
+ zIndex: 99
40037
40042
  }),
40038
40043
  "data-placement": placement
40039
40044
  }, /*#__PURE__*/React__default.createElement(WrapperPopover, _extends_1({
@@ -40711,6 +40716,13 @@ var Reset = /*#__PURE__*/function (_Component) {
40711
40716
  text: getI18nMessage('vp_reset', 'all'),
40712
40717
  icon: /*#__PURE__*/React__default.createElement(SvgBanCircle, null)
40713
40718
  }]
40719
+ }, {
40720
+ title: getI18nMessage('vp_reset', 'title2'),
40721
+ children: [{
40722
+ key: 'cache',
40723
+ text: getI18nMessage('vp_reset', 'cache'),
40724
+ icon: /*#__PURE__*/React__default.createElement(SvgBanCircle, null)
40725
+ }]
40714
40726
  }];
40715
40727
  return /*#__PURE__*/React__default.createElement(ToolPopoverTemplate, _extends_1({}, this.props, {
40716
40728
  dataSource: dataSource
@@ -40788,6 +40800,15 @@ var mergeProps$9 = function mergeProps(propsFromState, propsFromDispatch, ownPro
40788
40800
 
40789
40801
  break;
40790
40802
 
40803
+ case 'cache':
40804
+ if (ownProps.onClearCache) {
40805
+ ownProps.onClearCache();
40806
+ } else {
40807
+ window.location.reload();
40808
+ }
40809
+
40810
+ break;
40811
+
40791
40812
  default:
40792
40813
  return;
40793
40814
  }
@@ -47784,6 +47805,9 @@ var DicomTool = /*#__PURE__*/function (_Component) {
47784
47805
  inActive: true,
47785
47806
  onClick: function onClick() {
47786
47807
  _this.props.reset();
47808
+ },
47809
+ customProps: {
47810
+ onClearCache: _this.props.onClearCache
47787
47811
  }
47788
47812
  },
47789
47813
  Rotate: {
@@ -48436,28 +48460,28 @@ function openAutoLink (_x) {
48436
48460
 
48437
48461
  function _ref$1q() {
48438
48462
  _ref$1q = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(props) {
48439
- var col, row, currentScrollLine, activeIndex, seriesCurrentIndex, series, setLinkSeries, linkSynchronizer, linkScrollSynchronizer, realActiveIndex, realSeriesIndex, _currentImageIdIndex, _currentSeries, currentImageId, currentDicom, currentPos, links, startIndex, endIndex, currentLayoutSeries, _series, i, seriesItem, imageId, dicom, comparePos, angle, activeElement;
48463
+ var col, row, currentScrollLine, activeIndex, seriesCurrentIndex, series, setLinkSeries, linkSynchronizer, linkScrollSynchronizer, realActiveIndex, realSeriesIndex, currentImageIdIndex, calcImageIdIndex, _currentSeries, currentImageId, currentDicom, currentPos, links, startIndex, endIndex, currentLayoutSeries, _series, i, seriesItem, imageId, dicom, comparePos, angle, activeElement, sourceStack, sourceImageLength;
48440
48464
 
48441
48465
  return regenerator.wrap(function _callee$(_context) {
48442
48466
  while (1) {
48443
48467
  switch (_context.prev = _context.next) {
48444
48468
  case 0:
48445
48469
  col = props.col, row = props.row, currentScrollLine = props.currentScrollLine, activeIndex = props.activeIndex, seriesCurrentIndex = props.seriesCurrentIndex, series = props.series, setLinkSeries = props.setLinkSeries, linkSynchronizer = props.linkSynchronizer, linkScrollSynchronizer = props.linkScrollSynchronizer, realActiveIndex = props.realActiveIndex;
48446
- realSeriesIndex = col * currentScrollLine + activeIndex; // const _currentImageIdIndex = seriesCurrentIndex[realSeriesIndex];
48447
-
48448
- _currentImageIdIndex = 0;
48470
+ realSeriesIndex = col * currentScrollLine + activeIndex;
48471
+ currentImageIdIndex = seriesCurrentIndex[realSeriesIndex];
48472
+ calcImageIdIndex = 0;
48449
48473
  _currentSeries = series[realSeriesIndex];
48450
- currentImageId = _currentSeries.imageIds[_currentImageIdIndex];
48451
- _context.next = 7;
48474
+ currentImageId = _currentSeries.imageIds[calcImageIdIndex];
48475
+ _context.next = 8;
48452
48476
  return loadAndCacheDicom(currentImageId);
48453
48477
 
48454
- case 7:
48478
+ case 8:
48455
48479
  currentDicom = _context.sent;
48456
48480
  currentPos = getPosFromDicom(currentDicom);
48457
48481
  links = [];
48458
48482
 
48459
48483
  if (!currentPos) {
48460
- _context.next = 28;
48484
+ _context.next = 29;
48461
48485
  break;
48462
48486
  }
48463
48487
 
@@ -48468,24 +48492,24 @@ function _ref$1q() {
48468
48492
  _series = lodash$1.cloneDeep(currentLayoutSeries);
48469
48493
  i = 0;
48470
48494
 
48471
- case 16:
48495
+ case 17:
48472
48496
  if (!(i < _series.length)) {
48473
- _context.next = 28;
48497
+ _context.next = 29;
48474
48498
  break;
48475
48499
  }
48476
48500
 
48477
48501
  seriesItem = _series[i]; // (seriesItem.numberOfSeriesRelatedInstances === _currentSeries.numberOfSeriesRelatedInstances)
48478
48502
 
48479
48503
  if (!(seriesItem.seriesInstanceUID !== _currentSeries.seriesInstanceUID)) {
48480
- _context.next = 25;
48504
+ _context.next = 26;
48481
48505
  break;
48482
48506
  }
48483
48507
 
48484
- imageId = seriesItem.imageIds[_currentImageIdIndex];
48485
- _context.next = 22;
48508
+ imageId = seriesItem.imageIds[calcImageIdIndex];
48509
+ _context.next = 23;
48486
48510
  return loadAndCacheDicom(imageId);
48487
48511
 
48488
- case 22:
48512
+ case 23:
48489
48513
  dicom = _context.sent;
48490
48514
  comparePos = getPosFromDicom(dicom);
48491
48515
 
@@ -48497,20 +48521,25 @@ function _ref$1q() {
48497
48521
  }
48498
48522
  }
48499
48523
 
48500
- case 25:
48524
+ case 26:
48501
48525
  i++;
48502
- _context.next = 16;
48526
+ _context.next = 17;
48503
48527
  break;
48504
48528
 
48505
- case 28:
48529
+ case 29:
48530
+ activeElement = getElement(realActiveIndex);
48531
+
48506
48532
  if (links && links.length > 0) {
48533
+ sourceStack = cornerstoneTools.getToolState(activeElement, 'stack');
48534
+ sourceImageLength = sourceStack.data[0].numberOfSeriesRelatedInstances;
48507
48535
  lodash$1.forEach(links, function (link) {
48508
- scrollToIndex$3(getElement(link), _currentImageIdIndex);
48536
+ var targetElement = getElement(link);
48537
+ var nextIndex = calcTargetIndex(sourceImageLength, targetElement, currentImageIdIndex);
48538
+ scrollToIndex$3(targetElement, nextIndex || 0);
48509
48539
  });
48510
48540
  }
48511
48541
 
48512
48542
  setLinkSeries(links);
48513
- activeElement = getElement(realActiveIndex);
48514
48543
 
48515
48544
  if (links && links.length > 0) {
48516
48545
  lodash$1.forEach(links, function (link) {
@@ -48521,7 +48550,7 @@ function _ref$1q() {
48521
48550
  linkScrollSynchronizer.add(activeElement);
48522
48551
  }
48523
48552
 
48524
- case 32:
48553
+ case 33:
48525
48554
  case "end":
48526
48555
  return _context.stop();
48527
48556
  }
@@ -48531,6 +48560,34 @@ function _ref$1q() {
48531
48560
  return _ref$1q.apply(this, arguments);
48532
48561
  }
48533
48562
 
48563
+ function calcTargetIndex(sourceImageLength, targetElement, currentImageIdIndex) {
48564
+ var targetStack = cornerstoneTools.getToolState(targetElement, 'stack');
48565
+ var targetImageLength = targetStack.data[0].numberOfSeriesRelatedInstances;
48566
+
48567
+ if (sourceImageLength === targetImageLength) {
48568
+ return currentImageIdIndex;
48569
+ } else {
48570
+ // 序列图像张数不同 按比例
48571
+ var targetNewIndex;
48572
+
48573
+ if (targetImageLength > sourceImageLength) {
48574
+ targetNewIndex = lodash$1.round(targetImageLength / sourceImageLength * currentImageIdIndex);
48575
+ } else {
48576
+ targetNewIndex = lodash$1.round(currentImageIdIndex / (sourceImageLength / targetImageLength));
48577
+ }
48578
+
48579
+ if (targetNewIndex < 0) {
48580
+ targetNewIndex = 0;
48581
+ }
48582
+
48583
+ if (targetNewIndex > targetImageLength - 1) {
48584
+ targetNewIndex = targetImageLength - 1;
48585
+ }
48586
+
48587
+ return targetNewIndex;
48588
+ }
48589
+ }
48590
+
48534
48591
  var css_248z$u = ".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";
48535
48592
  styleInject$1(css_248z$u);
48536
48593
 
@@ -54134,12 +54191,24 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54134
54191
  }, {
54135
54192
  key: "onNewImage",
54136
54193
  value: function onNewImage() {
54137
- // 展示新的image时先去viewport缓存池中找有没有已存的viewport
54194
+ // 更新series current index(联动、同步的情况下,需要这边触发更新)
54195
+ var currentImageIdIndex = this.state.stack ? this.state.stack.currentImageIdIndex : 0;
54196
+
54197
+ if (this.props.mode === 'seriesMode' && !this.props.mpr) {
54198
+ var _this$props6 = this.props,
54199
+ col = _this$props6.col,
54200
+ currentScrollLine = _this$props6.currentScrollLine,
54201
+ index = _this$props6.index,
54202
+ setSeriesCurrentIndex = _this$props6.setSeriesCurrentIndex;
54203
+ var currentSeriesIndex = col * currentScrollLine + index;
54204
+ setSeriesCurrentIndex(currentSeriesIndex, currentImageIdIndex);
54205
+ } // 展示新的image时先去viewport缓存池中找有没有已存的viewport
54206
+
54207
+
54138
54208
  if (!this.props.getCacheViewport) {
54139
54209
  return;
54140
54210
  }
54141
54211
 
54142
- var currentImageIdIndex = this.state.stack ? this.state.stack.currentImageIdIndex : 0;
54143
54212
  var key = this.props.mpr || this.props.index;
54144
54213
  var initViewport = this.props.getCacheViewport(key, currentImageIdIndex);
54145
54214
  /**
@@ -54257,9 +54326,9 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54257
54326
 
54258
54327
  e.stopPropagation();
54259
54328
  checkAndUnLockToolState(e, this.element);
54260
- var _this$props6 = this.props,
54261
- onViewportMouseDown = _this$props6.onViewportMouseDown,
54262
- mpr = _this$props6.mpr;
54329
+ var _this$props7 = this.props,
54330
+ onViewportMouseDown = _this$props7.onViewportMouseDown,
54331
+ mpr = _this$props7.mpr;
54263
54332
  onViewportMouseDown && onViewportMouseDown(e, this.state.stack.seriesInstanceUID);
54264
54333
  var activeDataTool = this.checkToolDataActive();
54265
54334
 
@@ -54282,10 +54351,10 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54282
54351
  var isMobile = ua.isDeviceTypeMobile();
54283
54352
 
54284
54353
  if (isMobile) {
54285
- var _this$props7 = this.props,
54286
- activeTool = _this$props7.activeTool,
54287
- originActiveTool = _this$props7.originActiveTool,
54288
- setActiveTool = _this$props7.setActiveTool;
54354
+ var _this$props8 = this.props,
54355
+ activeTool = _this$props8.activeTool,
54356
+ originActiveTool = _this$props8.originActiveTool,
54357
+ setActiveTool = _this$props8.setActiveTool;
54289
54358
 
54290
54359
  if (lodash$1.includes(LengthToolsWithMeasure, activeTool)) {
54291
54360
  var toolData = cornerstoneTools.getToolState(this.element, activeTool);
@@ -54643,9 +54712,9 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54643
54712
  }, {
54644
54713
  key: "changeReferenceLineType",
54645
54714
  value: function changeReferenceLineType(type) {
54646
- var _this$props8 = this.props,
54647
- ReferencePosition = _this$props8.ReferencePosition,
54648
- synchronizer = _this$props8.synchronizer;
54715
+ var _this$props9 = this.props,
54716
+ ReferencePosition = _this$props9.ReferencePosition,
54717
+ synchronizer = _this$props9.synchronizer;
54649
54718
 
54650
54719
  if (ReferencePosition) {
54651
54720
  cornerstoneTools.setToolDisabledForElement(this.element, 'ReferenceLines', {
@@ -54662,10 +54731,10 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54662
54731
  }, {
54663
54732
  key: "addElementReferenceLines",
54664
54733
  value: function addElementReferenceLines(type) {
54665
- var _this$props9 = this.props,
54666
- synchronizer = _this$props9.synchronizer,
54667
- activeIndex = _this$props9.activeIndex,
54668
- index = _this$props9.index;
54734
+ var _this$props10 = this.props,
54735
+ synchronizer = _this$props10.synchronizer,
54736
+ activeIndex = _this$props10.activeIndex,
54737
+ index = _this$props10.index;
54669
54738
  var active = activeIndex === index;
54670
54739
 
54671
54740
  if (active) {
@@ -54698,10 +54767,10 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54698
54767
  }, {
54699
54768
  key: "addElementReferencePosition",
54700
54769
  value: function addElementReferencePosition() {
54701
- var _this$props10 = this.props,
54702
- positionSynchronizer = _this$props10.positionSynchronizer,
54703
- activeIndex = _this$props10.activeIndex,
54704
- index = _this$props10.index;
54770
+ var _this$props11 = this.props,
54771
+ positionSynchronizer = _this$props11.positionSynchronizer,
54772
+ activeIndex = _this$props11.activeIndex,
54773
+ index = _this$props11.index;
54705
54774
  var stack = this.state.stack;
54706
54775
  var active = activeIndex === index;
54707
54776
 
@@ -73297,7 +73366,8 @@ var DicomView = /*#__PURE__*/function (_Component) {
73297
73366
  setCustomWindowLayoutType: this.setCustomWindowLayoutType,
73298
73367
  operateKeyImages: this.props.operateKeyImages,
73299
73368
  dicomSettingChange: this.props.dicomSettingChange,
73300
- allowFilmPrint: this.props.allowFilmPrint
73369
+ allowFilmPrint: this.props.allowFilmPrint,
73370
+ onClearCache: this.props.onClearCache
73301
73371
  }));
73302
73372
  var FilmTool = /*#__PURE__*/React__default.createElement("div", {
73303
73373
  className: "paladin-dicomView-dicomToolWrapper"