dcmjs 0.39.0 → 0.41.0
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/build/dcmjs.es.js +123 -103
- package/build/dcmjs.es.js.map +1 -1
- package/build/dcmjs.js +123 -103
- package/build/dcmjs.js.map +1 -1
- package/package.json +1 -1
package/build/dcmjs.es.js
CHANGED
|
@@ -8520,6 +8520,7 @@ DicomMetaDictionary.sopClassNamesByUID = {
|
|
|
8520
8520
|
"1.2.840.10008.5.1.4.1.1.88.11": "BasicTextSR",
|
|
8521
8521
|
"1.2.840.10008.5.1.4.1.1.88.22": "EnhancedSR",
|
|
8522
8522
|
"1.2.840.10008.5.1.4.1.1.88.33": "ComprehensiveSR",
|
|
8523
|
+
"1.2.840.10008.5.1.4.1.1.88.34": "Comprehensive3DSR",
|
|
8523
8524
|
"1.2.840.10008.5.1.4.1.1.128": "PETImage",
|
|
8524
8525
|
"1.2.840.10008.5.1.4.1.1.130": "EnhancedPETImage",
|
|
8525
8526
|
"1.2.840.10008.5.1.4.1.1.128.1": "LegacyConvertedEnhancedPETImage",
|
|
@@ -12810,6 +12811,31 @@ var TID300Measurement = /*#__PURE__*/function () {
|
|
|
12810
12811
|
};
|
|
12811
12812
|
});
|
|
12812
12813
|
}
|
|
12814
|
+
|
|
12815
|
+
/**
|
|
12816
|
+
* Expands an array of points stored as objects into a flattened array of points
|
|
12817
|
+
*
|
|
12818
|
+
* @param param.points [{x: 0, y: 1}, {x: 1, y: 2}] or [{x: 0, y: 1, z: 0}, {x: 1, y: 2, z: 0}]
|
|
12819
|
+
* @param param.use3DSpatialCoordinates boolean: true for 3D points and false for 2D points.
|
|
12820
|
+
*
|
|
12821
|
+
* @return {Array} [point1x, point1y, point2x, point2y] or [point1x, point1y, point1z, point2x, point2y, point2z]
|
|
12822
|
+
*/
|
|
12823
|
+
}, {
|
|
12824
|
+
key: "flattenPoints",
|
|
12825
|
+
value: function flattenPoints(_ref) {
|
|
12826
|
+
var points = _ref.points,
|
|
12827
|
+
_ref$use3DSpatialCoor = _ref.use3DSpatialCoordinates,
|
|
12828
|
+
use3DSpatialCoordinates = _ref$use3DSpatialCoor === void 0 ? false : _ref$use3DSpatialCoor;
|
|
12829
|
+
var flattenedCoordinates = [];
|
|
12830
|
+
points.forEach(function (point) {
|
|
12831
|
+
flattenedCoordinates.push(point[0] || point.x);
|
|
12832
|
+
flattenedCoordinates.push(point[1] || point.y);
|
|
12833
|
+
if (use3DSpatialCoordinates) {
|
|
12834
|
+
flattenedCoordinates.push(point[2] || point.z);
|
|
12835
|
+
}
|
|
12836
|
+
});
|
|
12837
|
+
return flattenedCoordinates;
|
|
12838
|
+
}
|
|
12813
12839
|
}]);
|
|
12814
12840
|
return TID300Measurement;
|
|
12815
12841
|
}();
|
|
@@ -12872,8 +12898,15 @@ var Length$2 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
12872
12898
|
point2 = _this$props.point2,
|
|
12873
12899
|
_this$props$unit = _this$props.unit,
|
|
12874
12900
|
unit = _this$props$unit === void 0 ? "mm" : _this$props$unit,
|
|
12901
|
+
_this$props$use3DSpat = _this$props.use3DSpatialCoordinates,
|
|
12902
|
+
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat,
|
|
12875
12903
|
distance = _this$props.distance,
|
|
12876
|
-
ReferencedSOPSequence = _this$props.ReferencedSOPSequence
|
|
12904
|
+
ReferencedSOPSequence = _this$props.ReferencedSOPSequence,
|
|
12905
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
12906
|
+
var GraphicData = this.flattenPoints({
|
|
12907
|
+
points: [point1, point2],
|
|
12908
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
12909
|
+
});
|
|
12877
12910
|
return this.getMeasurement([{
|
|
12878
12911
|
RelationshipType: "CONTAINS",
|
|
12879
12912
|
ValueType: "NUM",
|
|
@@ -12888,10 +12921,11 @@ var Length$2 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
12888
12921
|
},
|
|
12889
12922
|
ContentSequence: {
|
|
12890
12923
|
RelationshipType: "INFERRED FROM",
|
|
12891
|
-
ValueType: "SCOORD",
|
|
12924
|
+
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
12892
12925
|
GraphicType: "POLYLINE",
|
|
12893
|
-
GraphicData:
|
|
12894
|
-
|
|
12926
|
+
GraphicData: GraphicData,
|
|
12927
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
12928
|
+
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
12895
12929
|
RelationshipType: "SELECTED FROM",
|
|
12896
12930
|
ValueType: "IMAGE",
|
|
12897
12931
|
ReferencedSOPSequence: ReferencedSOPSequence
|
|
@@ -12981,24 +13015,6 @@ Length$1.isValidCornerstoneTrackingIdentifier = function (TrackingIdentifier) {
|
|
|
12981
13015
|
};
|
|
12982
13016
|
MeasurementReport$3.registerTool(Length$1);
|
|
12983
13017
|
|
|
12984
|
-
/**
|
|
12985
|
-
* Expand an array of points stored as objects into
|
|
12986
|
-
* a flattened array of points
|
|
12987
|
-
*
|
|
12988
|
-
* @param points [{x: 0, y: 1}, {x: 1, y: 2}] or [{x: 0, y: 1, z: 0}, {x: 1, y: 2, z: 0}]
|
|
12989
|
-
* @return {Array} [point1x, point1y, point2x, point2y] or [point1x, point1y, point1z, point2x, point2y, point2z]
|
|
12990
|
-
*/
|
|
12991
|
-
function expandPoints$3(points) {
|
|
12992
|
-
var allPoints = [];
|
|
12993
|
-
points.forEach(function (point) {
|
|
12994
|
-
allPoints.push(point[0] || point.x);
|
|
12995
|
-
allPoints.push(point[1] || point.y);
|
|
12996
|
-
if (point[2] !== undefined || point.z !== undefined) {
|
|
12997
|
-
allPoints.push(point[2] || point.z);
|
|
12998
|
-
}
|
|
12999
|
-
});
|
|
13000
|
-
return allPoints;
|
|
13001
|
-
}
|
|
13002
13018
|
var Polyline$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
13003
13019
|
_inherits(Polyline, _TID300Measurement);
|
|
13004
13020
|
function Polyline() {
|
|
@@ -13018,8 +13034,12 @@ var Polyline$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13018
13034
|
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat,
|
|
13019
13035
|
perimeter = _this$props.perimeter,
|
|
13020
13036
|
_this$props$unit = _this$props.unit,
|
|
13021
|
-
unit = _this$props$unit === void 0 ? "mm" : _this$props$unit
|
|
13022
|
-
|
|
13037
|
+
unit = _this$props$unit === void 0 ? "mm" : _this$props$unit,
|
|
13038
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
13039
|
+
var GraphicData = this.flattenPoints({
|
|
13040
|
+
points: points,
|
|
13041
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
13042
|
+
});
|
|
13023
13043
|
|
|
13024
13044
|
// TODO: Add Mean and STDev value of (modality?) pixels
|
|
13025
13045
|
return this.getMeasurement([{
|
|
@@ -13039,6 +13059,7 @@ var Polyline$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13039
13059
|
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
13040
13060
|
GraphicType: "POLYLINE",
|
|
13041
13061
|
GraphicData: GraphicData,
|
|
13062
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
13042
13063
|
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
13043
13064
|
RelationshipType: "SELECTED FROM",
|
|
13044
13065
|
ValueType: "IMAGE",
|
|
@@ -13063,6 +13084,7 @@ var Polyline$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13063
13084
|
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
13064
13085
|
GraphicType: "POLYLINE",
|
|
13065
13086
|
GraphicData: GraphicData,
|
|
13087
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
13066
13088
|
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
13067
13089
|
RelationshipType: "SELECTED FROM",
|
|
13068
13090
|
ValueType: "IMAGE",
|
|
@@ -13173,7 +13195,18 @@ var Bidirectional$2 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13173
13195
|
longAxisLength = _this$props.longAxisLength,
|
|
13174
13196
|
shortAxisLength = _this$props.shortAxisLength,
|
|
13175
13197
|
unit = _this$props.unit,
|
|
13176
|
-
|
|
13198
|
+
_this$props$use3DSpat = _this$props.use3DSpatialCoordinates,
|
|
13199
|
+
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat,
|
|
13200
|
+
ReferencedSOPSequence = _this$props.ReferencedSOPSequence,
|
|
13201
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
13202
|
+
var longAxisGraphicData = this.flattenPoints({
|
|
13203
|
+
points: [longAxis.point1, longAxis.point2],
|
|
13204
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
13205
|
+
});
|
|
13206
|
+
var shortAxisGraphicData = this.flattenPoints({
|
|
13207
|
+
points: [shortAxis.point1, shortAxis.point2],
|
|
13208
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
13209
|
+
});
|
|
13177
13210
|
return this.getMeasurement([{
|
|
13178
13211
|
RelationshipType: "CONTAINS",
|
|
13179
13212
|
ValueType: "NUM",
|
|
@@ -13188,10 +13221,11 @@ var Bidirectional$2 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13188
13221
|
},
|
|
13189
13222
|
ContentSequence: {
|
|
13190
13223
|
RelationshipType: "INFERRED FROM",
|
|
13191
|
-
ValueType: "SCOORD",
|
|
13224
|
+
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
13192
13225
|
GraphicType: "POLYLINE",
|
|
13193
|
-
GraphicData:
|
|
13194
|
-
|
|
13226
|
+
GraphicData: longAxisGraphicData,
|
|
13227
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
13228
|
+
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
13195
13229
|
RelationshipType: "SELECTED FROM",
|
|
13196
13230
|
ValueType: "IMAGE",
|
|
13197
13231
|
ReferencedSOPSequence: ReferencedSOPSequence
|
|
@@ -13211,10 +13245,11 @@ var Bidirectional$2 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13211
13245
|
},
|
|
13212
13246
|
ContentSequence: {
|
|
13213
13247
|
RelationshipType: "INFERRED FROM",
|
|
13214
|
-
ValueType: "SCOORD",
|
|
13248
|
+
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
13215
13249
|
GraphicType: "POLYLINE",
|
|
13216
|
-
GraphicData:
|
|
13217
|
-
|
|
13250
|
+
GraphicData: shortAxisGraphicData,
|
|
13251
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
13252
|
+
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
13218
13253
|
RelationshipType: "SELECTED FROM",
|
|
13219
13254
|
ValueType: "IMAGE",
|
|
13220
13255
|
ReferencedSOPSequence: ReferencedSOPSequence
|
|
@@ -13388,21 +13423,6 @@ Bidirectional$1.isValidCornerstoneTrackingIdentifier = function (TrackingIdentif
|
|
|
13388
13423
|
};
|
|
13389
13424
|
MeasurementReport$3.registerTool(Bidirectional$1);
|
|
13390
13425
|
|
|
13391
|
-
/**
|
|
13392
|
-
* Expand an array of points stored as objects into
|
|
13393
|
-
* a flattened array of points
|
|
13394
|
-
*
|
|
13395
|
-
* @param points
|
|
13396
|
-
* @return {Array}
|
|
13397
|
-
*/
|
|
13398
|
-
function expandPoints$2(points) {
|
|
13399
|
-
var allPoints = [];
|
|
13400
|
-
points.forEach(function (point) {
|
|
13401
|
-
allPoints.push(point.x);
|
|
13402
|
-
allPoints.push(point.y);
|
|
13403
|
-
});
|
|
13404
|
-
return allPoints;
|
|
13405
|
-
}
|
|
13406
13426
|
var Ellipse$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
13407
13427
|
_inherits(Ellipse, _TID300Measurement);
|
|
13408
13428
|
function Ellipse() {
|
|
@@ -13414,10 +13434,16 @@ var Ellipse$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13414
13434
|
value: function contentItem() {
|
|
13415
13435
|
var _this$props = this.props,
|
|
13416
13436
|
points = _this$props.points,
|
|
13437
|
+
_this$props$use3DSpat = _this$props.use3DSpatialCoordinates,
|
|
13438
|
+
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat,
|
|
13417
13439
|
ReferencedSOPSequence = _this$props.ReferencedSOPSequence,
|
|
13418
13440
|
area = _this$props.area,
|
|
13419
|
-
areaUnit = _this$props.areaUnit
|
|
13420
|
-
|
|
13441
|
+
areaUnit = _this$props.areaUnit,
|
|
13442
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
13443
|
+
var GraphicData = this.flattenPoints({
|
|
13444
|
+
points: points,
|
|
13445
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
13446
|
+
});
|
|
13421
13447
|
return this.getMeasurement([{
|
|
13422
13448
|
RelationshipType: "CONTAINS",
|
|
13423
13449
|
ValueType: "NUM",
|
|
@@ -13432,10 +13458,11 @@ var Ellipse$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13432
13458
|
},
|
|
13433
13459
|
ContentSequence: {
|
|
13434
13460
|
RelationshipType: "INFERRED FROM",
|
|
13435
|
-
ValueType: "SCOORD",
|
|
13461
|
+
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
13436
13462
|
GraphicType: "ELLIPSE",
|
|
13437
13463
|
GraphicData: GraphicData,
|
|
13438
|
-
|
|
13464
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
13465
|
+
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
13439
13466
|
RelationshipType: "SELECTED FROM",
|
|
13440
13467
|
ValueType: "IMAGE",
|
|
13441
13468
|
ReferencedSOPSequence: ReferencedSOPSequence
|
|
@@ -13619,21 +13646,6 @@ EllipticalRoi.isValidCornerstoneTrackingIdentifier = function (TrackingIdentifie
|
|
|
13619
13646
|
};
|
|
13620
13647
|
MeasurementReport$3.registerTool(EllipticalRoi);
|
|
13621
13648
|
|
|
13622
|
-
/**
|
|
13623
|
-
* Expand an array of points stored as objects into
|
|
13624
|
-
* a flattened array of points
|
|
13625
|
-
*
|
|
13626
|
-
* @param points [{x: 0, y: 1}, {x: 1, y: 2}] or [{x: 0, y: 1, z: 0}, {x: 1, y: 2, z: 0}]
|
|
13627
|
-
* @return {Array} [point1x, point1y, point2x, point2y] or [point1x, point1y, point1z, point2x, point2y, point2z]
|
|
13628
|
-
*/
|
|
13629
|
-
function expandPoints$1(points) {
|
|
13630
|
-
var allPoints = [];
|
|
13631
|
-
points.forEach(function (point) {
|
|
13632
|
-
allPoints.push(point.x);
|
|
13633
|
-
allPoints.push(point.y);
|
|
13634
|
-
});
|
|
13635
|
-
return allPoints;
|
|
13636
|
-
}
|
|
13637
13649
|
var Circle$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
13638
13650
|
_inherits(Circle, _TID300Measurement);
|
|
13639
13651
|
function Circle() {
|
|
@@ -13653,13 +13665,17 @@ var Circle$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13653
13665
|
_this$props$areaUnit = _this$props.areaUnit,
|
|
13654
13666
|
areaUnit = _this$props$areaUnit === void 0 ? "mm2" : _this$props$areaUnit,
|
|
13655
13667
|
_this$props$unit = _this$props.unit,
|
|
13656
|
-
unit = _this$props$unit === void 0 ? "mm" : _this$props$unit
|
|
13668
|
+
unit = _this$props$unit === void 0 ? "mm" : _this$props$unit,
|
|
13669
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
13657
13670
|
|
|
13658
13671
|
// Combine all lengths to save the perimeter
|
|
13659
13672
|
// @ToDO The permiter has to be implemented
|
|
13660
13673
|
// const reducer = (accumulator, currentValue) => accumulator + currentValue;
|
|
13661
13674
|
// const perimeter = lengths.reduce(reducer);
|
|
13662
|
-
var GraphicData =
|
|
13675
|
+
var GraphicData = this.flattenPoints({
|
|
13676
|
+
points: points,
|
|
13677
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
13678
|
+
});
|
|
13663
13679
|
|
|
13664
13680
|
// TODO: Add Mean and STDev value of (modality?) pixels
|
|
13665
13681
|
|
|
@@ -13680,6 +13696,7 @@ var Circle$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13680
13696
|
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
13681
13697
|
GraphicType: "CIRCLE",
|
|
13682
13698
|
GraphicData: GraphicData,
|
|
13699
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
13683
13700
|
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
13684
13701
|
RelationshipType: "SELECTED FROM",
|
|
13685
13702
|
ValueType: "IMAGE",
|
|
@@ -13845,14 +13862,13 @@ var Point$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13845
13862
|
points = _this$props.points,
|
|
13846
13863
|
ReferencedSOPSequence = _this$props.ReferencedSOPSequence,
|
|
13847
13864
|
_this$props$use3DSpat = _this$props.use3DSpatialCoordinates,
|
|
13848
|
-
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat
|
|
13849
|
-
|
|
13850
|
-
|
|
13851
|
-
|
|
13852
|
-
|
|
13853
|
-
|
|
13854
|
-
|
|
13855
|
-
}
|
|
13865
|
+
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat,
|
|
13866
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
13867
|
+
var GraphicData = this.flattenPoints({
|
|
13868
|
+
// Allow storing another point as part of an indicator showing a single point
|
|
13869
|
+
points: points.slice(0, 2),
|
|
13870
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
13871
|
+
});
|
|
13856
13872
|
return this.getMeasurement([{
|
|
13857
13873
|
RelationshipType: "CONTAINS",
|
|
13858
13874
|
ValueType: "NUM",
|
|
@@ -13867,6 +13883,7 @@ var Point$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
13867
13883
|
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
13868
13884
|
GraphicType: "POINT",
|
|
13869
13885
|
GraphicData: GraphicData,
|
|
13886
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
13870
13887
|
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
13871
13888
|
RelationshipType: "SELECTED FROM",
|
|
13872
13889
|
ValueType: "IMAGE",
|
|
@@ -17832,7 +17849,13 @@ var CobbAngle$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
17832
17849
|
point3 = _this$props.point3,
|
|
17833
17850
|
point4 = _this$props.point4,
|
|
17834
17851
|
rAngle = _this$props.rAngle,
|
|
17835
|
-
|
|
17852
|
+
use3DSpatialCoordinates = _this$props.use3DSpatialCoordinates,
|
|
17853
|
+
ReferencedSOPSequence = _this$props.ReferencedSOPSequence,
|
|
17854
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
17855
|
+
var GraphicData = this.flattenPoints({
|
|
17856
|
+
points: [point1, point2, point3, point4],
|
|
17857
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
17858
|
+
});
|
|
17836
17859
|
return this.getMeasurement([{
|
|
17837
17860
|
RelationshipType: "CONTAINS",
|
|
17838
17861
|
ValueType: "NUM",
|
|
@@ -17852,10 +17875,11 @@ var CobbAngle$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
17852
17875
|
},
|
|
17853
17876
|
ContentSequence: {
|
|
17854
17877
|
RelationshipType: "INFERRED FROM",
|
|
17855
|
-
ValueType: "SCOORD",
|
|
17878
|
+
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
17856
17879
|
GraphicType: "POLYLINE",
|
|
17857
|
-
GraphicData:
|
|
17858
|
-
|
|
17880
|
+
GraphicData: GraphicData,
|
|
17881
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
17882
|
+
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
17859
17883
|
RelationshipType: "SELECTED FROM",
|
|
17860
17884
|
ValueType: "IMAGE",
|
|
17861
17885
|
ReferencedSOPSequence: ReferencedSOPSequence
|
|
@@ -20444,24 +20468,6 @@ Polyline.utilityToolType = "Polyline";
|
|
|
20444
20468
|
Polyline.TID300Representation = Polyline$1;
|
|
20445
20469
|
MeasurementReport$1.registerTool(Polyline);
|
|
20446
20470
|
|
|
20447
|
-
/**
|
|
20448
|
-
* Expand an array of points stored as objects into
|
|
20449
|
-
* a flattened array of points
|
|
20450
|
-
*
|
|
20451
|
-
* @param points [{x: 0, y: 1}, {x: 1, y: 2}] or [{x: 0, y: 1, z: 0}, {x: 1, y: 2, z: 0}]
|
|
20452
|
-
* @return {Array} [point1x, point1y, point2x, point2y] or [point1x, point1y, point1z, point2x, point2y, point2z]
|
|
20453
|
-
*/
|
|
20454
|
-
function expandPoints(points) {
|
|
20455
|
-
var allPoints = [];
|
|
20456
|
-
points.forEach(function (point) {
|
|
20457
|
-
allPoints.push(point[0]);
|
|
20458
|
-
allPoints.push(point[1]);
|
|
20459
|
-
if (point[2] !== undefined) {
|
|
20460
|
-
allPoints.push(point[2]);
|
|
20461
|
-
}
|
|
20462
|
-
});
|
|
20463
|
-
return allPoints;
|
|
20464
|
-
}
|
|
20465
20471
|
var Polygon$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
20466
20472
|
_inherits(Polygon, _TID300Measurement);
|
|
20467
20473
|
function Polygon() {
|
|
@@ -20480,8 +20486,12 @@ var Polygon$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
20480
20486
|
areaUnit = _this$props.areaUnit,
|
|
20481
20487
|
ReferencedSOPSequence = _this$props.ReferencedSOPSequence,
|
|
20482
20488
|
_this$props$use3DSpat = _this$props.use3DSpatialCoordinates,
|
|
20483
|
-
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat
|
|
20484
|
-
|
|
20489
|
+
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat,
|
|
20490
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
20491
|
+
var GraphicData = this.flattenPoints({
|
|
20492
|
+
points: points,
|
|
20493
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
20494
|
+
});
|
|
20485
20495
|
return this.getMeasurement([{
|
|
20486
20496
|
RelationshipType: "CONTAINS",
|
|
20487
20497
|
ValueType: "NUM",
|
|
@@ -20499,6 +20509,7 @@ var Polygon$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
20499
20509
|
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
20500
20510
|
GraphicType: "POLYGON",
|
|
20501
20511
|
GraphicData: GraphicData,
|
|
20512
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
20502
20513
|
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
20503
20514
|
RelationshipType: "SELECTED FROM",
|
|
20504
20515
|
ValueType: "IMAGE",
|
|
@@ -20522,6 +20533,7 @@ var Polygon$1 = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
20522
20533
|
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
20523
20534
|
GraphicType: "POLYGON",
|
|
20524
20535
|
GraphicData: GraphicData,
|
|
20536
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
20525
20537
|
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
20526
20538
|
RelationshipType: "SELECTED FROM",
|
|
20527
20539
|
ValueType: "IMAGE",
|
|
@@ -20756,8 +20768,15 @@ var Calibration = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
20756
20768
|
point2 = _this$props.point2,
|
|
20757
20769
|
_this$props$unit = _this$props.unit,
|
|
20758
20770
|
unit = _this$props$unit === void 0 ? "mm" : _this$props$unit,
|
|
20771
|
+
_this$props$use3DSpat = _this$props.use3DSpatialCoordinates,
|
|
20772
|
+
use3DSpatialCoordinates = _this$props$use3DSpat === void 0 ? false : _this$props$use3DSpat,
|
|
20759
20773
|
distance = _this$props.distance,
|
|
20760
|
-
ReferencedSOPSequence = _this$props.ReferencedSOPSequence
|
|
20774
|
+
ReferencedSOPSequence = _this$props.ReferencedSOPSequence,
|
|
20775
|
+
ReferencedFrameOfReferenceUID = _this$props.ReferencedFrameOfReferenceUID;
|
|
20776
|
+
var GraphicData = this.flattenPoints({
|
|
20777
|
+
points: [point1, point2],
|
|
20778
|
+
use3DSpatialCoordinates: use3DSpatialCoordinates
|
|
20779
|
+
});
|
|
20761
20780
|
return this.getMeasurement([{
|
|
20762
20781
|
RelationshipType: "CONTAINS",
|
|
20763
20782
|
ValueType: "NUM",
|
|
@@ -20772,10 +20791,11 @@ var Calibration = /*#__PURE__*/function (_TID300Measurement) {
|
|
|
20772
20791
|
},
|
|
20773
20792
|
ContentSequence: {
|
|
20774
20793
|
RelationshipType: "INFERRED FROM",
|
|
20775
|
-
ValueType: "SCOORD",
|
|
20794
|
+
ValueType: use3DSpatialCoordinates ? "SCOORD3D" : "SCOORD",
|
|
20776
20795
|
GraphicType: "POLYLINE",
|
|
20777
|
-
GraphicData:
|
|
20778
|
-
|
|
20796
|
+
GraphicData: GraphicData,
|
|
20797
|
+
ReferencedFrameOfReferenceUID: use3DSpatialCoordinates ? ReferencedFrameOfReferenceUID : undefined,
|
|
20798
|
+
ContentSequence: use3DSpatialCoordinates ? undefined : {
|
|
20779
20799
|
RelationshipType: "SELECTED FROM",
|
|
20780
20800
|
ValueType: "IMAGE",
|
|
20781
20801
|
ReferencedSOPSequence: ReferencedSOPSequence
|