hellfire 0.29.0 → 0.29.1

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.1](http://10.16.100.57/diffusion/115/paladin/compare/v0.29.0...v0.29.1) (2025-03-13)
6
+
7
+
8
+
5
9
  # [0.29.0](http://10.16.100.57/diffusion/115/paladin/compare/v0.28.20...v0.29.0) (2025-03-10)
6
10
 
7
11
 
package/dist/index.js CHANGED
@@ -50157,6 +50157,23 @@ var formatDicomInfo = function formatDicomInfo(label, value) {
50157
50157
  return formated ? "".concat(label, ": ").concat(formated) : '';
50158
50158
  };
50159
50159
 
50160
+ var formatDRDXInfo = function formatDRDXInfo(label, value) {
50161
+ var text = '';
50162
+
50163
+ if (!value) {
50164
+ return text;
50165
+ }
50166
+
50167
+ var _v = Number(value);
50168
+
50169
+ if (!_v) {
50170
+ return text;
50171
+ }
50172
+
50173
+ text = formatNumberPrecision(value, 1);
50174
+ return "".concat(label, ": ").concat(text);
50175
+ };
50176
+
50160
50177
  var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50161
50178
  inherits(ViewportOverlay, _PureComponent);
50162
50179
 
@@ -50173,11 +50190,17 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50173
50190
  var _this$state = _this.state,
50174
50191
  dicom = _this$state.dicom,
50175
50192
  basicInfoFrom = _this$state.basicInfoFrom;
50176
- var basicInfoFromStudy = _this.props.basicInfoFromStudy;
50193
+ var _this$props = _this.props,
50194
+ basicInfoFromStudy = _this$props.basicInfoFromStudy,
50195
+ originDicomInfo = _this$props.originDicomInfo;
50177
50196
 
50178
50197
  if (basicInfoFrom && basicInfoFrom === 'study' && basicInfoFromStudy && basicInfoFromStudy.name) {
50179
50198
  return basicInfoFromStudy.name;
50180
50199
  } else {
50200
+ if (originDicomInfo) {
50201
+ return originDicomInfo.PatientName.toString();
50202
+ }
50203
+
50181
50204
  return dicom.PatientName.toString();
50182
50205
  }
50183
50206
  });
@@ -50186,11 +50209,17 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50186
50209
  var _this$state2 = _this.state,
50187
50210
  dicom = _this$state2.dicom,
50188
50211
  basicInfoFrom = _this$state2.basicInfoFrom;
50189
- var basicInfoFromStudy = _this.props.basicInfoFromStudy;
50212
+ var _this$props2 = _this.props,
50213
+ basicInfoFromStudy = _this$props2.basicInfoFromStudy,
50214
+ originDicomInfo = _this$props2.originDicomInfo;
50190
50215
 
50191
50216
  if (basicInfoFrom && basicInfoFrom === 'study' && basicInfoFromStudy && basicInfoFromStudy.patientSex) {
50192
50217
  return basicInfoFromStudy.patientSex;
50193
50218
  } else {
50219
+ if (originDicomInfo) {
50220
+ return originDicomInfo.PatientSex.toString();
50221
+ }
50222
+
50194
50223
  return dicom.PatientSex.toString();
50195
50224
  }
50196
50225
  });
@@ -50199,11 +50228,17 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50199
50228
  var _this$state3 = _this.state,
50200
50229
  dicom = _this$state3.dicom,
50201
50230
  basicInfoFrom = _this$state3.basicInfoFrom;
50202
- var basicInfoFromStudy = _this.props.basicInfoFromStudy;
50231
+ var _this$props3 = _this.props,
50232
+ basicInfoFromStudy = _this$props3.basicInfoFromStudy,
50233
+ originDicomInfo = _this$props3.originDicomInfo;
50203
50234
 
50204
50235
  if (basicInfoFrom && basicInfoFrom === 'study' && basicInfoFromStudy && basicInfoFromStudy.patientAge) {
50205
50236
  return basicInfoFromStudy.patientAge;
50206
50237
  } else {
50238
+ if (originDicomInfo) {
50239
+ return originDicomInfo.PatientAge.toString();
50240
+ }
50241
+
50207
50242
  return dicom.PatientAge.toString();
50208
50243
  }
50209
50244
  });
@@ -50212,11 +50247,17 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50212
50247
  var _this$state4 = _this.state,
50213
50248
  dicom = _this$state4.dicom,
50214
50249
  basicInfoFrom = _this$state4.basicInfoFrom;
50215
- var basicInfoFromStudy = _this.props.basicInfoFromStudy;
50250
+ var _this$props4 = _this.props,
50251
+ basicInfoFromStudy = _this$props4.basicInfoFromStudy,
50252
+ originDicomInfo = _this$props4.originDicomInfo;
50216
50253
 
50217
50254
  if (basicInfoFrom && basicInfoFrom === 'study' && basicInfoFromStudy && basicInfoFromStudy.patientID) {
50218
50255
  return basicInfoFromStudy.patientID;
50219
50256
  } else {
50257
+ if (originDicomInfo) {
50258
+ return originDicomInfo.PatientID.toString();
50259
+ }
50260
+
50220
50261
  return dicom.PatientID.toString();
50221
50262
  }
50222
50263
  });
@@ -50309,16 +50350,18 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50309
50350
  }
50310
50351
 
50311
50352
  return loadDicom;
50312
- }()
50353
+ }() // originDicomInfo是mpr模式下的
50354
+
50313
50355
  }, {
50314
50356
  key: "render",
50315
50357
  value: function render() {
50316
- var _this$props = this.props,
50317
- imageId = _this$props.imageId,
50318
- stack = _this$props.stack,
50319
- viewport = _this$props.viewport,
50320
- hide = _this$props.hide,
50321
- mpr = _this$props.mpr;
50358
+ var _this$props5 = this.props,
50359
+ imageId = _this$props5.imageId,
50360
+ stack = _this$props5.stack,
50361
+ viewport = _this$props5.viewport,
50362
+ hide = _this$props5.hide,
50363
+ mpr = _this$props5.mpr,
50364
+ originDicomInfo = _this$props5.originDicomInfo;
50322
50365
 
50323
50366
  if (!imageId || !stack) {
50324
50367
  return null;
@@ -50333,6 +50376,22 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50333
50376
  }
50334
50377
 
50335
50378
  if (mpr) {
50379
+ var _institutionName = originDicomInfo && originDicomInfo.InstitutionName.toString();
50380
+
50381
+ var _manufacturer = originDicomInfo && originDicomInfo.Manufacturer.toString();
50382
+
50383
+ var _manufacturerModelName = originDicomInfo && originDicomInfo.ManufacturerModelName.toString();
50384
+
50385
+ var _patientName = originDicomInfo && this.getPatientNameData();
50386
+
50387
+ var _patientSex = originDicomInfo && this.getPatientSexData();
50388
+
50389
+ var _patientAge = originDicomInfo && this.getPatientAgeData();
50390
+
50391
+ var _patientID = originDicomInfo && this.getPatientIDData();
50392
+
50393
+ var _bodyPartExamined = originDicomInfo && originDicomInfo.BodyPartExamined.toString();
50394
+
50336
50395
  var _zoom = viewport.scale.toFixed(2);
50337
50396
 
50338
50397
  var _windowWidth = parseFloat(viewport.voi.windowWidth) || 0;
@@ -50341,7 +50400,19 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50341
50400
 
50342
50401
  var spaceBetweenSlice = stack.spaceBetweenSlice && stack.spaceBetweenSlice.toFixed(1);
50343
50402
  var _sliceThickness = this.props.sliceThickness;
50344
- return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
50403
+
50404
+ var _studyDateTime = originDicomInfo && getStudyDateTime(originDicomInfo);
50405
+
50406
+ return /*#__PURE__*/React__default.createElement("div", null, originDicomInfo && /*#__PURE__*/React__default.createElement("div", {
50407
+ style: {
50408
+ position: 'absolute',
50409
+ top: 4,
50410
+ left: 4,
50411
+ textAlign: 'left',
50412
+ fontSize: "".concat(fontSize, "px"),
50413
+ display: "".concat(hide ? 'none' : 'block')
50414
+ }
50415
+ }, /*#__PURE__*/React__default.createElement("div", null, _institutionName), /*#__PURE__*/React__default.createElement("div", null, _manufacturer, " ", _manufacturerModelName), /*#__PURE__*/React__default.createElement("div", null, _patientName, "/", _patientSex, "/", _patientAge), /*#__PURE__*/React__default.createElement("div", null, _patientID), /*#__PURE__*/React__default.createElement("div", null, _bodyPartExamined)), /*#__PURE__*/React__default.createElement("div", {
50345
50416
  style: {
50346
50417
  position: 'absolute',
50347
50418
  bottom: 4,
@@ -50350,7 +50421,16 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50350
50421
  fontSize: "".concat(fontSize, "px"),
50351
50422
  display: "".concat(hide ? 'none' : 'block')
50352
50423
  }
50353
- }, /*#__PURE__*/React__default.createElement("div", null, "T: ", spaceBetweenSlice, "mm", _sliceThickness && _sliceThickness !== 1 && 'X' + _sliceThickness, " L")), /*#__PURE__*/React__default.createElement("div", {
50424
+ }, /*#__PURE__*/React__default.createElement("div", null, "T: ", spaceBetweenSlice, "mm", _sliceThickness && _sliceThickness !== 1 && 'X' + _sliceThickness, " L")), originDicomInfo && /*#__PURE__*/React__default.createElement("div", {
50425
+ style: {
50426
+ position: 'absolute',
50427
+ top: 4,
50428
+ right: 4,
50429
+ textAlign: 'right',
50430
+ fontSize: "".concat(fontSize, "px"),
50431
+ display: "".concat(hide ? 'none' : 'block')
50432
+ }
50433
+ }, /*#__PURE__*/React__default.createElement("div", null, _studyDateTime && _studyDateTime.format('YYYY-MM-DD HH:mm:ss'))), /*#__PURE__*/React__default.createElement("div", {
50354
50434
  style: {
50355
50435
  position: 'absolute',
50356
50436
  bottom: 4,
@@ -50435,7 +50515,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
50435
50515
  fontSize: "".concat(fontSize, "px"),
50436
50516
  display: "".concat(hide ? 'none' : 'block')
50437
50517
  }
50438
- }, showDXDRCR && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('kV', kvp, false)), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('mA', xRayTubeCurrent, false)), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('Time', exposureTime, false)), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('mAs', exposure, false))), /*#__PURE__*/React__default.createElement("div", null, patientOrientation), /*#__PURE__*/React__default.createElement("div", null, protocolName), /*#__PURE__*/React__default.createElement("div", null, sequenceName), /*#__PURE__*/React__default.createElement("div", null, getTRAndTE(repetitionTime, echoTime)), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('TI', inversionTime)), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('FA', flipAngle)), /*#__PURE__*/React__default.createElement("div", null, getADAndNEX(acquisitionDuration, numberOfAverages)), /*#__PURE__*/React__default.createElement("div", null, thk), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('B', diffusionBValue, false)), seriesDescription && seriesDescription !== protocolName && /*#__PURE__*/React__default.createElement("div", null, seriesDescription), imageComments && imageComments.length < 20 && /*#__PURE__*/React__default.createElement("div", null, imageComments)), /*#__PURE__*/React__default.createElement("div", {
50518
+ }, showDXDRCR && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", null, formatDRDXInfo('kV', kvp)), /*#__PURE__*/React__default.createElement("div", null, formatDRDXInfo('mA', xRayTubeCurrent)), /*#__PURE__*/React__default.createElement("div", null, formatDRDXInfo('Time', exposureTime)), /*#__PURE__*/React__default.createElement("div", null, formatDRDXInfo('mAs', exposure))), /*#__PURE__*/React__default.createElement("div", null, patientOrientation), /*#__PURE__*/React__default.createElement("div", null, protocolName), /*#__PURE__*/React__default.createElement("div", null, sequenceName), /*#__PURE__*/React__default.createElement("div", null, getTRAndTE(repetitionTime, echoTime)), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('TI', inversionTime)), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('FA', flipAngle)), /*#__PURE__*/React__default.createElement("div", null, getADAndNEX(acquisitionDuration, numberOfAverages)), /*#__PURE__*/React__default.createElement("div", null, thk), /*#__PURE__*/React__default.createElement("div", null, formatDicomInfo('B', diffusionBValue, false)), seriesDescription && seriesDescription !== protocolName && /*#__PURE__*/React__default.createElement("div", null, seriesDescription), imageComments && imageComments.length < 20 && /*#__PURE__*/React__default.createElement("div", null, imageComments)), /*#__PURE__*/React__default.createElement("div", {
50439
50519
  style: {
50440
50520
  position: 'absolute',
50441
50521
  top: 4,
@@ -52635,6 +52715,7 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
52635
52715
  basicInfoFromStudy: basicInfoFromStudy,
52636
52716
  sliceThickness: sliceThickness,
52637
52717
  cpr: CPR,
52718
+ originDicomInfo: !this.props.VR && mpr && mpr === this.props.mprPerspective && !this.props.VR && this.props.originDicomInfo,
52638
52719
  mpr: mpr
52639
52720
  }), isKey && /*#__PURE__*/React__default.createElement("div", {
52640
52721
  className: 'paladin-key-image-tip'
@@ -52685,12 +52766,7 @@ var DicomViewport = /*#__PURE__*/function (_Component) {
52685
52766
  imageId: imageId,
52686
52767
  imageProcessType: _imageProcessType,
52687
52768
  mpr: mpr
52688
- })), mpr && !Surgery && /*#__PURE__*/React__default.createElement("div", {
52689
- className: "paladin-mpr-direaction-tip",
52690
- style: {
52691
- background: MPR_DIRECTION_COLOR[mpr]
52692
- }
52693
- }), directionToggle && direction && index !== 3 && /*#__PURE__*/React__default.createElement("div", {
52769
+ })), directionToggle && direction && index !== 3 && /*#__PURE__*/React__default.createElement("div", {
52694
52770
  className: "paladin-mpr-direaction-toggle-box",
52695
52771
  onClick: this.props.directionToggle
52696
52772
  }, /*#__PURE__*/React__default.createElement("span", {
@@ -53412,7 +53488,8 @@ var mapStateToProps$o = function mapStateToProps(state) {
53412
53488
  CPR = _state$paladin$tools$.CPR,
53413
53489
  referenceLineType = _state$paladin$tools$.referenceLineType,
53414
53490
  keyImages = _state$paladin$tools$.keyImages,
53415
- displayShutter = _state$paladin$tools$.displayShutter;
53491
+ displayShutter = _state$paladin$tools$.displayShutter,
53492
+ VR = _state$paladin$tools$.VR;
53416
53493
  var _state$paladin$tools$2 = state.paladin.tools.layout,
53417
53494
  col = _state$paladin$tools$2.col,
53418
53495
  currentScrollLine = _state$paladin$tools$2.currentScrollLine,
@@ -53424,7 +53501,8 @@ var mapStateToProps$o = function mapStateToProps(state) {
53424
53501
  linkImageModeSynchronizer = _state$paladin$viewpo.linkImageModeSynchronizer,
53425
53502
  seriesCurrentIndex = _state$paladin$viewpo.seriesCurrentIndex,
53426
53503
  positionSynchronizer = _state$paladin$viewpo.positionSynchronizer,
53427
- originStudy = _state$paladin$viewpo.originStudy;
53504
+ originStudy = _state$paladin$viewpo.originStudy,
53505
+ mprPerspective = _state$paladin$viewpo.mprPerspective;
53428
53506
  return {
53429
53507
  activeTool: activeTool,
53430
53508
  originActiveTool: originActiveTool,
@@ -53449,7 +53527,9 @@ var mapStateToProps$o = function mapStateToProps(state) {
53449
53527
  referenceLineType: referenceLineType,
53450
53528
  keyImages: keyImages,
53451
53529
  originStudy: originStudy,
53452
- displayShutter: displayShutter
53530
+ displayShutter: displayShutter,
53531
+ mprPerspective: mprPerspective,
53532
+ VR: VR
53453
53533
  };
53454
53534
  };
53455
53535
 
@@ -55501,7 +55581,8 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55501
55581
 
55502
55582
  _this.state = {
55503
55583
  processing: props.showProcessing !== false,
55504
- error: null
55584
+ error: null,
55585
+ originDicomInfo: null
55505
55586
  };
55506
55587
  _this.mpr = null;
55507
55588
 
@@ -55663,11 +55744,14 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55663
55744
  break;
55664
55745
 
55665
55746
  case 12:
55666
- _context2.next = 18;
55747
+ this.setState({
55748
+ originDicomInfo: instanceImages[0]
55749
+ });
55750
+ _context2.next = 19;
55667
55751
  break;
55668
55752
 
55669
- case 14:
55670
- _context2.prev = 14;
55753
+ case 15:
55754
+ _context2.prev = 15;
55671
55755
  _context2.t0 = _context2["catch"](3);
55672
55756
  processing && this.setState({
55673
55757
  processingMessage: "\u56FE\u50CF\u52A0\u8F7D\u5931\u8D25: ".concat(_context2.t0.message || '未知错误', "\uFF0C\u8BF7\u91CD\u65B0\u6253\u5F00\u8F6F\u4EF6"),
@@ -55675,22 +55759,22 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55675
55759
  });
55676
55760
  return _context2.abrupt("return");
55677
55761
 
55678
- case 18:
55762
+ case 19:
55679
55763
  // 能进入到这个组件中的已经默认是符合前期条件+选择了继续重建的,所以做一遍filter
55680
55764
  instanceImages = filterRebuildImages(instanceImages);
55681
55765
 
55682
55766
  if (processing) {
55683
- _context2.next = 23;
55767
+ _context2.next = 24;
55684
55768
  break;
55685
55769
  }
55686
55770
 
55687
- _context2.next = 22;
55771
+ _context2.next = 23;
55688
55772
  return this.initMPR(currentSeries, instanceImages);
55689
55773
 
55690
- case 22:
55774
+ case 23:
55691
55775
  return _context2.abrupt("return");
55692
55776
 
55693
- case 23:
55777
+ case 24:
55694
55778
  this.setState({
55695
55779
  processingMessage: "\u6B63\u5728\u5904\u7406\u56FE\u50CF...",
55696
55780
  error: null
@@ -55700,12 +55784,12 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55700
55784
  }, 50);
55701
55785
  });
55702
55786
 
55703
- case 24:
55787
+ case 25:
55704
55788
  case "end":
55705
55789
  return _context2.stop();
55706
55790
  }
55707
55791
  }
55708
- }, _callee2, this, [[3, 14]]);
55792
+ }, _callee2, this, [[3, 15]]);
55709
55793
  }));
55710
55794
 
55711
55795
  function componentDidMount() {
@@ -55736,7 +55820,8 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55736
55820
  transverseStack = _this$state.transverseStack,
55737
55821
  coronalStack = _this$state.coronalStack,
55738
55822
  screenDirection = _this$state.screenDirection,
55739
- error = _this$state.error;
55823
+ error = _this$state.error,
55824
+ originDicomInfo = _this$state.originDicomInfo;
55740
55825
  var _this$props = this.props,
55741
55826
  mprActiveIndex = _this$props.mprActiveIndex,
55742
55827
  showOverlayText = _this$props.showOverlayText,
@@ -55768,7 +55853,8 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55768
55853
  setViewportState: handleViewportState,
55769
55854
  getCacheViewport: getCacheViewport,
55770
55855
  onSyncOpen: onSyncOpen,
55771
- availableToolsConfig: this.availableToolsConfig
55856
+ availableToolsConfig: this.availableToolsConfig,
55857
+ originDicomInfo: originDicomInfo
55772
55858
  }); // 矢状面
55773
55859
 
55774
55860
  var sagittalEle = /*#__PURE__*/React__default.createElement(ConnectedDicomViewport, {
@@ -55788,7 +55874,8 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55788
55874
  setViewportState: handleViewportState,
55789
55875
  getCacheViewport: getCacheViewport,
55790
55876
  onSyncOpen: onSyncOpen,
55791
- availableToolsConfig: this.availableToolsConfig
55877
+ availableToolsConfig: this.availableToolsConfig,
55878
+ originDicomInfo: originDicomInfo
55792
55879
  }); // 冠状面
55793
55880
 
55794
55881
  var coronalEle = /*#__PURE__*/React__default.createElement(ConnectedDicomViewport, {
@@ -55808,7 +55895,8 @@ var ThreeDLayout = /*#__PURE__*/function (_Component) {
55808
55895
  setViewportState: handleViewportState,
55809
55896
  getCacheViewport: getCacheViewport,
55810
55897
  onSyncOpen: onSyncOpen,
55811
- availableToolsConfig: this.availableToolsConfig
55898
+ availableToolsConfig: this.availableToolsConfig,
55899
+ originDicomInfo: originDicomInfo
55812
55900
  }); // 视角
55813
55901
 
55814
55902
  var perspective1 = mprPerspective === ImagePlanDirection.Transverse ? transverseEle : mprPerspective === ImagePlanDirection.Sagittal ? sagittalEle : coronalEle;