hellfire 0.28.0 → 0.28.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 +4 -0
- package/dist/index.js +282 -85
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -966,6 +966,7 @@ var action = (function () {
|
|
|
966
966
|
* 1.换到非手术路径工具时要把路径的工具都关闭掉
|
|
967
967
|
* 2.换到非(测量工具 或 3d定位)的时候要缓存一份originActiveTool
|
|
968
968
|
* 3.换到非3d定位工具时,要把redux上的ReferencePosition关闭
|
|
969
|
+
* 4.如果是测量工具,需要按toggle的方式切换
|
|
969
970
|
*/
|
|
970
971
|
|
|
971
972
|
var newState = _objectSpread$1(_objectSpread$1({}, state), {}, {
|
|
@@ -985,6 +986,12 @@ var action = (function () {
|
|
|
985
986
|
newState['originActiveTool'] = nextTool;
|
|
986
987
|
}
|
|
987
988
|
|
|
989
|
+
if (lodash$1.includes(LengthToolsWithMeasure, nextTool) && lodash$1.includes(LengthToolsWithMeasure, state.activeTool)) {
|
|
990
|
+
if (nextTool === state.activeTool) {
|
|
991
|
+
newState['activeTool'] = state.originActiveTool;
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
988
995
|
return newState;
|
|
989
996
|
}
|
|
990
997
|
|
|
@@ -9389,7 +9396,12 @@ var OrientationMarkersTool = /*#__PURE__*/function (_BaseTool) {
|
|
|
9389
9396
|
}, {
|
|
9390
9397
|
key: "customTextBoxWidth",
|
|
9391
9398
|
value: function customTextBoxWidth(context, text, padding) {
|
|
9392
|
-
var font =
|
|
9399
|
+
var font = textStyle$4.getFont();
|
|
9400
|
+
|
|
9401
|
+
if (this.initialConfiguration.fontSize) {
|
|
9402
|
+
font = "".concat(this.initialConfiguration.fontSize * devicePixelRatio, "px Arial");
|
|
9403
|
+
}
|
|
9404
|
+
|
|
9393
9405
|
var origFont = context.font;
|
|
9394
9406
|
|
|
9395
9407
|
if (font && font !== origFont) {
|
|
@@ -9427,8 +9439,15 @@ var OrientationMarkersTool = /*#__PURE__*/function (_BaseTool) {
|
|
|
9427
9439
|
height: this.customTextBoxWidth(context, 'M', 0) // Trick to get an approximation of the height of the text
|
|
9428
9440
|
|
|
9429
9441
|
};
|
|
9442
|
+
|
|
9443
|
+
var _fontSize = textStyle$4.getFontSize();
|
|
9444
|
+
|
|
9445
|
+
if (this.initialConfiguration.fontSize) {
|
|
9446
|
+
_fontSize = this.initialConfiguration.fontSize;
|
|
9447
|
+
}
|
|
9448
|
+
|
|
9430
9449
|
var textConfig = {
|
|
9431
|
-
fontSize:
|
|
9450
|
+
fontSize: _fontSize
|
|
9432
9451
|
};
|
|
9433
9452
|
drawTopLeftText(context, markers, coords, textWidths, color, textConfig);
|
|
9434
9453
|
|
|
@@ -10709,7 +10728,12 @@ var RulerOverlayTool = /*#__PURE__*/function (_BaseTool) {
|
|
|
10709
10728
|
mixins: ['enabledOrDisabledBinaryTool'],
|
|
10710
10729
|
fontSize: 12,
|
|
10711
10730
|
color: null,
|
|
10712
|
-
strokeColor: null
|
|
10731
|
+
strokeColor: null,
|
|
10732
|
+
marginX: 40,
|
|
10733
|
+
tickMajor: 10,
|
|
10734
|
+
tickMinor: 7,
|
|
10735
|
+
tickPatch: 5,
|
|
10736
|
+
lineWidth: 2
|
|
10713
10737
|
};
|
|
10714
10738
|
return _super.call(this, props, defaultProps);
|
|
10715
10739
|
}
|
|
@@ -10743,13 +10767,13 @@ var RulerOverlayTool = /*#__PURE__*/function (_BaseTool) {
|
|
|
10743
10767
|
context.beginPath();
|
|
10744
10768
|
context.strokeStyle = this.initialConfiguration.strokeColor || 'white';
|
|
10745
10769
|
context.fillStyle = this.initialConfiguration.color || 'white';
|
|
10746
|
-
context.lineWidth =
|
|
10770
|
+
context.lineWidth = this.initialConfiguration.lineWidth * devicePixelRatio$1;
|
|
10747
10771
|
var fontSize = this.initialConfiguration.fontSize;
|
|
10748
10772
|
context.font = fontSize * devicePixelRatio$1 + 'px Arial';
|
|
10749
|
-
var marginX =
|
|
10750
|
-
var tickMajor =
|
|
10751
|
-
var tickMinor =
|
|
10752
|
-
var tickPatch =
|
|
10773
|
+
var marginX = this.initialConfiguration.marginX * devicePixelRatio$1;
|
|
10774
|
+
var tickMajor = this.initialConfiguration.tickMajor * devicePixelRatio$1;
|
|
10775
|
+
var tickMinor = this.initialConfiguration.tickMinor * devicePixelRatio$1;
|
|
10776
|
+
var tickPatch = this.initialConfiguration.tickPatch * devicePixelRatio$1;
|
|
10753
10777
|
var anchor = {
|
|
10754
10778
|
x: canvasWidth - marginX,
|
|
10755
10779
|
y: canvasHeight / 2
|
|
@@ -26439,6 +26463,9 @@ function getActiveElement(mode, activeIndex, imageActiveIndex, MPR, mprActiveInd
|
|
|
26439
26463
|
function getElement(index) {
|
|
26440
26464
|
return document.getElementById("paladin-viewport-".concat(index));
|
|
26441
26465
|
}
|
|
26466
|
+
function getFilmElement(index) {
|
|
26467
|
+
return document.getElementById("paladin-film-viewport-".concat(index));
|
|
26468
|
+
}
|
|
26442
26469
|
function getRealActiveIndex(mode, activeIndex, imageActiveIndex, MPR, mprActiveIndex, Surgery, surgeryActiveIndex, CPR) {
|
|
26443
26470
|
// 1.序列模式
|
|
26444
26471
|
// 2.图像模式
|
|
@@ -48583,7 +48610,8 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48583
48610
|
|
|
48584
48611
|
_this = _super.call(this, props);
|
|
48585
48612
|
_this.state = {
|
|
48586
|
-
dicom: null
|
|
48613
|
+
dicom: null,
|
|
48614
|
+
fontSize: props.fontSize || 12
|
|
48587
48615
|
};
|
|
48588
48616
|
return _this;
|
|
48589
48617
|
}
|
|
@@ -48598,6 +48626,15 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48598
48626
|
|
|
48599
48627
|
this.loadDicom(this.props.imageId);
|
|
48600
48628
|
}
|
|
48629
|
+
}, {
|
|
48630
|
+
key: "componentDidUpdate",
|
|
48631
|
+
value: function componentDidUpdate(prevProps, prevState, snapshot) {
|
|
48632
|
+
if (prevProps.fontSize !== this.props.fontSize) {
|
|
48633
|
+
this.setState({
|
|
48634
|
+
fontSize: this.props.fontSize
|
|
48635
|
+
});
|
|
48636
|
+
}
|
|
48637
|
+
}
|
|
48601
48638
|
}, {
|
|
48602
48639
|
key: "componentWillReceiveProps",
|
|
48603
48640
|
value: function () {
|
|
@@ -48672,7 +48709,9 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48672
48709
|
return null;
|
|
48673
48710
|
}
|
|
48674
48711
|
|
|
48675
|
-
var
|
|
48712
|
+
var _this$state = this.state,
|
|
48713
|
+
dicom = _this$state.dicom,
|
|
48714
|
+
fontSize = _this$state.fontSize;
|
|
48676
48715
|
|
|
48677
48716
|
if (!dicom) {
|
|
48678
48717
|
return null;
|
|
@@ -48693,7 +48732,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48693
48732
|
bottom: 4,
|
|
48694
48733
|
left: 4,
|
|
48695
48734
|
textAlign: 'left',
|
|
48696
|
-
fontSize:
|
|
48735
|
+
fontSize: "".concat(fontSize, "px"),
|
|
48697
48736
|
display: "".concat(hide ? 'none' : 'block')
|
|
48698
48737
|
}
|
|
48699
48738
|
}, /*#__PURE__*/React__default.createElement("div", null, "T: ", spaceBetweenSlice, "mm", _sliceThickness && _sliceThickness !== 1 && 'X' + _sliceThickness, " L")), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -48702,7 +48741,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48702
48741
|
bottom: 4,
|
|
48703
48742
|
right: 4,
|
|
48704
48743
|
textAlign: 'right',
|
|
48705
|
-
fontSize:
|
|
48744
|
+
fontSize: "".concat(fontSize, "px"),
|
|
48706
48745
|
display: "".concat(hide ? 'none' : 'block')
|
|
48707
48746
|
}
|
|
48708
48747
|
}, /*#__PURE__*/React__default.createElement("div", null, "W: ", _windowWidth.toFixed(0)), /*#__PURE__*/React__default.createElement("div", null, "C: ", _windowCenter.toFixed(0)), /*#__PURE__*/React__default.createElement("div", null, _zoom, "X")));
|
|
@@ -48760,7 +48799,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48760
48799
|
top: 4,
|
|
48761
48800
|
left: 4,
|
|
48762
48801
|
textAlign: 'left',
|
|
48763
|
-
fontSize:
|
|
48802
|
+
fontSize: "".concat(fontSize, "px"),
|
|
48764
48803
|
display: "".concat(hide ? 'none' : 'block')
|
|
48765
48804
|
}
|
|
48766
48805
|
}, /*#__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", null, laterality)), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -48769,7 +48808,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48769
48808
|
bottom: 4,
|
|
48770
48809
|
left: 4,
|
|
48771
48810
|
textAlign: 'left',
|
|
48772
|
-
fontSize:
|
|
48811
|
+
fontSize: "".concat(fontSize, "px"),
|
|
48773
48812
|
display: "".concat(hide ? 'none' : 'block')
|
|
48774
48813
|
}
|
|
48775
48814
|
}, /*#__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)), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -48778,7 +48817,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48778
48817
|
top: 4,
|
|
48779
48818
|
right: 4,
|
|
48780
48819
|
textAlign: 'right',
|
|
48781
|
-
fontSize:
|
|
48820
|
+
fontSize: "".concat(fontSize, "px"),
|
|
48782
48821
|
display: "".concat(hide ? 'none' : 'block')
|
|
48783
48822
|
}
|
|
48784
48823
|
}, /*#__PURE__*/React__default.createElement("div", null, studyDateTime && studyDateTime.format('YYYY-MM-DD HH:mm:ss')), /*#__PURE__*/React__default.createElement("div", null, "Se: ", seriesNumber, "/", seriesCount), /*#__PURE__*/React__default.createElement("div", null, "Im: ", instanceNumber, "/", instanceCount), /*#__PURE__*/React__default.createElement("div", null, compression), /*#__PURE__*/React__default.createElement("div", null, formatInPlanePhaseEncodingDirection(inPlanePhaseEncodingDirection))), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -48787,7 +48826,7 @@ var ViewportOverlay = /*#__PURE__*/function (_PureComponent) {
|
|
|
48787
48826
|
bottom: 4,
|
|
48788
48827
|
right: 4,
|
|
48789
48828
|
textAlign: 'right',
|
|
48790
|
-
fontSize:
|
|
48829
|
+
fontSize: "".concat(fontSize, "px"),
|
|
48791
48830
|
display: "".concat(hide ? 'none' : 'block')
|
|
48792
48831
|
}
|
|
48793
48832
|
}, /*#__PURE__*/React__default.createElement("div", null, "W: ", windowWidth.toFixed(0)), /*#__PURE__*/React__default.createElement("div", null, "C: ", windowCenter.toFixed(0)), /*#__PURE__*/React__default.createElement("div", null, zoom, "X"), /*#__PURE__*/React__default.createElement("div", null, getFov(dicom, imageId)), /*#__PURE__*/React__default.createElement("div", null, getMat(acquisitionMatrix)), (sliceLocation || sliceLocation === 0) && /*#__PURE__*/React__default.createElement("div", null, "Location: ", sliceLocation)));
|
|
@@ -54955,7 +54994,7 @@ function studySeriesDataCheck (studies) {
|
|
|
54955
54994
|
});
|
|
54956
54995
|
}
|
|
54957
54996
|
|
|
54958
|
-
var css_248z$F = ".paladin-film-tool {\n width: 220px;\n color: #c0c0c0;\n padding: 10px;\n font-size: 15px;\n}\n.paladin-film-tool .film-full-line {\n width: 100%;\n height: 1px;\n background: #777676;\n margin: 10px 0;\n}\n.paladin-film-tool .film-half-button,\n.paladin-film-tool .film-full-button {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n height: 40px;\n border: 1px solid #1c1c1c;\n box-sizing: border-box;\n}\n.paladin-film-tool .film-half-button svg,\n.paladin-film-tool .film-full-button svg {\n width: 18px;\n height: 18px;\n margin-right: 6px;\n}\n.paladin-film-tool .film-half-button {\n width: 50%;\n}\n.paladin-film-tool .film-full-button {\n width: 100%;\n}\n.paladin-film-tool .film-template-box {\n display: flex;\n width: 100%;\n height: 40px;\n border: 1px solid #1c1c1c;\n box-sizing: border-box;\n}\n.paladin-film-tool .film-template-box div {\n display: flex;\n flex: 1;\n cursor: pointer;\n align-items: center;\n}\n.paladin-film-tool .film-template-box .template-add {\n flex: none;\n padding-left: 5px;\n padding-right: 7px;\n border-right: 1px solid #1c1c1c;\n height: 100%;\n}\n.paladin-film-tool .film-template-box .template-select {\n justify-content: center;\n}\n.paladin-film-tool .film-template-box .template-select svg {\n width: 18px;\n margin-left: 3px;\n}\n.paladin-film-tool .film-template-box .template-setting {\n height: 100%;\n width: 20px;\n flex: none;\n padding-left: 7px;\n padding-right: 5px;\n border-left: 1px solid #1c1c1c;\n}\n.paladin-film-tool .film-template-box .template-setting svg {\n width: 20px;\n}\n.paladin-film-tool .film-size-box {\n margin: 20px 0;\n display: flex;\n align-items: center;\n}\n.paladin-film-tool .film-size-box span {\n display: flex;\n flex: none;\n margin-right: 8px;\n}\n.paladin-film-tool .film-size-box .film-size-select {\n height: 40px;\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n border: 1px solid #1c1c1c;\n box-sizing: border-box;\n}\n.paladin-film-tool .film-size-box button {\n border: none;\n width: 100%;\n height: 100%;\n background: #353535;\n color: #c0c0c0;\n font-size: 15px;\n}\n.paladin-film-tool .film-size-box svg {\n width: 20px;\n}\n.paladin-film-tool .g-rgl-grid {\n padding: 12px;\n}\n.paladin-dropdown-custom {\n z-index: 99;\n left: 50px !important;\n}\n.paladin-menu-custom {\n width: 180px;\n background: #000000;\n color: #c0c0c0;\n padding: 0;\n}\n.paladin-menu-custom li {\n text-align: center;\n list-style: none;\n border-bottom: 1px solid #4D4D4D;\n padding: 6px 0;\n cursor: pointer;\n}\n.paladin-menu-custom li:last-child {\n border-bottom: none;\n}\n.rc-dropdown-hidden {\n display: none;\n}\n.paladin-film-print-modal-wrapper .paladin-modal-header {\n color: #fff;\n font-weight: normal;\n font-size: 16px;\n border-bottom: 1px solid #484849;\n}\n";
|
|
54997
|
+
var css_248z$F = ".paladin-film-tool {\n width: 220px;\n color: #c0c0c0;\n padding: 10px;\n font-size: 15px;\n}\n.paladin-film-tool .film-full-line {\n width: 100%;\n height: 1px;\n background: #777676;\n margin: 10px 0;\n}\n.paladin-film-tool .film-half-button,\n.paladin-film-tool .film-full-button {\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n height: 40px;\n border: 1px solid #1c1c1c;\n box-sizing: border-box;\n}\n.paladin-film-tool .film-half-button svg,\n.paladin-film-tool .film-full-button svg {\n width: 18px;\n height: 18px;\n margin-right: 6px;\n}\n.paladin-film-tool .film-half-button {\n width: 50%;\n}\n.paladin-film-tool .film-full-button {\n width: 100%;\n}\n.paladin-film-tool .film-template-box {\n display: flex;\n width: 100%;\n height: 40px;\n border: 1px solid #1c1c1c;\n box-sizing: border-box;\n}\n.paladin-film-tool .film-template-box div {\n display: flex;\n flex: 1;\n cursor: pointer;\n align-items: center;\n}\n.paladin-film-tool .film-template-box .template-add {\n flex: none;\n padding-left: 5px;\n padding-right: 7px;\n border-right: 1px solid #1c1c1c;\n height: 100%;\n}\n.paladin-film-tool .film-template-box .template-select {\n justify-content: center;\n}\n.paladin-film-tool .film-template-box .template-select svg {\n width: 18px;\n margin-left: 3px;\n}\n.paladin-film-tool .film-template-box .template-setting {\n height: 100%;\n width: 20px;\n flex: none;\n padding-left: 7px;\n padding-right: 5px;\n border-left: 1px solid #1c1c1c;\n}\n.paladin-film-tool .film-template-box .template-setting svg {\n width: 20px;\n}\n.paladin-film-tool .film-size-box {\n margin: 20px 0;\n display: flex;\n align-items: center;\n}\n.paladin-film-tool .film-size-box span {\n display: flex;\n flex: none;\n margin-right: 8px;\n}\n.paladin-film-tool .film-size-box .film-size-select {\n height: 40px;\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n border: 1px solid #1c1c1c;\n box-sizing: border-box;\n}\n.paladin-film-tool .film-size-box button {\n border: none;\n width: 100%;\n height: 100%;\n background: #353535;\n color: #c0c0c0;\n font-size: 15px;\n}\n.paladin-film-tool .film-size-box svg {\n width: 20px;\n}\n.paladin-film-tool .g-rgl-grid {\n padding: 12px;\n}\n.paladin-dropdown-custom {\n z-index: 99;\n left: 50px !important;\n}\n.paladin-menu-custom {\n width: 180px;\n background: #000000;\n color: #c0c0c0;\n padding: 0;\n}\n.paladin-menu-custom li {\n text-align: center;\n list-style: none;\n border-bottom: 1px solid #4D4D4D;\n padding: 6px 0;\n cursor: pointer;\n}\n.paladin-menu-custom li:last-child {\n border-bottom: none;\n}\n.rc-dropdown-hidden {\n display: none;\n}\n.paladin-film-print-modal-wrapper {\n overflow: hidden;\n}\n.paladin-film-print-modal-wrapper .paladin-modal-header {\n color: #fff;\n font-weight: normal;\n font-size: 16px;\n border-bottom: 1px solid #484849;\n}\n";
|
|
54959
54998
|
styleInject$1(css_248z$F);
|
|
54960
54999
|
|
|
54961
55000
|
function _extends$1r() { _extends$1r = 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$1r.apply(this, arguments); }
|
|
@@ -55074,6 +55113,12 @@ var Layout$1 = /*#__PURE__*/function (_Component) {
|
|
|
55074
55113
|
return Layout;
|
|
55075
55114
|
}(React.Component);
|
|
55076
55115
|
|
|
55116
|
+
function _createForOfIteratorHelper$e(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$g(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
55117
|
+
|
|
55118
|
+
function _unsupportedIterableToArray$g(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$g(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$g(o, minLen); }
|
|
55119
|
+
|
|
55120
|
+
function _arrayLikeToArray$g(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
55121
|
+
|
|
55077
55122
|
function ownKeys$W(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
55078
55123
|
|
|
55079
55124
|
function _objectSpread$X(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$W(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$W(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -55092,6 +55137,29 @@ var mergeProps$u = function mergeProps(propsFromState, propsFromDispatch, ownPro
|
|
|
55092
55137
|
return _objectSpread$X(_objectSpread$X(_objectSpread$X({}, ownProps), propsFromState), {}, {
|
|
55093
55138
|
onLayoutChange: function onLayoutChange(row, col) {
|
|
55094
55139
|
propsFromDispatch.setFilmLayout(row, col);
|
|
55140
|
+
setTimeout(function () {
|
|
55141
|
+
try {
|
|
55142
|
+
var layoutElements = lodash$1.map(Array(row * col), function (v, n) {
|
|
55143
|
+
return getFilmElement(n);
|
|
55144
|
+
});
|
|
55145
|
+
|
|
55146
|
+
var _iterator = _createForOfIteratorHelper$e(layoutElements),
|
|
55147
|
+
_step;
|
|
55148
|
+
|
|
55149
|
+
try {
|
|
55150
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
55151
|
+
var element = _step.value;
|
|
55152
|
+
cornerstone.resize(element, true);
|
|
55153
|
+
}
|
|
55154
|
+
} catch (err) {
|
|
55155
|
+
_iterator.e(err);
|
|
55156
|
+
} finally {
|
|
55157
|
+
_iterator.f();
|
|
55158
|
+
}
|
|
55159
|
+
} catch (e) {
|
|
55160
|
+
console.log('ignore element not enabled event');
|
|
55161
|
+
}
|
|
55162
|
+
});
|
|
55095
55163
|
}
|
|
55096
55164
|
});
|
|
55097
55165
|
};
|
|
@@ -65117,10 +65185,6 @@ var FILM_SIZE_TYPE_DIC = [{
|
|
|
65117
65185
|
value: '810'
|
|
65118
65186
|
}];
|
|
65119
65187
|
var FILM_SIZE_TYPE_MAP = {
|
|
65120
|
-
// '1417': {width: 14, height: 17, label: '14IN X 17IN', ID: '14INX17IN', dicomRow: 5000, dicomColumn: 4000},
|
|
65121
|
-
// '1114': {width: 11, height: 14, label: '11IN X 14IN', ID: '11INX14IN', dicomRow: 4000, dicomColumn: 3200},
|
|
65122
|
-
// '1012': {width: 10, height: 12, label: '10IN X 12IN', ID: '10INX12IN', dicomRow: 3400, dicomColumn: 2600},
|
|
65123
|
-
// '810': {width: 8, height: 10, label: '8IN X 10IN', ID: '8INX10IN', dicomRow: 2600, dicomColumn: 1900}
|
|
65124
65188
|
'1417': {
|
|
65125
65189
|
width: 14,
|
|
65126
65190
|
height: 17,
|
|
@@ -65903,21 +65967,72 @@ var formatDicomInfo$1 = function formatDicomInfo(label, value) {
|
|
|
65903
65967
|
return formated ? "".concat(label, ": ").concat(formated) : '';
|
|
65904
65968
|
};
|
|
65905
65969
|
|
|
65906
|
-
function _createForOfIteratorHelper$
|
|
65970
|
+
function _createForOfIteratorHelper$f(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$h(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
65907
65971
|
|
|
65908
|
-
function _unsupportedIterableToArray$
|
|
65972
|
+
function _unsupportedIterableToArray$h(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$h(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$h(o, minLen); }
|
|
65909
65973
|
|
|
65910
|
-
function _arrayLikeToArray$
|
|
65974
|
+
function _arrayLikeToArray$h(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
65911
65975
|
|
|
65912
65976
|
function ownKeys$Z(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
65913
65977
|
|
|
65914
65978
|
function _objectSpread$Z(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$Z(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$Z(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
65915
65979
|
var domId = "paladinFilmOutputMock";
|
|
65980
|
+
var devicePixelRatio$4 = getDevicePixelRatio();
|
|
65916
65981
|
var currentImageLoad = null;
|
|
65917
65982
|
var currentFilms = null;
|
|
65918
|
-
var dicomInfoFontSize = 27;
|
|
65919
|
-
var dicomInfoSpacing = 34;
|
|
65920
|
-
var devicePixelRatio$4
|
|
65983
|
+
var dicomInfoFontSize = 27 * devicePixelRatio$4;
|
|
65984
|
+
var dicomInfoSpacing = 34 * devicePixelRatio$4;
|
|
65985
|
+
var orientationMarkersFontSize = 25 * devicePixelRatio$4;
|
|
65986
|
+
var orientationMarkersLeft = 15;
|
|
65987
|
+
var orientationMarkersRight = 20;
|
|
65988
|
+
var orientationMarkersTop = 15;
|
|
65989
|
+
var orientationMarkersBottom = 30;
|
|
65990
|
+
var rulerOverlayFontSize = 20;
|
|
65991
|
+
var rulerOverlayMarginX = 40;
|
|
65992
|
+
var rulerOverlayTickMajor = 10;
|
|
65993
|
+
var rulerOverlayTickMinor = 7;
|
|
65994
|
+
var rulerOverlayTickPatch = 5;
|
|
65995
|
+
var rulerOverlayLineWidth = 2;
|
|
65996
|
+
var dicomInfoPaddingX = 10 * devicePixelRatio$4;
|
|
65997
|
+
var dicomInfoPaddingY = 30 * devicePixelRatio$4;
|
|
65998
|
+
|
|
65999
|
+
function calculateFontSize(width, height) {
|
|
66000
|
+
// 基准1
|
|
66001
|
+
var baseWidth1 = 4200;
|
|
66002
|
+
var baseHeight1 = 2550;
|
|
66003
|
+
var baseFontSize1 = 50; // 基准2
|
|
66004
|
+
|
|
66005
|
+
var baseWidth2 = 1050;
|
|
66006
|
+
var baseHeight2 = 1020;
|
|
66007
|
+
var baseFontSize2 = 27; // 计算基准1的面积和基准2的面积
|
|
66008
|
+
|
|
66009
|
+
var baseArea1 = baseWidth1 * baseHeight1;
|
|
66010
|
+
var baseArea2 = baseWidth2 * baseHeight2;
|
|
66011
|
+
var area = width * height;
|
|
66012
|
+
var fontSize = baseFontSize1 + (baseFontSize2 - baseFontSize1) * ((area - baseArea1) / (baseArea2 - baseArea1));
|
|
66013
|
+
return lodash$1.round(fontSize);
|
|
66014
|
+
}
|
|
66015
|
+
|
|
66016
|
+
function calcImageFontSize(width, height) {
|
|
66017
|
+
var size = calculateFontSize(width, height);
|
|
66018
|
+
var ratioX = lodash$1.round(width / 800); // 四角信息
|
|
66019
|
+
|
|
66020
|
+
dicomInfoFontSize = size * devicePixelRatio$4;
|
|
66021
|
+
dicomInfoSpacing = (size + 7) * devicePixelRatio$4;
|
|
66022
|
+
dicomInfoPaddingY = (size + 3) * devicePixelRatio$4; // 方位
|
|
66023
|
+
|
|
66024
|
+
orientationMarkersFontSize = (size - 2) * devicePixelRatio$4;
|
|
66025
|
+
orientationMarkersRight = size;
|
|
66026
|
+
orientationMarkersBottom = size;
|
|
66027
|
+
orientationMarkersLeft = size; // 标尺
|
|
66028
|
+
|
|
66029
|
+
rulerOverlayFontSize = size - 7;
|
|
66030
|
+
rulerOverlayMarginX = size * 3;
|
|
66031
|
+
rulerOverlayTickMajor = 10 * ratioX;
|
|
66032
|
+
rulerOverlayTickMinor = 7 * ratioX;
|
|
66033
|
+
rulerOverlayTickPatch = 6 * ratioX;
|
|
66034
|
+
rulerOverlayLineWidth = 2 + ratioX * 0.5;
|
|
66035
|
+
}
|
|
65921
66036
|
/**
|
|
65922
66037
|
* 1.根据打印的真实宽高,确定尺寸
|
|
65923
66038
|
* 2.获得films的虚拟画布图像数据
|
|
@@ -65926,6 +66041,7 @@ var devicePixelRatio$4 = getDevicePixelRatio();
|
|
|
65926
66041
|
* viewFilmItemWidth是可视化的画布dom的真实大小,需要和最终生成的尺寸做缩放得到真实的Viewport缩放、移动
|
|
65927
66042
|
*/
|
|
65928
66043
|
|
|
66044
|
+
|
|
65929
66045
|
var getFilmPrintImageData = /*#__PURE__*/function () {
|
|
65930
66046
|
var _ref = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(films, options) {
|
|
65931
66047
|
var sizeType, row, col, viewFilmItemWidth, filmSize, filmWidth, filmHeight, filmItemWidth, filmItemHeight, filmPrintOriginImageData, id, element, canvas, firstLoad, _iterator, _step, film, bitmap, mockDom, mergedCanvas, mergedCtx, i, item, x, y, imageData, pixelData;
|
|
@@ -65972,6 +66088,9 @@ var getFilmPrintImageData = /*#__PURE__*/function () {
|
|
|
65972
66088
|
element = document.getElementById(id);
|
|
65973
66089
|
|
|
65974
66090
|
if (!element) {
|
|
66091
|
+
// 先计算当前尺寸、布局下字体大小
|
|
66092
|
+
calcImageFontSize(filmItemWidth, filmItemHeight); // 创建element
|
|
66093
|
+
|
|
65975
66094
|
element = document.createElement("div");
|
|
65976
66095
|
element.setAttribute("id", id);
|
|
65977
66096
|
document.body.appendChild(element);
|
|
@@ -65985,17 +66104,22 @@ var getFilmPrintImageData = /*#__PURE__*/function () {
|
|
|
65985
66104
|
cornerstone.enable(element, {}); // 工具注册
|
|
65986
66105
|
|
|
65987
66106
|
cornerstoneTools.addToolForElement(element, cornerstoneTools.OrientationMarkersTool, {
|
|
65988
|
-
color: "#
|
|
65989
|
-
fontSize:
|
|
65990
|
-
paddingTop:
|
|
65991
|
-
paddingLeft:
|
|
65992
|
-
paddingRight:
|
|
65993
|
-
paddingBottom:
|
|
66107
|
+
color: "#c0c0c0",
|
|
66108
|
+
fontSize: orientationMarkersFontSize,
|
|
66109
|
+
paddingTop: orientationMarkersTop * devicePixelRatio$4,
|
|
66110
|
+
paddingLeft: orientationMarkersLeft * devicePixelRatio$4,
|
|
66111
|
+
paddingRight: orientationMarkersRight * devicePixelRatio$4,
|
|
66112
|
+
paddingBottom: orientationMarkersBottom * devicePixelRatio$4
|
|
65994
66113
|
});
|
|
65995
66114
|
cornerstoneTools.addToolForElement(element, cornerstoneTools.RulerOverlayTool, {
|
|
65996
|
-
color: "#
|
|
65997
|
-
strokeColor: "#
|
|
65998
|
-
fontSize:
|
|
66115
|
+
color: "#c0c0c0",
|
|
66116
|
+
strokeColor: "#c0c0c0",
|
|
66117
|
+
fontSize: rulerOverlayFontSize,
|
|
66118
|
+
marginX: rulerOverlayMarginX,
|
|
66119
|
+
tickMajor: rulerOverlayTickMajor,
|
|
66120
|
+
tickMinor: rulerOverlayTickMinor,
|
|
66121
|
+
tickPatch: rulerOverlayTickPatch,
|
|
66122
|
+
lineWidth: rulerOverlayLineWidth
|
|
65999
66123
|
});
|
|
66000
66124
|
element.addEventListener(cornerstone.EVENTS.IMAGE_RENDERED, onImageRendered);
|
|
66001
66125
|
} // 原始数据获取
|
|
@@ -66011,7 +66135,7 @@ var getFilmPrintImageData = /*#__PURE__*/function () {
|
|
|
66011
66135
|
widthInView: viewFilmItemWidth
|
|
66012
66136
|
});
|
|
66013
66137
|
});
|
|
66014
|
-
_iterator = _createForOfIteratorHelper$
|
|
66138
|
+
_iterator = _createForOfIteratorHelper$f(films);
|
|
66015
66139
|
_context.prev = 20;
|
|
66016
66140
|
|
|
66017
66141
|
_iterator.s();
|
|
@@ -66250,31 +66374,30 @@ var getEmptyImageBitmap = function getEmptyImageBitmap(width, height) {
|
|
|
66250
66374
|
|
|
66251
66375
|
var addDicomInfoOnCanvas = /*#__PURE__*/function () {
|
|
66252
66376
|
var _ref4 = asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4(enableElement) {
|
|
66253
|
-
var canvas, image, viewport,
|
|
66377
|
+
var canvas, image, viewport, ctx, dicom, width, height, stackImageInfo;
|
|
66254
66378
|
return regenerator.wrap(function _callee4$(_context4) {
|
|
66255
66379
|
while (1) {
|
|
66256
66380
|
switch (_context4.prev = _context4.next) {
|
|
66257
66381
|
case 0:
|
|
66258
66382
|
canvas = enableElement.canvas, image = enableElement.image, viewport = enableElement.viewport;
|
|
66259
|
-
devicePixelRatio = getDevicePixelRatio();
|
|
66260
66383
|
ctx = canvas.getContext('2d');
|
|
66261
|
-
ctx.fillStyle = '#
|
|
66384
|
+
ctx.fillStyle = '#c0c0c0';
|
|
66262
66385
|
ctx.strokeStyle = '#000';
|
|
66263
|
-
ctx.font = dicomInfoFontSize
|
|
66264
|
-
_context4.next =
|
|
66386
|
+
ctx.font = dicomInfoFontSize + 'px Arial';
|
|
66387
|
+
_context4.next = 7;
|
|
66265
66388
|
return loadAndCacheDicom(image.imageId);
|
|
66266
66389
|
|
|
66267
|
-
case
|
|
66390
|
+
case 7:
|
|
66268
66391
|
dicom = _context4.sent;
|
|
66269
66392
|
|
|
66270
66393
|
if (dicom) {
|
|
66271
|
-
_context4.next =
|
|
66394
|
+
_context4.next = 10;
|
|
66272
66395
|
break;
|
|
66273
66396
|
}
|
|
66274
66397
|
|
|
66275
66398
|
return _context4.abrupt("return");
|
|
66276
66399
|
|
|
66277
|
-
case
|
|
66400
|
+
case 10:
|
|
66278
66401
|
width = canvas.width;
|
|
66279
66402
|
height = canvas.height;
|
|
66280
66403
|
stackImageInfo = currentFilms[image.imageId] || {};
|
|
@@ -66286,7 +66409,7 @@ var addDicomInfoOnCanvas = /*#__PURE__*/function () {
|
|
|
66286
66409
|
drawRightBottom(dicom, ctx, width, height, viewport, image);
|
|
66287
66410
|
ctx.textAlign = 'left';
|
|
66288
66411
|
|
|
66289
|
-
case
|
|
66412
|
+
case 20:
|
|
66290
66413
|
case "end":
|
|
66291
66414
|
return _context4.stop();
|
|
66292
66415
|
}
|
|
@@ -66310,8 +66433,8 @@ var drawLeftTop = function drawLeftTop(dicom, ctx) {
|
|
|
66310
66433
|
var patientID = dicom.PatientID.toString();
|
|
66311
66434
|
var bodyPartExamined = dicom.BodyPartExamined.toString();
|
|
66312
66435
|
var laterality = dicom.Laterality.toString() || dicom.ImageLaterality.toString() || '';
|
|
66313
|
-
var contentX =
|
|
66314
|
-
var contentY =
|
|
66436
|
+
var contentX = dicomInfoPaddingX;
|
|
66437
|
+
var contentY = dicomInfoPaddingY;
|
|
66315
66438
|
var spacing = dicomInfoSpacing;
|
|
66316
66439
|
|
|
66317
66440
|
if (institutionName) {
|
|
@@ -66320,11 +66443,11 @@ var drawLeftTop = function drawLeftTop(dicom, ctx) {
|
|
|
66320
66443
|
}
|
|
66321
66444
|
|
|
66322
66445
|
if (manufacturer || manufacturerModelName) {
|
|
66323
|
-
ctx.fillText("".concat(manufacturer, " ").concat(manufacturerModelName), contentX, contentY);
|
|
66446
|
+
ctx.fillText("".concat(manufacturer || '', " ").concat(manufacturerModelName || ''), contentX, contentY);
|
|
66324
66447
|
contentY += spacing;
|
|
66325
66448
|
}
|
|
66326
66449
|
|
|
66327
|
-
ctx.fillText("".concat(patientName, "/").concat(patientSex, "/").concat(patientAge), contentX, contentY);
|
|
66450
|
+
ctx.fillText("".concat(patientName || '', "/").concat(patientSex || '', "/").concat(patientAge || ''), contentX, contentY);
|
|
66328
66451
|
contentY += spacing;
|
|
66329
66452
|
|
|
66330
66453
|
if (patientID) {
|
|
@@ -66362,8 +66485,8 @@ var drawLeftBottom = function drawLeftBottom(dicom, ctx, height) {
|
|
|
66362
66485
|
var actualSpacingBetweenSlices = getActualSpacingBetweenSlices$1(sliceThickness, spacingBetweenSlices);
|
|
66363
66486
|
var thk = actualSpacingBetweenSlices || sliceThickness ? "THK: ".concat(sliceThickness && parseFloat(sliceThickness).toFixed(1), "/").concat(actualSpacingBetweenSlices) : ''; // 从下往上画
|
|
66364
66487
|
|
|
66365
|
-
var contentX =
|
|
66366
|
-
var contentY = height -
|
|
66488
|
+
var contentX = dicomInfoPaddingX;
|
|
66489
|
+
var contentY = height - dicomInfoPaddingX;
|
|
66367
66490
|
var spacing = dicomInfoSpacing;
|
|
66368
66491
|
|
|
66369
66492
|
if (seriesDescription && seriesDescription !== protocolName) {
|
|
@@ -66430,13 +66553,13 @@ var drawLeftBottom = function drawLeftBottom(dicom, ctx, height) {
|
|
|
66430
66553
|
var drawRightTop = function drawRightTop(dicom, ctx, width, stack) {
|
|
66431
66554
|
var studyDateTime = getStudyDateTime$1(dicom);
|
|
66432
66555
|
var instanceCount = stack.instanceCount || '';
|
|
66433
|
-
var instanceNumber = stack.instanceNumber || '';
|
|
66556
|
+
var instanceNumber = stack.instanceNumber.toString() || '';
|
|
66434
66557
|
var seriesCount = stack.seriesCount || '';
|
|
66435
|
-
var seriesNumber = stack.seriesNumber || '';
|
|
66558
|
+
var seriesNumber = stack.seriesNumber.toString() || '';
|
|
66436
66559
|
var compression = getCompression$1(dicom);
|
|
66437
66560
|
var inPlanePhaseEncodingDirection = dicom.InPlanePhaseEncodingDirection.toString();
|
|
66438
|
-
var contentX = width -
|
|
66439
|
-
var contentY =
|
|
66561
|
+
var contentX = width - dicomInfoPaddingX;
|
|
66562
|
+
var contentY = dicomInfoPaddingY;
|
|
66440
66563
|
var spacing = dicomInfoSpacing;
|
|
66441
66564
|
|
|
66442
66565
|
if (studyDateTime) {
|
|
@@ -66470,8 +66593,8 @@ var drawRightBottom = function drawRightBottom(dicom, ctx, width, height, viewpo
|
|
|
66470
66593
|
var windowCenter = parseFloat(viewport.voi.windowCenter) || 0;
|
|
66471
66594
|
var acquisitionMatrix = dicom.AcquisitionMatrix.value;
|
|
66472
66595
|
var sliceLocation = dicom.SliceLocation.value && parseFloat(dicom.SliceLocation.value).toFixed(2);
|
|
66473
|
-
var contentX = width -
|
|
66474
|
-
var contentY = height -
|
|
66596
|
+
var contentX = width - dicomInfoPaddingX;
|
|
66597
|
+
var contentY = height - dicomInfoPaddingX;
|
|
66475
66598
|
var spacing = dicomInfoSpacing;
|
|
66476
66599
|
|
|
66477
66600
|
if (sliceLocation || sliceLocation === 0) {
|
|
@@ -66720,6 +66843,12 @@ var FilmPrintModal$1 = /*#__PURE__*/function (_Component) {
|
|
|
66720
66843
|
return FilmPrintModal;
|
|
66721
66844
|
}(React.Component);
|
|
66722
66845
|
|
|
66846
|
+
function _createForOfIteratorHelper$g(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$i(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
66847
|
+
|
|
66848
|
+
function _unsupportedIterableToArray$i(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$i(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$i(o, minLen); }
|
|
66849
|
+
|
|
66850
|
+
function _arrayLikeToArray$i(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
66851
|
+
|
|
66723
66852
|
function ownKeys$$(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
66724
66853
|
|
|
66725
66854
|
function _objectSpread$$(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$$(Object(source), true).forEach(function (key) { defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$$(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
@@ -66978,6 +67107,29 @@ var mergeProps$v = function mergeProps(propsFromState, propsFromDispatch, ownPro
|
|
|
66978
67107
|
}(),
|
|
66979
67108
|
onSelectSize: function onSelectSize(value) {
|
|
66980
67109
|
propsFromDispatch.setFilmSizeType(value.key);
|
|
67110
|
+
setTimeout(function () {
|
|
67111
|
+
try {
|
|
67112
|
+
var layoutElements = lodash$1.map(Array(propsFromState.filmLayoutCol * propsFromState.filmLayoutRow), function (v, n) {
|
|
67113
|
+
return getFilmElement(n);
|
|
67114
|
+
});
|
|
67115
|
+
|
|
67116
|
+
var _iterator = _createForOfIteratorHelper$g(layoutElements),
|
|
67117
|
+
_step;
|
|
67118
|
+
|
|
67119
|
+
try {
|
|
67120
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
67121
|
+
var element = _step.value;
|
|
67122
|
+
cornerstone.resize(element, true);
|
|
67123
|
+
}
|
|
67124
|
+
} catch (err) {
|
|
67125
|
+
_iterator.e(err);
|
|
67126
|
+
} finally {
|
|
67127
|
+
_iterator.f();
|
|
67128
|
+
}
|
|
67129
|
+
} catch (e) {
|
|
67130
|
+
console.log('ignore element not enabled event');
|
|
67131
|
+
}
|
|
67132
|
+
});
|
|
66981
67133
|
},
|
|
66982
67134
|
reset: function reset() {
|
|
66983
67135
|
if (propsFromState.filmActiveIndex >= 0) {
|
|
@@ -67110,6 +67262,9 @@ var FilmViewport = /*#__PURE__*/function (_Component) {
|
|
|
67110
67262
|
cornerstone.displayImage(_this.element, image);
|
|
67111
67263
|
|
|
67112
67264
|
if (!nextStack) {
|
|
67265
|
+
cornerstoneTools.setToolActiveForElement(_this.element, 'OrientationMarkers');
|
|
67266
|
+
cornerstoneTools.setToolActiveForElement(_this.element, 'RulerOverlay');
|
|
67267
|
+
|
|
67113
67268
|
_this.setActiveTool();
|
|
67114
67269
|
}
|
|
67115
67270
|
}
|
|
@@ -67276,7 +67431,8 @@ var FilmViewport = /*#__PURE__*/function (_Component) {
|
|
|
67276
67431
|
loading = _this$state.loading;
|
|
67277
67432
|
var _this$props = this.props,
|
|
67278
67433
|
index = _this$props.index,
|
|
67279
|
-
onClick = _this$props.onClick
|
|
67434
|
+
onClick = _this$props.onClick,
|
|
67435
|
+
overlayFontSize = _this$props.overlayFontSize;
|
|
67280
67436
|
var imageId = stack && stack.imageIds[0];
|
|
67281
67437
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
67282
67438
|
className: "paladin-film-viewport-wrapper"
|
|
@@ -67300,7 +67456,8 @@ var FilmViewport = /*#__PURE__*/function (_Component) {
|
|
|
67300
67456
|
}, "1"), /*#__PURE__*/React__default.createElement(ViewportOverlay, {
|
|
67301
67457
|
viewport: viewport,
|
|
67302
67458
|
imageId: imageId,
|
|
67303
|
-
stack: stack
|
|
67459
|
+
stack: stack,
|
|
67460
|
+
fontSize: overlayFontSize
|
|
67304
67461
|
})));
|
|
67305
67462
|
}
|
|
67306
67463
|
}]);
|
|
@@ -67415,7 +67572,8 @@ var FilmView = /*#__PURE__*/function (_Component) {
|
|
|
67415
67572
|
|
|
67416
67573
|
_this.state = {
|
|
67417
67574
|
filmViewWidth: 0,
|
|
67418
|
-
filmViewHeight: 0
|
|
67575
|
+
filmViewHeight: 0,
|
|
67576
|
+
overlayFontSize: 12
|
|
67419
67577
|
};
|
|
67420
67578
|
_this.filmViewRef = null;
|
|
67421
67579
|
return _this;
|
|
@@ -67432,12 +67590,19 @@ var FilmView = /*#__PURE__*/function (_Component) {
|
|
|
67432
67590
|
if (prevProps.filmSizeType !== this.props.filmSizeType) {
|
|
67433
67591
|
this.calcViewSize();
|
|
67434
67592
|
}
|
|
67593
|
+
|
|
67594
|
+
if (prevProps.filmLayoutRow !== this.props.filmLayoutRow || prevProps.filmLayoutCol !== this.props.filmLayoutCol) {
|
|
67595
|
+
this.calcViewSize();
|
|
67596
|
+
}
|
|
67435
67597
|
} // 计算复合胶片尺寸的宽高
|
|
67436
67598
|
|
|
67437
67599
|
}, {
|
|
67438
67600
|
key: "calcViewSize",
|
|
67439
67601
|
value: function calcViewSize() {
|
|
67440
|
-
var
|
|
67602
|
+
var _this$props3 = this.props,
|
|
67603
|
+
filmSizeType = _this$props3.filmSizeType,
|
|
67604
|
+
row = _this$props3.filmLayoutRow,
|
|
67605
|
+
col = _this$props3.filmLayoutCol;
|
|
67441
67606
|
var headerHeight = 40;
|
|
67442
67607
|
var verticalPadding = 40;
|
|
67443
67608
|
var verticalHeight = headerHeight + verticalPadding;
|
|
@@ -67452,11 +67617,41 @@ var FilmView = /*#__PURE__*/function (_Component) {
|
|
|
67452
67617
|
} else {
|
|
67453
67618
|
filmViewWidth = clientWidth * 0.8;
|
|
67454
67619
|
filmViewHeight = lodash$1.round(filmViewWidth * _size.height / _size.width);
|
|
67620
|
+
} // 四角信息字体大小
|
|
67621
|
+
|
|
67622
|
+
|
|
67623
|
+
var _overlayFontSize = 12;
|
|
67624
|
+
|
|
67625
|
+
var filmViewWidthItem = lodash$1.round(filmViewWidth / col);
|
|
67626
|
+
|
|
67627
|
+
var filmViewHeightItem = lodash$1.round(filmViewHeight / row);
|
|
67628
|
+
|
|
67629
|
+
var baseLength = Math.min(filmViewWidthItem, filmViewHeightItem);
|
|
67630
|
+
|
|
67631
|
+
if (baseLength > 200) {
|
|
67632
|
+
_overlayFontSize = 14;
|
|
67633
|
+
}
|
|
67634
|
+
|
|
67635
|
+
if (baseLength > 300) {
|
|
67636
|
+
_overlayFontSize = 15;
|
|
67637
|
+
}
|
|
67638
|
+
|
|
67639
|
+
if (baseLength > 400) {
|
|
67640
|
+
_overlayFontSize = 17;
|
|
67641
|
+
}
|
|
67642
|
+
|
|
67643
|
+
if (baseLength > 500) {
|
|
67644
|
+
_overlayFontSize = 19;
|
|
67645
|
+
}
|
|
67646
|
+
|
|
67647
|
+
if (baseLength > 600) {
|
|
67648
|
+
_overlayFontSize = 21;
|
|
67455
67649
|
}
|
|
67456
67650
|
|
|
67457
67651
|
this.setState({
|
|
67458
67652
|
filmViewWidth: filmViewWidth,
|
|
67459
|
-
filmViewHeight: filmViewHeight
|
|
67653
|
+
filmViewHeight: filmViewHeight,
|
|
67654
|
+
overlayFontSize: _overlayFontSize
|
|
67460
67655
|
});
|
|
67461
67656
|
}
|
|
67462
67657
|
}, {
|
|
@@ -67464,18 +67659,19 @@ var FilmView = /*#__PURE__*/function (_Component) {
|
|
|
67464
67659
|
value: function render() {
|
|
67465
67660
|
var _this2 = this;
|
|
67466
67661
|
|
|
67467
|
-
var _this$
|
|
67468
|
-
films = _this$
|
|
67469
|
-
row = _this$
|
|
67470
|
-
col = _this$
|
|
67471
|
-
handleOnClickViewport = _this$
|
|
67472
|
-
filmActiveIndex = _this$
|
|
67473
|
-
_onViewportSave = _this$
|
|
67474
|
-
filmCurrentPage = _this$
|
|
67475
|
-
filmActiveTool = _this$
|
|
67662
|
+
var _this$props4 = this.props,
|
|
67663
|
+
films = _this$props4.films,
|
|
67664
|
+
row = _this$props4.filmLayoutRow,
|
|
67665
|
+
col = _this$props4.filmLayoutCol,
|
|
67666
|
+
handleOnClickViewport = _this$props4.handleOnClickViewport,
|
|
67667
|
+
filmActiveIndex = _this$props4.filmActiveIndex,
|
|
67668
|
+
_onViewportSave = _this$props4.onViewportSave,
|
|
67669
|
+
filmCurrentPage = _this$props4.filmCurrentPage,
|
|
67670
|
+
filmActiveTool = _this$props4.filmActiveTool;
|
|
67476
67671
|
var _this$state = this.state,
|
|
67477
67672
|
filmViewWidth = _this$state.filmViewWidth,
|
|
67478
|
-
filmViewHeight = _this$state.filmViewHeight
|
|
67673
|
+
filmViewHeight = _this$state.filmViewHeight,
|
|
67674
|
+
overlayFontSize = _this$state.overlayFontSize;
|
|
67479
67675
|
|
|
67480
67676
|
var totalPage = lodash$1.ceil(films.length / (row * col));
|
|
67481
67677
|
|
|
@@ -67553,7 +67749,8 @@ var FilmView = /*#__PURE__*/function (_Component) {
|
|
|
67553
67749
|
active: filmActiveIndex === index,
|
|
67554
67750
|
onViewportSave: function onViewportSave(vp) {
|
|
67555
67751
|
_onViewportSave && _onViewportSave(realIndex, vp);
|
|
67556
|
-
}
|
|
67752
|
+
},
|
|
67753
|
+
overlayFontSize: overlayFontSize
|
|
67557
67754
|
}));
|
|
67558
67755
|
}));
|
|
67559
67756
|
})));
|
|
@@ -67632,11 +67829,11 @@ var ConnectedFilmView = reactRedux.connect(mapStateToProps$y, {
|
|
|
67632
67829
|
setFilmCurrentPage: setFilmCurrentPage
|
|
67633
67830
|
}, mergeProps$w)(FilmView);
|
|
67634
67831
|
|
|
67635
|
-
function _createForOfIteratorHelper$
|
|
67832
|
+
function _createForOfIteratorHelper$h(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$j(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
67636
67833
|
|
|
67637
|
-
function _unsupportedIterableToArray$
|
|
67834
|
+
function _unsupportedIterableToArray$j(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$j(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$j(o, minLen); }
|
|
67638
67835
|
|
|
67639
|
-
function _arrayLikeToArray$
|
|
67836
|
+
function _arrayLikeToArray$j(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
67640
67837
|
|
|
67641
67838
|
function _createSuper$1M(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1M(); return function _createSuperInternal() { var Super = getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return possibleConstructorReturn(this, result); }; }
|
|
67642
67839
|
|
|
@@ -67869,7 +68066,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
|
|
|
67869
68066
|
return getElement(n);
|
|
67870
68067
|
});
|
|
67871
68068
|
|
|
67872
|
-
var _iterator = _createForOfIteratorHelper$
|
|
68069
|
+
var _iterator = _createForOfIteratorHelper$h(layoutElements),
|
|
67873
68070
|
_step;
|
|
67874
68071
|
|
|
67875
68072
|
try {
|
|
@@ -67973,7 +68170,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
|
|
|
67973
68170
|
cornerstoneTools.globalImageIdSpecificToolStateManager.restoreToolState(value.toolState);
|
|
67974
68171
|
}
|
|
67975
68172
|
|
|
67976
|
-
var _iterator2 = _createForOfIteratorHelper$
|
|
68173
|
+
var _iterator2 = _createForOfIteratorHelper$h(elements),
|
|
67977
68174
|
_step2;
|
|
67978
68175
|
|
|
67979
68176
|
try {
|
|
@@ -68054,7 +68251,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
|
|
|
68054
68251
|
return getElement(n);
|
|
68055
68252
|
});
|
|
68056
68253
|
|
|
68057
|
-
var _iterator3 = _createForOfIteratorHelper$
|
|
68254
|
+
var _iterator3 = _createForOfIteratorHelper$h(layoutElements),
|
|
68058
68255
|
_step3;
|
|
68059
68256
|
|
|
68060
68257
|
try {
|
|
@@ -68127,7 +68324,7 @@ var DicomView = /*#__PURE__*/function (_Component) {
|
|
|
68127
68324
|
return getElement(n);
|
|
68128
68325
|
});
|
|
68129
68326
|
|
|
68130
|
-
var _iterator4 = _createForOfIteratorHelper$
|
|
68327
|
+
var _iterator4 = _createForOfIteratorHelper$h(elements),
|
|
68131
68328
|
_step4;
|
|
68132
68329
|
|
|
68133
68330
|
try {
|
|
@@ -68310,11 +68507,11 @@ var DicomView = /*#__PURE__*/function (_Component) {
|
|
|
68310
68507
|
return DicomView;
|
|
68311
68508
|
}(React.Component);
|
|
68312
68509
|
|
|
68313
|
-
function _createForOfIteratorHelper$
|
|
68510
|
+
function _createForOfIteratorHelper$i(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray$k(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
68314
68511
|
|
|
68315
|
-
function _unsupportedIterableToArray$
|
|
68512
|
+
function _unsupportedIterableToArray$k(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray$k(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$k(o, minLen); }
|
|
68316
68513
|
|
|
68317
|
-
function _arrayLikeToArray$
|
|
68514
|
+
function _arrayLikeToArray$k(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
68318
68515
|
|
|
68319
68516
|
function ownKeys$11(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
68320
68517
|
|
|
@@ -68948,7 +69145,7 @@ var mergeProps$x = function mergeProps(propsFromState, propsFromDispatch, ownPro
|
|
|
68948
69145
|
return getElement(n);
|
|
68949
69146
|
});
|
|
68950
69147
|
|
|
68951
|
-
var _iterator = _createForOfIteratorHelper$
|
|
69148
|
+
var _iterator = _createForOfIteratorHelper$i(layoutElements),
|
|
68952
69149
|
_step;
|
|
68953
69150
|
|
|
68954
69151
|
try {
|