@cornerstonejs/adapters 4.15.28 → 4.15.30
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/dist/esm/adapters/Cornerstone/Angle.js +5 -3
- package/dist/esm/adapters/Cornerstone/ArrowAnnotate.js +6 -4
- package/dist/esm/adapters/Cornerstone/CircleRoi.js +9 -9
- package/dist/esm/adapters/Cornerstone/CobbAngle.js +5 -3
- package/dist/esm/adapters/Cornerstone/EllipticalRoi.js +5 -3
- package/dist/esm/adapters/Cornerstone/FreehandRoi.js +5 -3
- package/dist/esm/adapters/Cornerstone/Length.js +5 -3
- package/dist/esm/adapters/Cornerstone/MeasurementReport.js +1 -1
- package/dist/esm/adapters/Cornerstone/ParametricMap.js +3 -2
- package/dist/esm/adapters/Cornerstone/RectangleRoi.js +5 -3
- package/dist/esm/adapters/Cornerstone/Segmentation.js +3 -3
- package/dist/esm/adapters/Cornerstone/Segmentation_4X.js +10 -8
- package/dist/esm/adapters/Cornerstone3D/Angle.js +10 -8
- package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.js +7 -6
- package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.js +10 -10
- package/dist/esm/adapters/Cornerstone3D/Bidirectional.js +9 -8
- package/dist/esm/adapters/Cornerstone3D/CircleROI.js +11 -11
- package/dist/esm/adapters/Cornerstone3D/CobbAngle.js +9 -8
- package/dist/esm/adapters/Cornerstone3D/EllipticalROI.js +11 -11
- package/dist/esm/adapters/Cornerstone3D/KeyImage.js +3 -3
- package/dist/esm/adapters/Cornerstone3D/LabelData.js +2 -1
- package/dist/esm/adapters/Cornerstone3D/Length.js +9 -8
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.js +27 -25
- package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.js +12 -12
- package/dist/esm/adapters/Cornerstone3D/Probe.js +10 -8
- package/dist/esm/adapters/Cornerstone3D/RTStruct/RTSS.js +12 -8
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getRTROIObservationsSequence.js +4 -3
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getReferencedFrameOfReferenceSequence.js +1 -1
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getReferencedSeriesSequence.js +2 -2
- package/dist/esm/adapters/Cornerstone3D/RectangleROI.js +13 -12
- package/dist/esm/adapters/Cornerstone3D/Segmentation/generateSegmentation.js +12 -11
- package/dist/esm/adapters/Cornerstone3D/Segmentation/labelmapImagesFromBuffer.js +3 -2
- package/dist/esm/adapters/Cornerstone3D/UltrasoundDirectional.js +7 -6
- package/dist/esm/adapters/Cornerstone3D/constants/index.js +6 -3
- package/dist/esm/adapters/Cornerstone3D/metricHandler.js +4 -3
- package/dist/esm/adapters/helpers/getDatasetsFromImages.js +1 -1
- package/dist/esm/adapters/helpers/toPoint3.js +2 -2
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/defineProperty.js +12 -0
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/toPrimitive.js +14 -0
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js +9 -0
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/typeof.js +11 -0
- package/dist/esm/utilities/createInstance.js +1 -1
- package/dist/esm/utilities/referencedMetadataProvider.js +10 -10
- package/dist/esm/version.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
Angle: TID300Angle
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -16,8 +19,7 @@ class Angle {
|
|
|
16
19
|
NUMGroup,
|
|
17
20
|
SCOORDGroup
|
|
18
21
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup);
|
|
19
|
-
const state = {
|
|
20
|
-
...defaultState,
|
|
22
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
21
23
|
rAngle: NUMGroup.MeasuredValueSequence.NumericValue,
|
|
22
24
|
toolType: Angle.toolType,
|
|
23
25
|
handles: {
|
|
@@ -32,7 +34,7 @@ class Angle {
|
|
|
32
34
|
hasBoundingBox: true
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
|
-
};
|
|
37
|
+
});
|
|
36
38
|
[state.handles.start.x, state.handles.start.y, state.handles.middle.x, state.handles.middle.y, state.handles.middle.x, state.handles.middle.y, state.handles.end.x, state.handles.end.y] = SCOORDGroup.GraphicData;
|
|
37
39
|
return state;
|
|
38
40
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
Point: TID300Point
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -17,8 +20,7 @@ class ArrowAnnotate {
|
|
|
17
20
|
const {
|
|
18
21
|
GraphicData
|
|
19
22
|
} = SCOORDGroup;
|
|
20
|
-
const state = {
|
|
21
|
-
...defaultState,
|
|
23
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
22
24
|
toolType: ArrowAnnotate.toolType,
|
|
23
25
|
active: false,
|
|
24
26
|
handles: {
|
|
@@ -46,7 +48,7 @@ class ArrowAnnotate {
|
|
|
46
48
|
},
|
|
47
49
|
invalidated: true,
|
|
48
50
|
visible: true
|
|
49
|
-
};
|
|
51
|
+
});
|
|
50
52
|
return state;
|
|
51
53
|
}
|
|
52
54
|
static getTID300RepresentationArguments(tool) {
|
|
@@ -59,7 +61,7 @@ class ArrowAnnotate {
|
|
|
59
61
|
} = tool;
|
|
60
62
|
const TID300RepresentationArguments = {
|
|
61
63
|
points,
|
|
62
|
-
trackingIdentifierTextValue:
|
|
64
|
+
trackingIdentifierTextValue: "cornerstoneTools@^4.0.0:ArrowAnnotate",
|
|
63
65
|
findingSites: findingSites || []
|
|
64
66
|
};
|
|
65
67
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
Circle: TID300Circle
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -25,8 +28,7 @@ class CircleRoi {
|
|
|
25
28
|
x: GraphicData[2],
|
|
26
29
|
y: GraphicData[3]
|
|
27
30
|
};
|
|
28
|
-
const state = {
|
|
29
|
-
...defaultState,
|
|
31
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
30
32
|
toolType: CircleRoi.toolType,
|
|
31
33
|
active: false,
|
|
32
34
|
cachedStats: {
|
|
@@ -36,17 +38,15 @@ class CircleRoi {
|
|
|
36
38
|
perimeter: 0
|
|
37
39
|
},
|
|
38
40
|
handles: {
|
|
39
|
-
end: {
|
|
40
|
-
...end,
|
|
41
|
+
end: _objectSpread(_objectSpread({}, end), {}, {
|
|
41
42
|
highlight: false,
|
|
42
43
|
active: false
|
|
43
|
-
},
|
|
44
|
+
}),
|
|
44
45
|
initialRotation: 0,
|
|
45
|
-
start: {
|
|
46
|
-
...center,
|
|
46
|
+
start: _objectSpread(_objectSpread({}, center), {}, {
|
|
47
47
|
highlight: false,
|
|
48
48
|
active: false
|
|
49
|
-
},
|
|
49
|
+
}),
|
|
50
50
|
textBox: {
|
|
51
51
|
hasMoved: false,
|
|
52
52
|
movesIndependently: false,
|
|
@@ -57,7 +57,7 @@ class CircleRoi {
|
|
|
57
57
|
},
|
|
58
58
|
invalidated: true,
|
|
59
59
|
visible: true
|
|
60
|
-
};
|
|
60
|
+
});
|
|
61
61
|
return state;
|
|
62
62
|
}
|
|
63
63
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
CobbAngle: TID300CobbAngle
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -14,8 +17,7 @@ class CobbAngle {
|
|
|
14
17
|
NUMGroup,
|
|
15
18
|
SCOORDGroup
|
|
16
19
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup);
|
|
17
|
-
const state = {
|
|
18
|
-
...defaultState,
|
|
20
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
19
21
|
rAngle: NUMGroup.MeasuredValueSequence.NumericValue,
|
|
20
22
|
toolType: CobbAngle.toolType,
|
|
21
23
|
handles: {
|
|
@@ -37,7 +39,7 @@ class CobbAngle {
|
|
|
37
39
|
hasBoundingBox: true
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
|
-
};
|
|
42
|
+
});
|
|
41
43
|
[state.handles.start.x, state.handles.start.y, state.handles.end.x, state.handles.end.y, state.handles.start2.x, state.handles.start2.y, state.handles.end2.x, state.handles.end2.y] = SCOORDGroup.GraphicData;
|
|
42
44
|
return state;
|
|
43
45
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
Ellipse: TID300Ellipse
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -52,8 +55,7 @@ class EllipticalRoi {
|
|
|
52
55
|
x: majorAxis[1].x - minorAxisDirection.x * halfMinorAxisLength,
|
|
53
56
|
y: majorAxis[1].y - minorAxisDirection.y * halfMinorAxisLength
|
|
54
57
|
};
|
|
55
|
-
const state = {
|
|
56
|
-
...defaultState,
|
|
58
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
57
59
|
toolType: EllipticalRoi.toolType,
|
|
58
60
|
active: false,
|
|
59
61
|
cachedStats: {
|
|
@@ -83,7 +85,7 @@ class EllipticalRoi {
|
|
|
83
85
|
},
|
|
84
86
|
invalidated: true,
|
|
85
87
|
visible: true
|
|
86
|
-
};
|
|
88
|
+
});
|
|
87
89
|
return state;
|
|
88
90
|
}
|
|
89
91
|
static getTID300RepresentationArguments(tool) {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
Polyline: TID300Polyline
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -12,8 +15,7 @@ class FreehandRoi {
|
|
|
12
15
|
SCOORDGroup,
|
|
13
16
|
NUMGroup
|
|
14
17
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup);
|
|
15
|
-
const state = {
|
|
16
|
-
...defaultState,
|
|
18
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
17
19
|
toolType: FreehandRoi.toolType,
|
|
18
20
|
handles: {
|
|
19
21
|
points: [],
|
|
@@ -31,7 +33,7 @@ class FreehandRoi {
|
|
|
31
33
|
},
|
|
32
34
|
color: undefined,
|
|
33
35
|
invalidated: true
|
|
34
|
-
};
|
|
36
|
+
});
|
|
35
37
|
const {
|
|
36
38
|
GraphicData
|
|
37
39
|
} = SCOORDGroup;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
Length: TID300Length
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -14,8 +17,7 @@ class Length {
|
|
|
14
17
|
NUMGroup,
|
|
15
18
|
SCOORDGroup
|
|
16
19
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup);
|
|
17
|
-
const state = {
|
|
18
|
-
...defaultState,
|
|
20
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
19
21
|
length: NUMGroup.MeasuredValueSequence.NumericValue,
|
|
20
22
|
toolType: Length.toolType,
|
|
21
23
|
handles: {
|
|
@@ -29,7 +31,7 @@ class Length {
|
|
|
29
31
|
hasBoundingBox: true
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
|
-
};
|
|
34
|
+
});
|
|
33
35
|
[state.handles.start.x, state.handles.start.y, state.handles.end.x, state.handles.end.y] = SCOORDGroup.GraphicData;
|
|
34
36
|
return state;
|
|
35
37
|
}
|
|
@@ -251,7 +251,7 @@ class MeasurementReport {
|
|
|
251
251
|
const toolClass = hooks.getToolClass ? hooks.getToolClass(measurementGroup, dataset, registeredToolClasses) : registeredToolClasses.find(tc => tc.isValidCornerstoneTrackingIdentifier(TrackingIdentifierValue));
|
|
252
252
|
if (toolClass) {
|
|
253
253
|
const measurement = toolClass.getMeasurementData(measurementGroup);
|
|
254
|
-
console.log(
|
|
254
|
+
console.log("=== ".concat(toolClass.toolType, " ==="));
|
|
255
255
|
console.log(measurement);
|
|
256
256
|
measurementData[toolClass.toolType].push(measurement);
|
|
257
257
|
}
|
|
@@ -35,7 +35,7 @@ async function generateToolState(imageIds, arrayBuffer, metadataProvider) {
|
|
|
35
35
|
Perpendicular: "orthogonal",
|
|
36
36
|
Oblique: "oblique"
|
|
37
37
|
};
|
|
38
|
-
throw new Error(
|
|
38
|
+
throw new Error("Parametric maps ".concat(orientationText[orientation], " to the acquisition plane of the source data are not yet supported."));
|
|
39
39
|
}
|
|
40
40
|
const imageIdMaps = imageIds.reduce((acc, curr, index) => {
|
|
41
41
|
acc.indices[curr] = index;
|
|
@@ -81,8 +81,9 @@ function getPixelData(multiframe) {
|
|
|
81
81
|
let TypedArrayClass;
|
|
82
82
|
let data;
|
|
83
83
|
if (multiframe.PixelData) {
|
|
84
|
+
var _multiframe$PixelRepr;
|
|
84
85
|
const validTypedArrays = multiframe.BitsAllocated === 16 ? [Uint16Array, Int16Array] : [Uint32Array, Int32Array];
|
|
85
|
-
TypedArrayClass = validTypedArrays[multiframe.PixelRepresentation
|
|
86
|
+
TypedArrayClass = validTypedArrays[(_multiframe$PixelRepr = multiframe.PixelRepresentation) !== null && _multiframe$PixelRepr !== void 0 ? _multiframe$PixelRepr : 0];
|
|
86
87
|
data = multiframe.PixelData;
|
|
87
88
|
} else if (multiframe.FloatPixelData) {
|
|
88
89
|
TypedArrayClass = Float32Array;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import CORNERSTONE_4_TAG from './cornerstone4Tag.js';
|
|
4
5
|
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
8
|
const {
|
|
6
9
|
Polyline: TID300Polyline
|
|
7
10
|
} = utilities.TID300;
|
|
@@ -12,8 +15,7 @@ class RectangleRoi {
|
|
|
12
15
|
SCOORDGroup,
|
|
13
16
|
NUMGroup
|
|
14
17
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup);
|
|
15
|
-
const state = {
|
|
16
|
-
...defaultState,
|
|
18
|
+
const state = _objectSpread(_objectSpread({}, defaultState), {}, {
|
|
17
19
|
toolType: RectangleRoi.toolType,
|
|
18
20
|
handles: {
|
|
19
21
|
start: {},
|
|
@@ -33,7 +35,7 @@ class RectangleRoi {
|
|
|
33
35
|
},
|
|
34
36
|
color: undefined,
|
|
35
37
|
invalidated: true
|
|
36
|
-
};
|
|
38
|
+
});
|
|
37
39
|
const intermediate = {};
|
|
38
40
|
[state.handles.start.x, state.handles.start.y, intermediate.x, intermediate.y, state.handles.end.x, state.handles.end.y] = SCOORDGroup.GraphicData;
|
|
39
41
|
return state;
|
|
@@ -21,7 +21,7 @@ function generateSegmentation(images, labelmaps3DorBrushData) {
|
|
|
21
21
|
if (cornerstoneToolsVersion === 3) {
|
|
22
22
|
return Segmentation$1.generateSegmentation(images, labelmaps3DorBrushData, options);
|
|
23
23
|
}
|
|
24
|
-
console.warn(
|
|
24
|
+
console.warn("No generateSegmentation adapter for cornerstone version ".concat(cornerstoneToolsVersion, ", exiting."));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -48,7 +48,7 @@ function generateToolState(imageIds, arrayBuffer, metadataProvider) {
|
|
|
48
48
|
if (cornerstoneToolsVersion === 3) {
|
|
49
49
|
return Segmentation$1.generateToolState(imageIds, arrayBuffer, metadataProvider);
|
|
50
50
|
}
|
|
51
|
-
console.warn(
|
|
51
|
+
console.warn("No generateToolState adapter for cornerstone version ".concat(cornerstoneToolsVersion, ", exiting."));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/**
|
|
@@ -67,7 +67,7 @@ function fillSegmentation(segmentation, inputLabelmaps3D) {
|
|
|
67
67
|
if (cornerstoneToolsVersion === 4) {
|
|
68
68
|
return Segmentation.fillSegmentation(segmentation, inputLabelmaps3D, options);
|
|
69
69
|
}
|
|
70
|
-
console.warn(
|
|
70
|
+
console.warn("No generateSegmentation adapter for cornerstone version ".concat(cornerstoneToolsVersion, ", exiting."));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export { fillSegmentation, generateSegmentation, generateToolState };
|
|
@@ -907,22 +907,22 @@ function getImageIdOfSourceImageBySourceImageSequence(SourceImageSequence, sopUI
|
|
|
907
907
|
} = SourceImageSequence;
|
|
908
908
|
const baseImageId = sopUIDImageIdIndexMap[ReferencedSOPInstanceUID];
|
|
909
909
|
if (!baseImageId) {
|
|
910
|
-
console.warn(
|
|
910
|
+
console.warn("No imageId found for SOPInstanceUID: ".concat(ReferencedSOPInstanceUID));
|
|
911
911
|
return undefined;
|
|
912
912
|
}
|
|
913
913
|
if (ReferencedFrameNumber !== undefined) {
|
|
914
914
|
if (baseImageId.includes('frames/')) {
|
|
915
|
-
return baseImageId.replace(/frames\/\d+/,
|
|
915
|
+
return baseImageId.replace(/frames\/\d+/, "frames/".concat(ReferencedFrameNumber));
|
|
916
916
|
} else if (baseImageId.includes('dicomfile:')) {
|
|
917
917
|
// dicomfile base 1, despite having frame=
|
|
918
|
-
return baseImageId.replace(/frame=\d+/,
|
|
918
|
+
return baseImageId.replace(/frame=\d+/, "frame=".concat(ReferencedFrameNumber));
|
|
919
919
|
} else if (baseImageId.includes('frame=')) {
|
|
920
|
-
return baseImageId.replace(/frame=\d+/,
|
|
920
|
+
return baseImageId.replace(/frame=\d+/, "frame=".concat(ReferencedFrameNumber - 1));
|
|
921
921
|
} else {
|
|
922
922
|
if (baseImageId.includes('wadors:')) {
|
|
923
|
-
return
|
|
923
|
+
return "".concat(baseImageId, "/frames/").concat(ReferencedFrameNumber);
|
|
924
924
|
} else {
|
|
925
|
-
return
|
|
925
|
+
return "".concat(baseImageId, "?frame=").concat(ReferencedFrameNumber - 1);
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
928
|
}
|
|
@@ -953,7 +953,8 @@ function isMultiframeImage(imageMetadata) {
|
|
|
953
953
|
* @return {String} The corresponding imageId.
|
|
954
954
|
*/
|
|
955
955
|
function getImageIdOfSourceImagebyGeometry(ReferencedSeriesInstanceUID, FrameOfReferenceUID, PerFrameFunctionalGroup, imageIds, metadataProvider, tolerance) {
|
|
956
|
-
|
|
956
|
+
var _PerFrameFunctionalGr;
|
|
957
|
+
if (!ReferencedSeriesInstanceUID || !((_PerFrameFunctionalGr = PerFrameFunctionalGroup.PlanePositionSequence) !== null && _PerFrameFunctionalGr !== void 0 && (_PerFrameFunctionalGr = _PerFrameFunctionalGr[0]) !== null && _PerFrameFunctionalGr !== void 0 && _PerFrameFunctionalGr.ImagePositionPatient)) {
|
|
957
958
|
return undefined;
|
|
958
959
|
}
|
|
959
960
|
const segFramePosition = PerFrameFunctionalGroup.PlanePositionSequence[0].ImagePositionPatient;
|
|
@@ -969,7 +970,8 @@ function getImageIdOfSourceImagebyGeometry(ReferencedSeriesInstanceUID, FrameOfR
|
|
|
969
970
|
|
|
970
971
|
// For multiframe images, check each frame's position
|
|
971
972
|
if (isMultiframe) {
|
|
972
|
-
|
|
973
|
+
var _metadataProvider$get;
|
|
974
|
+
const framePosition = (_metadataProvider$get = metadataProvider.get('imagePlaneModule', imageId)) === null || _metadataProvider$get === void 0 ? void 0 : _metadataProvider$get.imagePositionPatient;
|
|
973
975
|
if (framePosition && utilities$1.isEqual(segFramePosition, framePosition, tolerance)) {
|
|
974
976
|
return imageId;
|
|
975
977
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import BaseAdapter3D from './BaseAdapter3D.js';
|
|
@@ -5,6 +6,8 @@ import { toScoord } from '../helpers/toScoordType.js';
|
|
|
5
6
|
import '@cornerstonejs/core';
|
|
6
7
|
|
|
7
8
|
var _Angle;
|
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
11
|
const {
|
|
9
12
|
CobbAngle: TID300CobbAngle
|
|
10
13
|
} = utilities.TID300;
|
|
@@ -18,22 +21,21 @@ class Angle extends BaseAdapter3D {
|
|
|
18
21
|
ReferencedFrameNumber
|
|
19
22
|
} = MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, this.toolType);
|
|
20
23
|
const cachedStats = referencedImageId ? {
|
|
21
|
-
[
|
|
24
|
+
["imageId:".concat(referencedImageId)]: {
|
|
22
25
|
angle: NUMGroup ? NUMGroup.MeasuredValueSequence.NumericValue : null
|
|
23
26
|
}
|
|
24
27
|
} : {};
|
|
25
|
-
state.annotation.data = {
|
|
26
|
-
|
|
27
|
-
handles: {
|
|
28
|
-
...state.annotation.data.handles,
|
|
28
|
+
state.annotation.data = _objectSpread(_objectSpread({}, state.annotation.data), {}, {
|
|
29
|
+
handles: _objectSpread(_objectSpread({}, state.annotation.data.handles), {}, {
|
|
29
30
|
points: [worldCoords[0], worldCoords[1], worldCoords[3]]
|
|
30
|
-
},
|
|
31
|
+
}),
|
|
31
32
|
cachedStats,
|
|
32
33
|
frameNumber: ReferencedFrameNumber
|
|
33
|
-
};
|
|
34
|
+
});
|
|
34
35
|
return state;
|
|
35
36
|
}
|
|
36
37
|
static getTID300RepresentationArguments(tool) {
|
|
38
|
+
var _cachedStats;
|
|
37
39
|
let is3DMeasurement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
38
40
|
const {
|
|
39
41
|
data,
|
|
@@ -56,7 +58,7 @@ class Angle extends BaseAdapter3D {
|
|
|
56
58
|
const point2 = toScoord(scoordProps, handles.points[1]);
|
|
57
59
|
const point3 = toScoord(scoordProps, handles.points[1]);
|
|
58
60
|
const point4 = toScoord(scoordProps, handles.points[2]);
|
|
59
|
-
const angle = cachedStats[
|
|
61
|
+
const angle = (_cachedStats = cachedStats["imageId:".concat(referencedImageId)]) === null || _cachedStats === void 0 ? void 0 : _cachedStats.angle;
|
|
60
62
|
return {
|
|
61
63
|
point1,
|
|
62
64
|
point2,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import { utilities as utilities$1 } from '@cornerstonejs/core';
|
|
3
4
|
import MeasurementReport from './MeasurementReport.js';
|
|
@@ -5,6 +6,8 @@ import BaseAdapter3D from './BaseAdapter3D.js';
|
|
|
5
6
|
import { toScoord } from '../helpers/toScoordType.js';
|
|
6
7
|
|
|
7
8
|
var _ArrowAnnotate;
|
|
9
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
11
|
const {
|
|
9
12
|
ArrowAnnotate: TID300ArrowAnnotate
|
|
10
13
|
} = utilities.TID300;
|
|
@@ -39,16 +42,14 @@ class ArrowAnnotate extends BaseAdapter3D {
|
|
|
39
42
|
const secondPoint = imageToWorldCoords(referencedImageId, [GraphicData[0] + xOffset, GraphicData[1] + yOffset]);
|
|
40
43
|
worldCoords.push(secondPoint);
|
|
41
44
|
}
|
|
42
|
-
state.annotation.data = {
|
|
43
|
-
...state.annotation.data,
|
|
45
|
+
state.annotation.data = _objectSpread(_objectSpread({}, state.annotation.data), {}, {
|
|
44
46
|
text,
|
|
45
|
-
handles: {
|
|
46
|
-
...state.annotation.data.handles,
|
|
47
|
+
handles: _objectSpread(_objectSpread({}, state.annotation.data.handles), {}, {
|
|
47
48
|
arrowFirst: true,
|
|
48
49
|
points: worldCoords
|
|
49
|
-
},
|
|
50
|
+
}),
|
|
50
51
|
frameNumber: ReferencedFrameNumber
|
|
51
|
-
};
|
|
52
|
+
});
|
|
52
53
|
return state;
|
|
53
54
|
}
|
|
54
55
|
static getTID300RepresentationArguments(tool) {
|
|
@@ -11,10 +11,10 @@ class BaseAdapter3D {
|
|
|
11
11
|
let count = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
12
12
|
let key = code;
|
|
13
13
|
if (type) {
|
|
14
|
-
key =
|
|
14
|
+
key = "".concat(key).concat(key.length ? "-" : "").concat(type);
|
|
15
15
|
}
|
|
16
16
|
if (count) {
|
|
17
|
-
key =
|
|
17
|
+
key = "".concat(key).concat(key.length ? "-" : "").concat(count);
|
|
18
18
|
}
|
|
19
19
|
MeasurementReport.registerAdapterTypes(this, key);
|
|
20
20
|
}
|
|
@@ -41,7 +41,7 @@ class BaseAdapter3D {
|
|
|
41
41
|
CodeValue: graphicValue,
|
|
42
42
|
CodingSchemeDesignator: graphicDesignator
|
|
43
43
|
} = conceptNameItem;
|
|
44
|
-
return
|
|
44
|
+
return "".concat(graphicDesignator, ":").concat(graphicValue);
|
|
45
45
|
}
|
|
46
46
|
static getGraphicType(graphicItem) {
|
|
47
47
|
return graphicItem.GraphicType;
|
|
@@ -52,23 +52,23 @@ class BaseAdapter3D {
|
|
|
52
52
|
static init(toolType, representation, options) {
|
|
53
53
|
this.toolType = toolType;
|
|
54
54
|
if (BaseAdapter3D.toolType) {
|
|
55
|
-
throw new Error(
|
|
55
|
+
throw new Error("Base adapter tool type set to ".concat(this.toolType, " while setting ").concat(toolType));
|
|
56
56
|
}
|
|
57
|
-
this.parentType = options
|
|
57
|
+
this.parentType = options === null || options === void 0 ? void 0 : options.parentType;
|
|
58
58
|
this.trackingIdentifiers = new Set();
|
|
59
59
|
this.TID300Representation = representation;
|
|
60
60
|
if (this.parentType) {
|
|
61
|
-
this.trackingIdentifierTextValue =
|
|
62
|
-
const alternateTrackingIdentifier =
|
|
61
|
+
this.trackingIdentifierTextValue = "".concat(CORNERSTONE_3D_TAG, ":").concat(this.parentType, ":").concat(this.toolType);
|
|
62
|
+
const alternateTrackingIdentifier = "".concat(CORNERSTONE_3D_TAG, ":").concat(this.toolType);
|
|
63
63
|
this.trackingIdentifiers.add(alternateTrackingIdentifier);
|
|
64
64
|
} else {
|
|
65
|
-
this.trackingIdentifierTextValue =
|
|
65
|
+
this.trackingIdentifierTextValue = "".concat(CORNERSTONE_3D_TAG, ":").concat(toolType);
|
|
66
66
|
}
|
|
67
67
|
this.trackingIdentifiers.add(this.trackingIdentifierTextValue);
|
|
68
68
|
MeasurementReport.registerTool(this);
|
|
69
69
|
}
|
|
70
70
|
static registerLegacy() {
|
|
71
|
-
this.trackingIdentifiers.add(
|
|
71
|
+
this.trackingIdentifiers.add("cornerstoneTools@^4.0.0:".concat(this.toolType));
|
|
72
72
|
}
|
|
73
73
|
static registerSubType(adapter, toolType, replace) {
|
|
74
74
|
const subAdapter = Object.create(adapter);
|
|
@@ -95,7 +95,7 @@ class BaseAdapter3D {
|
|
|
95
95
|
state.annotation.data = {
|
|
96
96
|
cachedStats: {},
|
|
97
97
|
frameNumber: ReferencedFrameNumber,
|
|
98
|
-
seriesLevel: trackingIdentifier
|
|
98
|
+
seriesLevel: (trackingIdentifier === null || trackingIdentifier === void 0 ? void 0 : trackingIdentifier.indexOf(":Series")) > 0
|
|
99
99
|
};
|
|
100
100
|
return state;
|
|
101
101
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import { toArray } from '../helpers/toArray.js';
|
|
@@ -6,6 +7,8 @@ import { scoordToWorld } from '../helpers/scoordToWorld.js';
|
|
|
6
7
|
import BaseAdapter3D from './BaseAdapter3D.js';
|
|
7
8
|
|
|
8
9
|
var _Bidirectional;
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
12
|
const {
|
|
10
13
|
Bidirectional: TID300Bidirectional
|
|
11
14
|
} = utilities.TID300;
|
|
@@ -29,17 +32,15 @@ class Bidirectional extends BaseAdapter3D {
|
|
|
29
32
|
const worldCoords = [];
|
|
30
33
|
worldCoords.push(...scoordToWorld(scoordArgs, longAxisScoordGroup));
|
|
31
34
|
worldCoords.push(...scoordToWorld(scoordArgs, shortAxisScoordGroup));
|
|
32
|
-
state.annotation.data = {
|
|
33
|
-
|
|
34
|
-
handles: {
|
|
35
|
-
...state.annotation.data.handles,
|
|
35
|
+
state.annotation.data = _objectSpread(_objectSpread({}, state.annotation.data), {}, {
|
|
36
|
+
handles: _objectSpread(_objectSpread({}, state.annotation.data.handles), {}, {
|
|
36
37
|
points: [worldCoords[0], worldCoords[1], worldCoords[2], worldCoords[3]]
|
|
37
|
-
},
|
|
38
|
+
}),
|
|
38
39
|
frameNumber: ReferencedFrameNumber
|
|
39
|
-
};
|
|
40
|
+
});
|
|
40
41
|
if (referencedImageId) {
|
|
41
42
|
state.annotation.data.cachedStats = {
|
|
42
|
-
[
|
|
43
|
+
["imageId:".concat(referencedImageId)]: {
|
|
43
44
|
length: longAxisNUMGroup.MeasuredValueSequence.NumericValue,
|
|
44
45
|
width: shortAxisNUMGroup.MeasuredValueSequence.NumericValue,
|
|
45
46
|
unit: longAxisNUMGroup.MeasuredValueSequence.MeasurementUnitsCodeSequence.CodeValue,
|
|
@@ -92,7 +93,7 @@ class Bidirectional extends BaseAdapter3D {
|
|
|
92
93
|
length,
|
|
93
94
|
width,
|
|
94
95
|
unit
|
|
95
|
-
} = cachedStats[
|
|
96
|
+
} = cachedStats["imageId:".concat(referencedImageId)] || {};
|
|
96
97
|
return {
|
|
97
98
|
longAxis: {
|
|
98
99
|
point1: longAxisStartImage,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _defineProperty from '../../node_modules/@babel/runtime/helpers/esm/defineProperty.js';
|
|
1
2
|
import { utilities } from 'dcmjs';
|
|
2
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
4
|
import BaseAdapter3D from './BaseAdapter3D.js';
|
|
@@ -6,6 +7,8 @@ import '@cornerstonejs/core';
|
|
|
6
7
|
import { extractAllNUMGroups, restoreAdditionalMetrics } from './metricHandler.js';
|
|
7
8
|
|
|
8
9
|
var _CircleROI;
|
|
10
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
11
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
12
|
const {
|
|
10
13
|
Circle: TID300Circle
|
|
11
14
|
} = utilities.TID300;
|
|
@@ -21,22 +24,19 @@ class CircleROI extends BaseAdapter3D {
|
|
|
21
24
|
const referencedSOPInstanceUID = state.sopInstanceUid;
|
|
22
25
|
const allNUMGroups = extractAllNUMGroups(MeasurementGroup, referencedSOPInstanceUID);
|
|
23
26
|
const measurementNUMGroups = allNUMGroups[referencedSOPInstanceUID] || {};
|
|
24
|
-
state.annotation.data = {
|
|
25
|
-
|
|
26
|
-
handles: {
|
|
27
|
-
...state.annotation.data.handles,
|
|
27
|
+
state.annotation.data = _objectSpread(_objectSpread({}, state.annotation.data), {}, {
|
|
28
|
+
handles: _objectSpread(_objectSpread({}, state.annotation.data.handles), {}, {
|
|
28
29
|
points: worldCoords
|
|
29
|
-
},
|
|
30
|
+
}),
|
|
30
31
|
frameNumber: ReferencedFrameNumber
|
|
31
|
-
};
|
|
32
|
+
});
|
|
32
33
|
if (referencedImageId) {
|
|
33
34
|
state.annotation.data.cachedStats = {
|
|
34
|
-
[
|
|
35
|
+
["imageId:".concat(referencedImageId)]: _objectSpread({
|
|
35
36
|
area: NUMGroup ? NUMGroup.MeasuredValueSequence.NumericValue : 0,
|
|
36
37
|
radius: 0,
|
|
37
|
-
perimeter: 0
|
|
38
|
-
|
|
39
|
-
}
|
|
38
|
+
perimeter: 0
|
|
39
|
+
}, restoreAdditionalMetrics(measurementNUMGroups))
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
return state;
|
|
@@ -72,7 +72,7 @@ class CircleROI extends BaseAdapter3D {
|
|
|
72
72
|
modalityUnit,
|
|
73
73
|
radiusUnit,
|
|
74
74
|
areaUnit
|
|
75
|
-
} = cachedStats[
|
|
75
|
+
} = cachedStats["imageId:".concat(referencedImageId)] || {};
|
|
76
76
|
const perimeter = 2 * Math.PI * radius;
|
|
77
77
|
return {
|
|
78
78
|
area,
|