@cornerstonejs/polymorphic-segmentation 3.10.2 → 3.10.3
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.
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Enums } from '@cornerstonejs/tools';
|
|
2
|
-
declare
|
|
3
|
-
declare function canComputeRequestedRepresentation(segmentationId: string, type: typeof SegmentationRepresentations): boolean;
|
|
2
|
+
declare function canComputeRequestedRepresentation(segmentationId: string, representationType: Enums.SegmentationRepresentations): boolean;
|
|
4
3
|
export { canComputeRequestedRepresentation };
|
|
@@ -1,31 +1,30 @@
|
|
|
1
1
|
import { Enums, segmentation, utilities } from '@cornerstonejs/tools';
|
|
2
|
-
const { SegmentationRepresentations } = Enums;
|
|
3
2
|
const { getSegmentation } = segmentation.state;
|
|
4
3
|
const { validateLabelmap } = utilities.segmentation;
|
|
5
4
|
const conversionPaths = new Map([
|
|
6
5
|
[
|
|
7
|
-
SegmentationRepresentations.Labelmap,
|
|
6
|
+
Enums.SegmentationRepresentations.Labelmap,
|
|
8
7
|
new Set([
|
|
9
|
-
SegmentationRepresentations.Surface,
|
|
10
|
-
SegmentationRepresentations.Contour,
|
|
8
|
+
Enums.SegmentationRepresentations.Surface,
|
|
9
|
+
Enums.SegmentationRepresentations.Contour,
|
|
11
10
|
]),
|
|
12
11
|
],
|
|
13
12
|
[
|
|
14
|
-
SegmentationRepresentations.Contour,
|
|
13
|
+
Enums.SegmentationRepresentations.Contour,
|
|
15
14
|
new Set([
|
|
16
|
-
SegmentationRepresentations.Labelmap,
|
|
17
|
-
SegmentationRepresentations.Surface,
|
|
15
|
+
Enums.SegmentationRepresentations.Labelmap,
|
|
16
|
+
Enums.SegmentationRepresentations.Surface,
|
|
18
17
|
]),
|
|
19
18
|
],
|
|
20
19
|
[
|
|
21
|
-
SegmentationRepresentations.Surface,
|
|
22
|
-
new Set([SegmentationRepresentations.Labelmap]),
|
|
20
|
+
Enums.SegmentationRepresentations.Surface,
|
|
21
|
+
new Set([Enums.SegmentationRepresentations.Labelmap]),
|
|
23
22
|
],
|
|
24
23
|
]);
|
|
25
|
-
function canComputeRequestedRepresentation(segmentationId,
|
|
24
|
+
function canComputeRequestedRepresentation(segmentationId, representationType) {
|
|
26
25
|
const { representationData } = getSegmentation(segmentationId);
|
|
27
26
|
const existingRepresentationTypes = getExistingRepresentationTypes(representationData);
|
|
28
|
-
return existingRepresentationTypes.some((existingRepresentationType) => canConvertFromTo(existingRepresentationType,
|
|
27
|
+
return existingRepresentationTypes.some((existingRepresentationType) => canConvertFromTo(existingRepresentationType, representationType));
|
|
29
28
|
}
|
|
30
29
|
function getExistingRepresentationTypes(representationData) {
|
|
31
30
|
const supportedTypes = [];
|
|
@@ -33,7 +32,7 @@ function getExistingRepresentationTypes(representationData) {
|
|
|
33
32
|
const representationTypeData = representationData[representationType];
|
|
34
33
|
let validateFn;
|
|
35
34
|
switch (representationType) {
|
|
36
|
-
case SegmentationRepresentations.Labelmap:
|
|
35
|
+
case Enums.SegmentationRepresentations.Labelmap:
|
|
37
36
|
validateFn = validateLabelmap.validate;
|
|
38
37
|
break;
|
|
39
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/polymorphic-segmentation",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.3",
|
|
4
4
|
"description": "Polymorphic Segmentation utility for Cornerstone3D",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@icr/polyseg-wasm": "0.4.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@cornerstonejs/core": "^3.10.
|
|
52
|
-
"@cornerstonejs/tools": "^3.10.
|
|
51
|
+
"@cornerstonejs/core": "^3.10.3",
|
|
52
|
+
"@cornerstonejs/tools": "^3.10.3",
|
|
53
53
|
"@kitware/vtk.js": "32.12.1"
|
|
54
54
|
},
|
|
55
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "94a95f19ad882fdc5da23e67d7a58faee4c73934"
|
|
56
56
|
}
|