hellfire 0.29.11 → 0.29.12

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.29.12](http://10.16.100.57/diffusion/115/paladin/compare/v0.29.11...v0.29.12) (2025-05-14)
6
+
7
+
8
+
5
9
  ## [0.29.11](http://10.16.100.57/diffusion/115/paladin/compare/v0.29.10...v0.29.11) (2025-05-13)
6
10
 
7
11
 
package/dist/index.js CHANGED
@@ -29724,9 +29724,9 @@ function _ref() {
29724
29724
  newImageIdIndex = eventData.newImageIdIndex;
29725
29725
 
29726
29726
  if (targetImageLength > sourceImageLength) {
29727
- targetNewIndex = lodash$1.round(targetImageLength / sourceImageLength) * newImageIdIndex;
29727
+ targetNewIndex = lodash$1.round(targetImageLength / sourceImageLength * newImageIdIndex);
29728
29728
  } else {
29729
- targetNewIndex = lodash$1.floor(newImageIdIndex / lodash$1.round(sourceImageLength / targetImageLength));
29729
+ targetNewIndex = lodash$1.round(newImageIdIndex / (sourceImageLength / targetImageLength));
29730
29730
  }
29731
29731
 
29732
29732
  if (targetNewIndex < 0) {
@@ -40033,7 +40033,8 @@ var PopperBox = /*#__PURE__*/function (_Component) {
40033
40033
  ref: ref,
40034
40034
  style: _objectSpread$r(_objectSpread$r(_objectSpread$r({}, style), popperStyle), {}, {
40035
40035
  // zIndex: -1,
40036
- margin: popoverArrow ? '10px' : 0
40036
+ margin: popoverArrow ? '10px' : 0,
40037
+ zIndex: 99
40037
40038
  }),
40038
40039
  "data-placement": placement
40039
40040
  }, /*#__PURE__*/React__default.createElement(WrapperPopover, _extends_1({
@@ -48436,28 +48437,28 @@ function openAutoLink (_x) {
48436
48437
 
48437
48438
  function _ref$1q() {
48438
48439
  _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;
48440
+ 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
48441
 
48441
48442
  return regenerator.wrap(function _callee$(_context) {
48442
48443
  while (1) {
48443
48444
  switch (_context.prev = _context.next) {
48444
48445
  case 0:
48445
48446
  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;
48447
+ realSeriesIndex = col * currentScrollLine + activeIndex;
48448
+ currentImageIdIndex = seriesCurrentIndex[realSeriesIndex];
48449
+ calcImageIdIndex = 0;
48449
48450
  _currentSeries = series[realSeriesIndex];
48450
- currentImageId = _currentSeries.imageIds[_currentImageIdIndex];
48451
- _context.next = 7;
48451
+ currentImageId = _currentSeries.imageIds[calcImageIdIndex];
48452
+ _context.next = 8;
48452
48453
  return loadAndCacheDicom(currentImageId);
48453
48454
 
48454
- case 7:
48455
+ case 8:
48455
48456
  currentDicom = _context.sent;
48456
48457
  currentPos = getPosFromDicom(currentDicom);
48457
48458
  links = [];
48458
48459
 
48459
48460
  if (!currentPos) {
48460
- _context.next = 28;
48461
+ _context.next = 29;
48461
48462
  break;
48462
48463
  }
48463
48464
 
@@ -48468,24 +48469,24 @@ function _ref$1q() {
48468
48469
  _series = lodash$1.cloneDeep(currentLayoutSeries);
48469
48470
  i = 0;
48470
48471
 
48471
- case 16:
48472
+ case 17:
48472
48473
  if (!(i < _series.length)) {
48473
- _context.next = 28;
48474
+ _context.next = 29;
48474
48475
  break;
48475
48476
  }
48476
48477
 
48477
48478
  seriesItem = _series[i]; // (seriesItem.numberOfSeriesRelatedInstances === _currentSeries.numberOfSeriesRelatedInstances)
48478
48479
 
48479
48480
  if (!(seriesItem.seriesInstanceUID !== _currentSeries.seriesInstanceUID)) {
48480
- _context.next = 25;
48481
+ _context.next = 26;
48481
48482
  break;
48482
48483
  }
48483
48484
 
48484
- imageId = seriesItem.imageIds[_currentImageIdIndex];
48485
- _context.next = 22;
48485
+ imageId = seriesItem.imageIds[calcImageIdIndex];
48486
+ _context.next = 23;
48486
48487
  return loadAndCacheDicom(imageId);
48487
48488
 
48488
- case 22:
48489
+ case 23:
48489
48490
  dicom = _context.sent;
48490
48491
  comparePos = getPosFromDicom(dicom);
48491
48492
 
@@ -48497,20 +48498,25 @@ function _ref$1q() {
48497
48498
  }
48498
48499
  }
48499
48500
 
48500
- case 25:
48501
+ case 26:
48501
48502
  i++;
48502
- _context.next = 16;
48503
+ _context.next = 17;
48503
48504
  break;
48504
48505
 
48505
- case 28:
48506
+ case 29:
48507
+ activeElement = getElement(realActiveIndex);
48508
+
48506
48509
  if (links && links.length > 0) {
48510
+ sourceStack = cornerstoneTools.getToolState(activeElement, 'stack');
48511
+ sourceImageLength = sourceStack.data[0].numberOfSeriesRelatedInstances;
48507
48512
  lodash$1.forEach(links, function (link) {
48508
- scrollToIndex$3(getElement(link), _currentImageIdIndex);
48513
+ var targetElement = getElement(link);
48514
+ var nextIndex = calcTargetIndex(sourceImageLength, targetElement, currentImageIdIndex);
48515
+ scrollToIndex$3(targetElement, nextIndex || 0);
48509
48516
  });
48510
48517
  }
48511
48518
 
48512
48519
  setLinkSeries(links);
48513
- activeElement = getElement(realActiveIndex);
48514
48520
 
48515
48521
  if (links && links.length > 0) {
48516
48522
  lodash$1.forEach(links, function (link) {
@@ -48521,7 +48527,7 @@ function _ref$1q() {
48521
48527
  linkScrollSynchronizer.add(activeElement);
48522
48528
  }
48523
48529
 
48524
- case 32:
48530
+ case 33:
48525
48531
  case "end":
48526
48532
  return _context.stop();
48527
48533
  }
@@ -48531,6 +48537,34 @@ function _ref$1q() {
48531
48537
  return _ref$1q.apply(this, arguments);
48532
48538
  }
48533
48539
 
48540
+ function calcTargetIndex(sourceImageLength, targetElement, currentImageIdIndex) {
48541
+ var targetStack = cornerstoneTools.getToolState(targetElement, 'stack');
48542
+ var targetImageLength = targetStack.data[0].numberOfSeriesRelatedInstances;
48543
+
48544
+ if (sourceImageLength === targetImageLength) {
48545
+ return currentImageIdIndex;
48546
+ } else {
48547
+ // 序列图像张数不同 按比例
48548
+ var targetNewIndex;
48549
+
48550
+ if (targetImageLength > sourceImageLength) {
48551
+ targetNewIndex = lodash$1.round(targetImageLength / sourceImageLength * currentImageIdIndex);
48552
+ } else {
48553
+ targetNewIndex = lodash$1.round(currentImageIdIndex / (sourceImageLength / targetImageLength));
48554
+ }
48555
+
48556
+ if (targetNewIndex < 0) {
48557
+ targetNewIndex = 0;
48558
+ }
48559
+
48560
+ if (targetNewIndex > targetImageLength - 1) {
48561
+ targetNewIndex = targetImageLength - 1;
48562
+ }
48563
+
48564
+ return targetNewIndex;
48565
+ }
48566
+ }
48567
+
48534
48568
  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
48569
  styleInject$1(css_248z$u);
48536
48570
 
@@ -54134,12 +54168,24 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54134
54168
  }, {
54135
54169
  key: "onNewImage",
54136
54170
  value: function onNewImage() {
54137
- // 展示新的image时先去viewport缓存池中找有没有已存的viewport
54171
+ // 更新series current index(联动、同步的情况下,需要这边触发更新)
54172
+ var currentImageIdIndex = this.state.stack ? this.state.stack.currentImageIdIndex : 0;
54173
+
54174
+ if (this.props.mode === 'seriesMode' && !this.props.mpr) {
54175
+ var _this$props6 = this.props,
54176
+ col = _this$props6.col,
54177
+ currentScrollLine = _this$props6.currentScrollLine,
54178
+ index = _this$props6.index,
54179
+ setSeriesCurrentIndex = _this$props6.setSeriesCurrentIndex;
54180
+ var currentSeriesIndex = col * currentScrollLine + index;
54181
+ setSeriesCurrentIndex(currentSeriesIndex, currentImageIdIndex);
54182
+ } // 展示新的image时先去viewport缓存池中找有没有已存的viewport
54183
+
54184
+
54138
54185
  if (!this.props.getCacheViewport) {
54139
54186
  return;
54140
54187
  }
54141
54188
 
54142
- var currentImageIdIndex = this.state.stack ? this.state.stack.currentImageIdIndex : 0;
54143
54189
  var key = this.props.mpr || this.props.index;
54144
54190
  var initViewport = this.props.getCacheViewport(key, currentImageIdIndex);
54145
54191
  /**
@@ -54257,9 +54303,9 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54257
54303
 
54258
54304
  e.stopPropagation();
54259
54305
  checkAndUnLockToolState(e, this.element);
54260
- var _this$props6 = this.props,
54261
- onViewportMouseDown = _this$props6.onViewportMouseDown,
54262
- mpr = _this$props6.mpr;
54306
+ var _this$props7 = this.props,
54307
+ onViewportMouseDown = _this$props7.onViewportMouseDown,
54308
+ mpr = _this$props7.mpr;
54263
54309
  onViewportMouseDown && onViewportMouseDown(e, this.state.stack.seriesInstanceUID);
54264
54310
  var activeDataTool = this.checkToolDataActive();
54265
54311
 
@@ -54282,10 +54328,10 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54282
54328
  var isMobile = ua.isDeviceTypeMobile();
54283
54329
 
54284
54330
  if (isMobile) {
54285
- var _this$props7 = this.props,
54286
- activeTool = _this$props7.activeTool,
54287
- originActiveTool = _this$props7.originActiveTool,
54288
- setActiveTool = _this$props7.setActiveTool;
54331
+ var _this$props8 = this.props,
54332
+ activeTool = _this$props8.activeTool,
54333
+ originActiveTool = _this$props8.originActiveTool,
54334
+ setActiveTool = _this$props8.setActiveTool;
54289
54335
 
54290
54336
  if (lodash$1.includes(LengthToolsWithMeasure, activeTool)) {
54291
54337
  var toolData = cornerstoneTools.getToolState(this.element, activeTool);
@@ -54643,9 +54689,9 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54643
54689
  }, {
54644
54690
  key: "changeReferenceLineType",
54645
54691
  value: function changeReferenceLineType(type) {
54646
- var _this$props8 = this.props,
54647
- ReferencePosition = _this$props8.ReferencePosition,
54648
- synchronizer = _this$props8.synchronizer;
54692
+ var _this$props9 = this.props,
54693
+ ReferencePosition = _this$props9.ReferencePosition,
54694
+ synchronizer = _this$props9.synchronizer;
54649
54695
 
54650
54696
  if (ReferencePosition) {
54651
54697
  cornerstoneTools.setToolDisabledForElement(this.element, 'ReferenceLines', {
@@ -54662,10 +54708,10 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54662
54708
  }, {
54663
54709
  key: "addElementReferenceLines",
54664
54710
  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;
54711
+ var _this$props10 = this.props,
54712
+ synchronizer = _this$props10.synchronizer,
54713
+ activeIndex = _this$props10.activeIndex,
54714
+ index = _this$props10.index;
54669
54715
  var active = activeIndex === index;
54670
54716
 
54671
54717
  if (active) {
@@ -54698,10 +54744,10 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
54698
54744
  }, {
54699
54745
  key: "addElementReferencePosition",
54700
54746
  value: function addElementReferencePosition() {
54701
- var _this$props10 = this.props,
54702
- positionSynchronizer = _this$props10.positionSynchronizer,
54703
- activeIndex = _this$props10.activeIndex,
54704
- index = _this$props10.index;
54747
+ var _this$props11 = this.props,
54748
+ positionSynchronizer = _this$props11.positionSynchronizer,
54749
+ activeIndex = _this$props11.activeIndex,
54750
+ index = _this$props11.index;
54705
54751
  var stack = this.state.stack;
54706
54752
  var active = activeIndex === index;
54707
54753