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