@cornerstonejs/adapters 3.31.11 → 3.31.13
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/MeasurementReport.js +6 -6
- package/dist/esm/adapters/Cornerstone3D/Angle.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/Angle.js +2 -5
- package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.js +3 -18
- package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/Bidirectional.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/Bidirectional.js +2 -7
- package/dist/esm/adapters/Cornerstone3D/CircleROI.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/CircleROI.js +2 -7
- package/dist/esm/adapters/Cornerstone3D/CobbAngle.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/CobbAngle.js +2 -5
- package/dist/esm/adapters/Cornerstone3D/EllipticalROI.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/EllipticalROI.js +2 -5
- package/dist/esm/adapters/Cornerstone3D/KeyImage.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/LabelData.d.ts +11 -0
- package/dist/esm/adapters/Cornerstone3D/LabelData.js +102 -0
- package/dist/esm/adapters/Cornerstone3D/Length.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/Length.js +2 -6
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.d.ts +15 -2
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.js +69 -23
- package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.js +3 -8
- package/dist/esm/adapters/Cornerstone3D/Probe.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/Probe.js +2 -7
- package/dist/esm/adapters/Cornerstone3D/RectangleROI.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/RectangleROI.js +4 -11
- package/dist/esm/adapters/Cornerstone3D/UltrasoundDirectional.d.ts +2 -0
- package/dist/esm/adapters/Cornerstone3D/UltrasoundDirectional.js +2 -5
- package/dist/esm/adapters/Cornerstone3D/constants/index.d.ts +11 -0
- package/dist/esm/adapters/Cornerstone3D/constants/index.js +12 -1
- package/dist/esm/adapters/Cornerstone3D/index.d.ts +11 -0
- package/dist/esm/adapters/Cornerstone3D/index.js +5 -1
- package/dist/esm/adapters/index.d.ts +11 -0
- package/dist/esm/version.d.ts +1 -1
- package/package.json +4 -4
|
@@ -49,8 +49,8 @@ const codeValueMatch = (group, code, oldCode) => {
|
|
|
49
49
|
function getTID300ContentItem(tool, ReferencedSOPSequence, adapterClass) {
|
|
50
50
|
const args = adapterClass.getTID300RepresentationArguments(tool);
|
|
51
51
|
args.ReferencedSOPSequence = ReferencedSOPSequence;
|
|
52
|
-
const
|
|
53
|
-
return
|
|
52
|
+
const tid300Measurement = new adapterClass.TID300Representation(args);
|
|
53
|
+
return tid300Measurement;
|
|
54
54
|
}
|
|
55
55
|
function getMeasurementGroup(toolType, toolData, ReferencedSOPSequence) {
|
|
56
56
|
const toolTypeData = toolData[toolType];
|
|
@@ -61,10 +61,10 @@ function getMeasurementGroup(toolType, toolData, ReferencedSOPSequence) {
|
|
|
61
61
|
|
|
62
62
|
// Loop through the array of tool instances
|
|
63
63
|
// for this tool
|
|
64
|
-
const
|
|
64
|
+
const measurements = toolTypeData.data.map(tool => {
|
|
65
65
|
return getTID300ContentItem(tool, ReferencedSOPSequence, toolClass);
|
|
66
66
|
});
|
|
67
|
-
return new TID1501MeasurementGroup(
|
|
67
|
+
return new TID1501MeasurementGroup(measurements);
|
|
68
68
|
}
|
|
69
69
|
class MeasurementReport {
|
|
70
70
|
static getSetupMeasurementData(MeasurementGroup) {
|
|
@@ -162,7 +162,7 @@ class MeasurementReport {
|
|
|
162
162
|
});
|
|
163
163
|
allMeasurementGroups = allMeasurementGroups.concat(measurementGroups);
|
|
164
164
|
});
|
|
165
|
-
const
|
|
165
|
+
const tid1500MeasurementReport = new TID1500MeasurementReport({
|
|
166
166
|
TID1501MeasurementGroups: allMeasurementGroups
|
|
167
167
|
}, options);
|
|
168
168
|
|
|
@@ -204,7 +204,7 @@ class MeasurementReport {
|
|
|
204
204
|
derivationSourceDataset._meta = _meta;
|
|
205
205
|
derivationSourceDataset._vrMap = _vrMap;
|
|
206
206
|
const report = new StructuredReport([derivationSourceDataset]);
|
|
207
|
-
const contentItem =
|
|
207
|
+
const contentItem = tid1500MeasurementReport.contentItem(derivationSourceDataset);
|
|
208
208
|
|
|
209
209
|
// Merge the derived dataset with the content from the Measurement Report
|
|
210
210
|
report.dataset = Object.assign(report.dataset, contentItem);
|
|
@@ -6,6 +6,8 @@ declare class Angle extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
point1: {
|
|
@@ -26,11 +26,8 @@ class Angle extends BaseAdapter3D {
|
|
|
26
26
|
state.annotation.data = {
|
|
27
27
|
...state.annotation.data,
|
|
28
28
|
handles: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
textBox: {
|
|
32
|
-
hasMoved: false
|
|
33
|
-
}
|
|
29
|
+
...state.annotation.data.handles,
|
|
30
|
+
points: worldCoords
|
|
34
31
|
},
|
|
35
32
|
cachedStats,
|
|
36
33
|
frameNumber: ReferencedFrameNumber
|
|
@@ -6,6 +6,8 @@ declare class ArrowAnnotate extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
points: ({
|
|
@@ -2,7 +2,6 @@ import { utilities } from 'dcmjs';
|
|
|
2
2
|
import { utilities as utilities$1 } from '@cornerstonejs/core';
|
|
3
3
|
import MeasurementReport from './MeasurementReport.js';
|
|
4
4
|
import BaseAdapter3D from './BaseAdapter3D.js';
|
|
5
|
-
import CodingScheme from './CodingScheme.js';
|
|
6
5
|
import 'buffer';
|
|
7
6
|
import { toScoord } from '../helpers/toScoordType.js';
|
|
8
7
|
|
|
@@ -13,15 +12,11 @@ const {
|
|
|
13
12
|
const {
|
|
14
13
|
imageToWorldCoords
|
|
15
14
|
} = utilities$1;
|
|
16
|
-
const {
|
|
17
|
-
codeValues
|
|
18
|
-
} = CodingScheme;
|
|
19
15
|
class ArrowAnnotate extends BaseAdapter3D {
|
|
20
16
|
static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, _trackingIdentifier) {
|
|
21
17
|
const {
|
|
22
18
|
state,
|
|
23
19
|
SCOORDGroup,
|
|
24
|
-
scoordArgs,
|
|
25
20
|
worldCoords,
|
|
26
21
|
referencedImageId,
|
|
27
22
|
ReferencedFrameNumber
|
|
@@ -49,12 +44,9 @@ class ArrowAnnotate extends BaseAdapter3D {
|
|
|
49
44
|
...state.annotation.data,
|
|
50
45
|
text,
|
|
51
46
|
handles: {
|
|
47
|
+
...state.annotation.data.handles,
|
|
52
48
|
arrowFirst: true,
|
|
53
|
-
points: worldCoords
|
|
54
|
-
activeHandleIndex: 0,
|
|
55
|
-
textBox: {
|
|
56
|
-
hasMoved: false
|
|
57
|
-
}
|
|
49
|
+
points: worldCoords
|
|
58
50
|
},
|
|
59
51
|
frameNumber: ReferencedFrameNumber
|
|
60
52
|
};
|
|
@@ -67,7 +59,7 @@ class ArrowAnnotate extends BaseAdapter3D {
|
|
|
67
59
|
metadata,
|
|
68
60
|
findingSites
|
|
69
61
|
} = tool;
|
|
70
|
-
|
|
62
|
+
const {
|
|
71
63
|
finding
|
|
72
64
|
} = tool;
|
|
73
65
|
const {
|
|
@@ -93,13 +85,6 @@ class ArrowAnnotate extends BaseAdapter3D {
|
|
|
93
85
|
ReferencedFrameOfReferenceUID: is3DMeasurement ? metadata.FrameOfReferenceUID : null,
|
|
94
86
|
use3DSpatialCoordinates: is3DMeasurement
|
|
95
87
|
};
|
|
96
|
-
if (!finding || finding.CodeValue !== codeValues.CORNERSTONEFREETEXT) {
|
|
97
|
-
finding = {
|
|
98
|
-
CodeValue: codeValues.CORNERSTONEFREETEXT,
|
|
99
|
-
CodingSchemeDesignator: CodingScheme.CodingSchemeDesignator,
|
|
100
|
-
CodeMeaning: data.text
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
88
|
return TID300RepresentationArguments;
|
|
104
89
|
}
|
|
105
90
|
}
|
|
@@ -36,6 +36,8 @@ export default class BaseAdapter3D {
|
|
|
36
36
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
37
37
|
finding?: unknown;
|
|
38
38
|
findingSites?: unknown;
|
|
39
|
+
commentGroup?: any;
|
|
40
|
+
commentPositionGroup?: any;
|
|
39
41
|
};
|
|
40
42
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): TID300Arguments;
|
|
41
43
|
}
|
|
@@ -6,6 +6,8 @@ declare class Bidirectional extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
longAxis: {
|
|
@@ -16,8 +16,6 @@ class Bidirectional extends BaseAdapter3D {
|
|
|
16
16
|
static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata) {
|
|
17
17
|
const {
|
|
18
18
|
state,
|
|
19
|
-
NUMGroup,
|
|
20
|
-
scoord,
|
|
21
19
|
scoordArgs,
|
|
22
20
|
referencedImageId,
|
|
23
21
|
ReferencedFrameNumber
|
|
@@ -35,11 +33,8 @@ class Bidirectional extends BaseAdapter3D {
|
|
|
35
33
|
state.annotation.data = {
|
|
36
34
|
...state.annotation.data,
|
|
37
35
|
handles: {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
textBox: {
|
|
41
|
-
hasMoved: false
|
|
42
|
-
}
|
|
36
|
+
...state.annotation.data.handles,
|
|
37
|
+
points: [worldCoords[0], worldCoords[1], worldCoords[2], worldCoords[3]]
|
|
43
38
|
},
|
|
44
39
|
frameNumber: ReferencedFrameNumber
|
|
45
40
|
};
|
|
@@ -6,6 +6,8 @@ declare class CircleROI extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
area: any;
|
|
@@ -14,8 +14,6 @@ class CircleROI extends BaseAdapter3D {
|
|
|
14
14
|
const {
|
|
15
15
|
state,
|
|
16
16
|
NUMGroup,
|
|
17
|
-
scoord,
|
|
18
|
-
scoordArgs,
|
|
19
17
|
worldCoords,
|
|
20
18
|
referencedImageId,
|
|
21
19
|
ReferencedFrameNumber
|
|
@@ -23,11 +21,8 @@ class CircleROI extends BaseAdapter3D {
|
|
|
23
21
|
state.annotation.data = {
|
|
24
22
|
...state.annotation.data,
|
|
25
23
|
handles: {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
textBox: {
|
|
29
|
-
hasMoved: false
|
|
30
|
-
}
|
|
24
|
+
...state.annotation.data.handles,
|
|
25
|
+
points: worldCoords
|
|
31
26
|
},
|
|
32
27
|
frameNumber: ReferencedFrameNumber
|
|
33
28
|
};
|
|
@@ -6,6 +6,8 @@ declare class CobbAngle extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
point1: {
|
|
@@ -21,11 +21,8 @@ class CobbAngle extends BaseAdapter3D {
|
|
|
21
21
|
state.annotation.data = {
|
|
22
22
|
...state.annotation.data,
|
|
23
23
|
handles: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
textBox: {
|
|
27
|
-
hasMoved: false
|
|
28
|
-
}
|
|
24
|
+
...state.annotation.data.handles,
|
|
25
|
+
points: [worldCoords[0], worldCoords[1], worldCoords[2], worldCoords[3]]
|
|
29
26
|
},
|
|
30
27
|
frameNumber: ReferencedFrameNumber
|
|
31
28
|
};
|
|
@@ -6,6 +6,8 @@ declare class EllipticalROI extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
area: any;
|
|
@@ -21,11 +21,8 @@ class EllipticalROI extends BaseAdapter3D {
|
|
|
21
21
|
state.annotation.data = {
|
|
22
22
|
...state.annotation.data,
|
|
23
23
|
handles: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
textBox: {
|
|
27
|
-
hasMoved: false
|
|
28
|
-
}
|
|
24
|
+
...state.annotation.data.handles,
|
|
25
|
+
points: worldCoords
|
|
29
26
|
},
|
|
30
27
|
frameNumber: ReferencedFrameNumber
|
|
31
28
|
};
|
|
@@ -9,6 +9,8 @@ export default class KeyImage extends Probe {
|
|
|
9
9
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
10
10
|
finding?: unknown;
|
|
11
11
|
findingSites?: unknown;
|
|
12
|
+
commentGroup?: any;
|
|
13
|
+
commentPositionGroup?: any;
|
|
12
14
|
};
|
|
13
15
|
static getTID300RepresentationArguments(tool: any): {
|
|
14
16
|
points: ({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Types } from "@cornerstonejs/tools";
|
|
2
|
+
export default class LabelData {
|
|
3
|
+
protected tid300Item: any;
|
|
4
|
+
protected annotation: Types.Annotation;
|
|
5
|
+
ReferencedSOPSequence: any;
|
|
6
|
+
constructor(tid300Item: any, annotation: Types.Annotation);
|
|
7
|
+
contentItem(): any;
|
|
8
|
+
filterCornerstoneFreeText(contentEntries: any): void;
|
|
9
|
+
createQualitativeLabel(label: string): any;
|
|
10
|
+
createQualitativeLabelPosition(annotation: Types.Annotation): any;
|
|
11
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { COMMENT_CODE, TEXT_ANNOTATION_POSITION } from './constants/index.js';
|
|
2
|
+
import dcmjs from 'dcmjs';
|
|
3
|
+
import 'buffer';
|
|
4
|
+
import { toScoord } from '../helpers/toScoordType.js';
|
|
5
|
+
import '@cornerstonejs/core';
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
sr: {
|
|
9
|
+
valueTypes,
|
|
10
|
+
coding
|
|
11
|
+
}
|
|
12
|
+
} = dcmjs;
|
|
13
|
+
const CORNERSTONEFREETEXT = "CORNERSTONEFREETEXT";
|
|
14
|
+
class LabelData {
|
|
15
|
+
constructor(tid300Item, annotation) {
|
|
16
|
+
this.tid300Item = tid300Item;
|
|
17
|
+
this.annotation = annotation;
|
|
18
|
+
this.ReferencedSOPSequence = tid300Item.ReferencedSOPSequence;
|
|
19
|
+
}
|
|
20
|
+
contentItem() {
|
|
21
|
+
const contentEntries = this.tid300Item.contentItem();
|
|
22
|
+
const {
|
|
23
|
+
label,
|
|
24
|
+
handles
|
|
25
|
+
} = this.annotation.data;
|
|
26
|
+
if (label) {
|
|
27
|
+
contentEntries.push(this.createQualitativeLabel(label));
|
|
28
|
+
this.filterCornerstoneFreeText(contentEntries);
|
|
29
|
+
}
|
|
30
|
+
if (handles?.textBox?.hasMoved) {
|
|
31
|
+
contentEntries.push(this.createQualitativeLabelPosition(this.annotation));
|
|
32
|
+
}
|
|
33
|
+
return contentEntries;
|
|
34
|
+
}
|
|
35
|
+
filterCornerstoneFreeText(contentEntries) {
|
|
36
|
+
for (let i = 0; i < contentEntries.length; i++) {
|
|
37
|
+
const group = contentEntries[i];
|
|
38
|
+
if (!group.ConceptCodeSequence) {
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const csLabel = group.ConceptCodeSequence.find(item => item.CodeValue === CORNERSTONEFREETEXT);
|
|
42
|
+
if (csLabel !== -1) {
|
|
43
|
+
group.ConceptCodeSequence.splice(csLabel, 1);
|
|
44
|
+
if (group.ConceptCodeSequence.length === 0) {
|
|
45
|
+
contentEntries.splice(i, 1);
|
|
46
|
+
}
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
createQualitativeLabel(label) {
|
|
52
|
+
const relationshipType = valueTypes.RelationshipTypes.CONTAINS;
|
|
53
|
+
return new valueTypes.TextContentItem({
|
|
54
|
+
name: new coding.CodedConcept(COMMENT_CODE),
|
|
55
|
+
relationshipType,
|
|
56
|
+
value: label
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
createQualitativeLabelPosition(annotation) {
|
|
60
|
+
const {
|
|
61
|
+
textBox
|
|
62
|
+
} = annotation.data.handles;
|
|
63
|
+
const {
|
|
64
|
+
referencedImageId,
|
|
65
|
+
FrameOfReferenceUID: frameOfReferenceUID
|
|
66
|
+
} = annotation.metadata;
|
|
67
|
+
const is3DMeasurement = !referencedImageId;
|
|
68
|
+
const {
|
|
69
|
+
worldPosition
|
|
70
|
+
} = textBox;
|
|
71
|
+
const {
|
|
72
|
+
x,
|
|
73
|
+
y,
|
|
74
|
+
z
|
|
75
|
+
} = toScoord({
|
|
76
|
+
is3DMeasurement,
|
|
77
|
+
referencedImageId
|
|
78
|
+
}, worldPosition);
|
|
79
|
+
const graphicType = valueTypes.GraphicTypes.POINT;
|
|
80
|
+
const relationshipType = valueTypes.RelationshipTypes.CONTAINS;
|
|
81
|
+
const name = new coding.CodedConcept(TEXT_ANNOTATION_POSITION);
|
|
82
|
+
if (is3DMeasurement) {
|
|
83
|
+
const graphicData = [x, y, z];
|
|
84
|
+
return new valueTypes.Scoord3DContentItem({
|
|
85
|
+
name,
|
|
86
|
+
relationshipType,
|
|
87
|
+
graphicType,
|
|
88
|
+
frameOfReferenceUID,
|
|
89
|
+
graphicData
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
const graphicData = [x, y];
|
|
93
|
+
return new valueTypes.ScoordContentItem({
|
|
94
|
+
name,
|
|
95
|
+
relationshipType,
|
|
96
|
+
graphicType,
|
|
97
|
+
graphicData
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export { LabelData as default };
|
|
@@ -6,6 +6,8 @@ export default class Length extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
point1: {
|
|
@@ -15,8 +15,6 @@ class Length extends BaseAdapter3D {
|
|
|
15
15
|
const {
|
|
16
16
|
state,
|
|
17
17
|
NUMGroup,
|
|
18
|
-
scoord,
|
|
19
|
-
scoordArgs,
|
|
20
18
|
worldCoords,
|
|
21
19
|
referencedImageId,
|
|
22
20
|
ReferencedFrameNumber
|
|
@@ -29,11 +27,9 @@ class Length extends BaseAdapter3D {
|
|
|
29
27
|
state.annotation.data = {
|
|
30
28
|
...state.annotation.data,
|
|
31
29
|
handles: {
|
|
30
|
+
...state.annotation.data.handles,
|
|
32
31
|
points: [worldCoords[0], worldCoords[1]],
|
|
33
|
-
activeHandleIndex: 0
|
|
34
|
-
textBox: {
|
|
35
|
-
hasMoved: false
|
|
36
|
-
}
|
|
32
|
+
activeHandleIndex: 0
|
|
37
33
|
},
|
|
38
34
|
cachedStats,
|
|
39
35
|
frameNumber: ReferencedFrameNumber
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type Types as CSTypes } from "@cornerstonejs/core";
|
|
2
2
|
import type { Types } from "@cornerstonejs/tools";
|
|
3
|
+
import LabelData from "./LabelData";
|
|
3
4
|
type Annotation = Types.Annotation;
|
|
4
5
|
type SpatialCoordinatesState = {
|
|
5
6
|
description?: string;
|
|
@@ -7,6 +8,8 @@ type SpatialCoordinatesState = {
|
|
|
7
8
|
annotation: Annotation;
|
|
8
9
|
finding?: unknown;
|
|
9
10
|
findingSites?: unknown;
|
|
11
|
+
commentGroup?: any;
|
|
12
|
+
commentPositionGroup?: any;
|
|
10
13
|
};
|
|
11
14
|
type ScoordType = {
|
|
12
15
|
GraphicData: number[];
|
|
@@ -30,6 +33,7 @@ type SetupMeasurementData = {
|
|
|
30
33
|
ReferencedSOPSequence?: Record<string, unknown>;
|
|
31
34
|
ReferencedSOPInstanceUID?: string;
|
|
32
35
|
referencedImageId?: string;
|
|
36
|
+
textBoxPosition?: ScoordType;
|
|
33
37
|
ReferencedFrameNumber?: string;
|
|
34
38
|
SCOORD3DGroup?: ScoordType;
|
|
35
39
|
FrameOfReferenceUID?: string;
|
|
@@ -58,7 +62,7 @@ export default class MeasurementReport {
|
|
|
58
62
|
static measurementAdapterByToolType: Map<string, MeasurementAdapter>;
|
|
59
63
|
static measurementAdaptersByType: Map<string, MeasurementAdapter[]>;
|
|
60
64
|
static measurementAdapterByTrackingIdentifier: Map<string, MeasurementAdapter>;
|
|
61
|
-
static getTID300ContentItem(tool: any, ReferencedSOPSequence: any, toolClass: any, is3DMeasurement: any):
|
|
65
|
+
static getTID300ContentItem(tool: any, ReferencedSOPSequence: any, toolClass: any, is3DMeasurement: any): LabelData;
|
|
62
66
|
static codeValueMatch: (group: any, code: any, oldCode?: any) => boolean;
|
|
63
67
|
static getMeasurementGroup(toolType: any, toolData: any, ReferencedSOPSequence: any, is3DMeasurement: any): any;
|
|
64
68
|
static getCornerstoneLabelFromDefaultState(defaultState: any): any;
|
|
@@ -101,6 +105,12 @@ export default class MeasurementReport {
|
|
|
101
105
|
annotation: {
|
|
102
106
|
data: {
|
|
103
107
|
annotationUID: any;
|
|
108
|
+
handles: {
|
|
109
|
+
activeHandleIndex: number;
|
|
110
|
+
textBox: {
|
|
111
|
+
hasMoved: boolean;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
104
114
|
};
|
|
105
115
|
annotationUID: any;
|
|
106
116
|
metadata: {
|
|
@@ -121,12 +131,14 @@ export default class MeasurementReport {
|
|
|
121
131
|
metadata: any;
|
|
122
132
|
toolType: any;
|
|
123
133
|
}): SpatialCoordinatesData;
|
|
124
|
-
static processSpatialCoordinatesGroup({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, findingGroup, findingSiteGroups, toolType }: {
|
|
134
|
+
static processSpatialCoordinatesGroup({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, findingGroup, findingSiteGroups, commentGroup, commentPositionGroup, toolType }: {
|
|
125
135
|
NUMGroup: any;
|
|
126
136
|
sopInstanceUIDToImageIdMap: any;
|
|
127
137
|
metadata: any;
|
|
128
138
|
findingGroup: any;
|
|
129
139
|
findingSiteGroups: any;
|
|
140
|
+
commentGroup: any;
|
|
141
|
+
commentPositionGroup: any;
|
|
130
142
|
toolType: any;
|
|
131
143
|
}): {
|
|
132
144
|
defaultState: SpatialCoordinatesState;
|
|
@@ -137,6 +149,7 @@ export default class MeasurementReport {
|
|
|
137
149
|
ReferencedSOPSequence: Record<string, unknown>;
|
|
138
150
|
ReferencedSOPInstanceUID: string;
|
|
139
151
|
referencedImageId: string;
|
|
152
|
+
textBoxPosition: ScoordType;
|
|
140
153
|
ReferencedFrameNumber: string;
|
|
141
154
|
SCOORD3DGroup: ScoordType;
|
|
142
155
|
FrameOfReferenceUID: string;
|
|
@@ -9,7 +9,8 @@ import { copySeriesTags } from '../helpers/copySeriesTags.js';
|
|
|
9
9
|
import { scoordToWorld } from '../helpers/scoordToWorld.js';
|
|
10
10
|
import { toPoint3 } from '../helpers/toPoint3.js';
|
|
11
11
|
import CodingScheme from './CodingScheme.js';
|
|
12
|
-
import { NO_IMAGE_ID } from './constants/index.js';
|
|
12
|
+
import { COMMENT_CODE, TEXT_ANNOTATION_POSITION, NO_IMAGE_ID } from './constants/index.js';
|
|
13
|
+
import LabelData from './LabelData.js';
|
|
13
14
|
|
|
14
15
|
var _MeasurementReport;
|
|
15
16
|
const {
|
|
@@ -33,6 +34,14 @@ const FINDING = {
|
|
|
33
34
|
CodingSchemeDesignator: "DCM",
|
|
34
35
|
CodeValue: "121071"
|
|
35
36
|
};
|
|
37
|
+
const COMMENT = {
|
|
38
|
+
CodingSchemeDesignator: COMMENT_CODE.schemeDesignator,
|
|
39
|
+
CodeValue: COMMENT_CODE.value
|
|
40
|
+
};
|
|
41
|
+
const COMMENT_POSITION = {
|
|
42
|
+
CodingSchemeDesignator: TEXT_ANNOTATION_POSITION.schemeDesignator,
|
|
43
|
+
CodeValue: TEXT_ANNOTATION_POSITION.value
|
|
44
|
+
};
|
|
36
45
|
const FINDING_SITE = {
|
|
37
46
|
CodingSchemeDesignator: "SCT",
|
|
38
47
|
CodeValue: "363698007"
|
|
@@ -45,8 +54,9 @@ class MeasurementReport {
|
|
|
45
54
|
static getTID300ContentItem(tool, ReferencedSOPSequence, toolClass, is3DMeasurement) {
|
|
46
55
|
const args = toolClass.getTID300RepresentationArguments(tool, is3DMeasurement);
|
|
47
56
|
args.ReferencedSOPSequence = ReferencedSOPSequence;
|
|
48
|
-
const
|
|
49
|
-
|
|
57
|
+
const tid300Measurement = new toolClass.TID300Representation(args);
|
|
58
|
+
const labelMeasurement = new LabelData(tid300Measurement, tool);
|
|
59
|
+
return labelMeasurement;
|
|
50
60
|
}
|
|
51
61
|
static getMeasurementGroup(toolType, toolData, ReferencedSOPSequence, is3DMeasurement) {
|
|
52
62
|
const toolTypeData = toolData[toolType];
|
|
@@ -62,8 +72,12 @@ class MeasurementReport {
|
|
|
62
72
|
static getCornerstoneLabelFromDefaultState(defaultState) {
|
|
63
73
|
const {
|
|
64
74
|
findingSites = [],
|
|
65
|
-
finding
|
|
75
|
+
finding,
|
|
76
|
+
commentGroup
|
|
66
77
|
} = defaultState;
|
|
78
|
+
if (commentGroup?.TextValue) {
|
|
79
|
+
return commentGroup.TextValue;
|
|
80
|
+
}
|
|
67
81
|
const cornersoneFreeTextCodingValue = CodingScheme.codeValues.CORNERSTONEFREETEXT;
|
|
68
82
|
const freeTextLabel = findingSites.find(fs => fs.CodeValue === cornersoneFreeTextCodingValue);
|
|
69
83
|
if (freeTextLabel) {
|
|
@@ -124,7 +138,13 @@ class MeasurementReport {
|
|
|
124
138
|
sopInstanceUid: ReferencedSOPInstanceUID,
|
|
125
139
|
annotation: {
|
|
126
140
|
data: {
|
|
127
|
-
annotationUID
|
|
141
|
+
annotationUID,
|
|
142
|
+
handles: {
|
|
143
|
+
activeHandleIndex: 0,
|
|
144
|
+
textBox: {
|
|
145
|
+
hasMoved: false
|
|
146
|
+
}
|
|
147
|
+
}
|
|
128
148
|
},
|
|
129
149
|
annotationUID,
|
|
130
150
|
metadata: {
|
|
@@ -150,7 +170,13 @@ class MeasurementReport {
|
|
|
150
170
|
annotation: {
|
|
151
171
|
annotationUID,
|
|
152
172
|
data: {
|
|
153
|
-
annotationUID
|
|
173
|
+
annotationUID,
|
|
174
|
+
handles: {
|
|
175
|
+
activeHandleIndex: 0,
|
|
176
|
+
textBox: {
|
|
177
|
+
hasMoved: false
|
|
178
|
+
}
|
|
179
|
+
}
|
|
154
180
|
},
|
|
155
181
|
metadata: {
|
|
156
182
|
toolName: toolType,
|
|
@@ -169,23 +195,22 @@ class MeasurementReport {
|
|
|
169
195
|
metadata,
|
|
170
196
|
toolType
|
|
171
197
|
} = _ref3;
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
});
|
|
186
|
-
} else {
|
|
198
|
+
const contentSequenceArr = toArray(NUMGroup.ContentSequence);
|
|
199
|
+
const SCOORDGroup = contentSequenceArr.find(group => group.ValueType === "SCOORD");
|
|
200
|
+
const SCOORD3DGroup = contentSequenceArr.find(group => group.ValueType === "SCOORD3D");
|
|
201
|
+
const result = SCOORD3DGroup && this.processSCOORD3DGroup({
|
|
202
|
+
SCOORD3DGroup,
|
|
203
|
+
toolType
|
|
204
|
+
}) || SCOORDGroup && this.processSCOORDGroup({
|
|
205
|
+
SCOORDGroup,
|
|
206
|
+
toolType,
|
|
207
|
+
metadata,
|
|
208
|
+
sopInstanceUIDToImageIdMap
|
|
209
|
+
});
|
|
210
|
+
if (!result) {
|
|
187
211
|
throw new Error("No spatial coordinates group found.");
|
|
188
212
|
}
|
|
213
|
+
return result;
|
|
189
214
|
}
|
|
190
215
|
static processSpatialCoordinatesGroup(_ref4) {
|
|
191
216
|
let {
|
|
@@ -194,6 +219,8 @@ class MeasurementReport {
|
|
|
194
219
|
metadata,
|
|
195
220
|
findingGroup,
|
|
196
221
|
findingSiteGroups,
|
|
222
|
+
commentGroup,
|
|
223
|
+
commentPositionGroup,
|
|
197
224
|
toolType
|
|
198
225
|
} = _ref4;
|
|
199
226
|
const {
|
|
@@ -204,7 +231,8 @@ class MeasurementReport {
|
|
|
204
231
|
ReferencedFrameNumber,
|
|
205
232
|
SCOORD3DGroup,
|
|
206
233
|
FrameOfReferenceUID,
|
|
207
|
-
referencedImageId
|
|
234
|
+
referencedImageId,
|
|
235
|
+
textBoxPosition
|
|
208
236
|
} = this.getSpatialCoordinatesState({
|
|
209
237
|
NUMGroup,
|
|
210
238
|
sopInstanceUIDToImageIdMap,
|
|
@@ -215,12 +243,25 @@ class MeasurementReport {
|
|
|
215
243
|
const findingSites = findingSiteGroups.map(fsg => {
|
|
216
244
|
return addAccessors(fsg.ConceptCodeSequence);
|
|
217
245
|
});
|
|
246
|
+
if (commentPositionGroup) {
|
|
247
|
+
state.commentPositionGroup = commentPositionGroup;
|
|
248
|
+
const textBoxCoords = scoordToWorld({
|
|
249
|
+
is3DMeasurement: !referencedImageId,
|
|
250
|
+
referencedImageId
|
|
251
|
+
}, commentPositionGroup);
|
|
252
|
+
state.annotation.data.handles.textBox = {
|
|
253
|
+
hasMoved: true,
|
|
254
|
+
worldPosition: textBoxCoords[0]
|
|
255
|
+
};
|
|
256
|
+
}
|
|
218
257
|
state.finding = finding;
|
|
219
258
|
state.findingSites = findingSites;
|
|
259
|
+
state.commentGroup = commentGroup;
|
|
260
|
+
state.commentPositionGroup = commentPositionGroup;
|
|
220
261
|
if (finding) {
|
|
221
262
|
state.description = finding.CodeMeaning;
|
|
222
263
|
}
|
|
223
|
-
state.annotation.data.label =
|
|
264
|
+
state.annotation.data.label = this.getCornerstoneLabelFromDefaultState(state);
|
|
224
265
|
return {
|
|
225
266
|
defaultState: state,
|
|
226
267
|
state,
|
|
@@ -230,6 +271,7 @@ class MeasurementReport {
|
|
|
230
271
|
ReferencedSOPSequence,
|
|
231
272
|
ReferencedSOPInstanceUID,
|
|
232
273
|
referencedImageId,
|
|
274
|
+
textBoxPosition,
|
|
233
275
|
ReferencedFrameNumber,
|
|
234
276
|
SCOORD3DGroup,
|
|
235
277
|
FrameOfReferenceUID
|
|
@@ -241,6 +283,8 @@ class MeasurementReport {
|
|
|
241
283
|
} = MeasurementGroup;
|
|
242
284
|
const contentSequenceArr = toArray(ContentSequence);
|
|
243
285
|
const findingGroup = contentSequenceArr.find(group => this.codeValueMatch(group, FINDING));
|
|
286
|
+
const commentGroup = contentSequenceArr.find(group => this.codeValueMatch(group, COMMENT));
|
|
287
|
+
const commentPositionGroup = contentSequenceArr.find(group => this.codeValueMatch(group, COMMENT_POSITION));
|
|
244
288
|
const findingSiteGroups = contentSequenceArr.filter(group => this.codeValueMatch(group, FINDING_SITE, FINDING_SITE_OLD)) || [];
|
|
245
289
|
const NUMGroup = contentSequenceArr.find(group => group.ValueType === "NUM") || {
|
|
246
290
|
ContentSequence: contentSequenceArr.filter(group => group.ValueType === "SCOORD" || group.ValueType === "SCOORD3D")
|
|
@@ -251,6 +295,8 @@ class MeasurementReport {
|
|
|
251
295
|
metadata,
|
|
252
296
|
findingGroup,
|
|
253
297
|
findingSiteGroups,
|
|
298
|
+
commentGroup,
|
|
299
|
+
commentPositionGroup,
|
|
254
300
|
toolType
|
|
255
301
|
});
|
|
256
302
|
const {
|
|
@@ -7,6 +7,8 @@ declare class PlanarFreehandROI extends BaseAdapter3D {
|
|
|
7
7
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
8
8
|
finding?: unknown;
|
|
9
9
|
findingSites?: unknown;
|
|
10
|
+
commentGroup?: any;
|
|
11
|
+
commentPositionGroup?: any;
|
|
10
12
|
};
|
|
11
13
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
12
14
|
points: ({
|
|
@@ -15,8 +15,6 @@ class PlanarFreehandROI extends BaseAdapter3D {
|
|
|
15
15
|
const {
|
|
16
16
|
state,
|
|
17
17
|
NUMGroup,
|
|
18
|
-
scoord,
|
|
19
|
-
scoordArgs,
|
|
20
18
|
worldCoords,
|
|
21
19
|
referencedImageId,
|
|
22
20
|
ReferencedFrameNumber
|
|
@@ -38,11 +36,8 @@ class PlanarFreehandROI extends BaseAdapter3D {
|
|
|
38
36
|
closed: !isOpenContour
|
|
39
37
|
},
|
|
40
38
|
handles: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
textBox: {
|
|
44
|
-
hasMoved: false
|
|
45
|
-
}
|
|
39
|
+
...state.annotation.data.handles,
|
|
40
|
+
points
|
|
46
41
|
},
|
|
47
42
|
frameNumber: ReferencedFrameNumber
|
|
48
43
|
};
|
|
@@ -102,7 +97,7 @@ class PlanarFreehandROI extends BaseAdapter3D {
|
|
|
102
97
|
finding,
|
|
103
98
|
findingSites: findingSites || [],
|
|
104
99
|
ReferencedFrameOfReferenceUID: is3DMeasurement ? metadata.FrameOfReferenceUID : null,
|
|
105
|
-
use3DSpatialCoordinates:
|
|
100
|
+
use3DSpatialCoordinates: is3DMeasurement
|
|
106
101
|
};
|
|
107
102
|
}
|
|
108
103
|
}
|
|
@@ -7,6 +7,8 @@ declare class Probe extends BaseAdapter3D {
|
|
|
7
7
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
8
8
|
finding?: unknown;
|
|
9
9
|
findingSites?: unknown;
|
|
10
|
+
commentGroup?: any;
|
|
11
|
+
commentPositionGroup?: any;
|
|
10
12
|
};
|
|
11
13
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
12
14
|
points: ({
|
|
@@ -18,8 +18,6 @@ class Probe extends BaseAdapter3D {
|
|
|
18
18
|
const {
|
|
19
19
|
state,
|
|
20
20
|
NUMGroup,
|
|
21
|
-
scoord,
|
|
22
|
-
scoordArgs,
|
|
23
21
|
worldCoords,
|
|
24
22
|
referencedImageId,
|
|
25
23
|
ReferencedFrameNumber
|
|
@@ -32,11 +30,8 @@ class Probe extends BaseAdapter3D {
|
|
|
32
30
|
state.annotation.data = {
|
|
33
31
|
...state.annotation.data,
|
|
34
32
|
handles: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
textBox: {
|
|
38
|
-
hasMoved: false
|
|
39
|
-
}
|
|
33
|
+
...state.annotation.data.handles,
|
|
34
|
+
points: worldCoords
|
|
40
35
|
},
|
|
41
36
|
cachedStats,
|
|
42
37
|
frameNumber: ReferencedFrameNumber
|
|
@@ -6,6 +6,8 @@ export declare class RectangleROI extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
|
|
11
13
|
points: ({
|
|
@@ -28,11 +28,8 @@ class RectangleROI extends BaseAdapter3D {
|
|
|
28
28
|
state.annotation.data = {
|
|
29
29
|
...state.annotation.data,
|
|
30
30
|
handles: {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
textBox: {
|
|
34
|
-
hasMoved: false
|
|
35
|
-
}
|
|
31
|
+
...state.annotation.data.handles,
|
|
32
|
+
points: worldCoords
|
|
36
33
|
},
|
|
37
34
|
cachedStats,
|
|
38
35
|
frameNumber: ReferencedFrameNumber
|
|
@@ -47,10 +44,6 @@ class RectangleROI extends BaseAdapter3D {
|
|
|
47
44
|
findingSites,
|
|
48
45
|
metadata
|
|
49
46
|
} = tool;
|
|
50
|
-
const {
|
|
51
|
-
polyline,
|
|
52
|
-
closed
|
|
53
|
-
} = data.contour;
|
|
54
47
|
const {
|
|
55
48
|
referencedImageId
|
|
56
49
|
} = metadata;
|
|
@@ -58,7 +51,7 @@ class RectangleROI extends BaseAdapter3D {
|
|
|
58
51
|
is3DMeasurement,
|
|
59
52
|
referencedImageId
|
|
60
53
|
};
|
|
61
|
-
const corners = toScoords(scoordProps,
|
|
54
|
+
const corners = toScoords(scoordProps, data.handles.points);
|
|
62
55
|
const {
|
|
63
56
|
area,
|
|
64
57
|
perimeter
|
|
@@ -70,7 +63,7 @@ class RectangleROI extends BaseAdapter3D {
|
|
|
70
63
|
trackingIdentifierTextValue: this.trackingIdentifierTextValue,
|
|
71
64
|
finding,
|
|
72
65
|
findingSites: findingSites || [],
|
|
73
|
-
use3DSpatialCoordinates:
|
|
66
|
+
use3DSpatialCoordinates: is3DMeasurement
|
|
74
67
|
};
|
|
75
68
|
}
|
|
76
69
|
}
|
|
@@ -6,6 +6,8 @@ declare class UltrasoundDirectional extends BaseAdapter3D {
|
|
|
6
6
|
annotation: import("packages/tools/dist/esm/types").Annotation;
|
|
7
7
|
finding?: unknown;
|
|
8
8
|
findingSites?: unknown;
|
|
9
|
+
commentGroup?: any;
|
|
10
|
+
commentPositionGroup?: any;
|
|
9
11
|
};
|
|
10
12
|
static getTID300RepresentationArguments(tool: any, is3DMeasurement: any): {
|
|
11
13
|
point1: {
|
|
@@ -20,11 +20,8 @@ class UltrasoundDirectional extends BaseAdapter3D {
|
|
|
20
20
|
state.annotation.data = {
|
|
21
21
|
...state.annotation.data,
|
|
22
22
|
handles: {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
textBox: {
|
|
26
|
-
hasMoved: false
|
|
27
|
-
}
|
|
23
|
+
...state.annotation.data.handles,
|
|
24
|
+
points: worldCoords
|
|
28
25
|
},
|
|
29
26
|
frameNumber: ReferencedFrameNumber
|
|
30
27
|
};
|
|
@@ -1 +1,12 @@
|
|
|
1
1
|
export declare const NO_IMAGE_ID = "none";
|
|
2
|
+
export declare const CS3D_DESIGNATOR = "99CS3D";
|
|
3
|
+
export declare const TEXT_ANNOTATION_POSITION: {
|
|
4
|
+
schemeDesignator: string;
|
|
5
|
+
meaning: string;
|
|
6
|
+
value: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const COMMENT_CODE: {
|
|
9
|
+
schemeDesignator: string;
|
|
10
|
+
meaning: string;
|
|
11
|
+
value: string;
|
|
12
|
+
};
|
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
const NO_IMAGE_ID = "none";
|
|
2
|
+
const CS3D_DESIGNATOR = "99CS3D";
|
|
3
|
+
const TEXT_ANNOTATION_POSITION = {
|
|
4
|
+
schemeDesignator: CS3D_DESIGNATOR,
|
|
5
|
+
meaning: "Text Annotation Position",
|
|
6
|
+
value: "TextPosition"
|
|
7
|
+
};
|
|
8
|
+
const COMMENT_CODE = {
|
|
9
|
+
schemeDesignator: "DCM",
|
|
10
|
+
meaning: "Comment",
|
|
11
|
+
value: "121106"
|
|
12
|
+
};
|
|
2
13
|
|
|
3
|
-
export { NO_IMAGE_ID };
|
|
14
|
+
export { COMMENT_CODE, CS3D_DESIGNATOR, NO_IMAGE_ID, TEXT_ANNOTATION_POSITION };
|
|
@@ -37,6 +37,17 @@ declare const Cornerstone3DSR: {
|
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
39
|
CORNERSTONE_3D_TAG: string;
|
|
40
|
+
COMMENT_CODE: {
|
|
41
|
+
schemeDesignator: string;
|
|
42
|
+
meaning: string;
|
|
43
|
+
value: string;
|
|
44
|
+
};
|
|
45
|
+
NO_IMAGE_ID: string;
|
|
46
|
+
TEXT_ANNOTATION_POSITION: {
|
|
47
|
+
schemeDesignator: string;
|
|
48
|
+
meaning: string;
|
|
49
|
+
value: string;
|
|
50
|
+
};
|
|
40
51
|
};
|
|
41
52
|
declare const Cornerstone3DSEG: {
|
|
42
53
|
Segmentation: typeof Segmentation;
|
|
@@ -17,6 +17,7 @@ import * as index from './Segmentation/index.js';
|
|
|
17
17
|
import * as index$1 from './ParametricMap/index.js';
|
|
18
18
|
import * as index$2 from './RTStruct/index.js';
|
|
19
19
|
import KeyImage from './KeyImage.js';
|
|
20
|
+
import { COMMENT_CODE, NO_IMAGE_ID, TEXT_ANNOTATION_POSITION } from './constants/index.js';
|
|
20
21
|
|
|
21
22
|
const Cornerstone3DSR = {
|
|
22
23
|
BaseAdapter3D,
|
|
@@ -34,7 +35,10 @@ const Cornerstone3DSR = {
|
|
|
34
35
|
KeyImage,
|
|
35
36
|
MeasurementReport,
|
|
36
37
|
CodeScheme: CodingScheme,
|
|
37
|
-
CORNERSTONE_3D_TAG
|
|
38
|
+
CORNERSTONE_3D_TAG,
|
|
39
|
+
COMMENT_CODE,
|
|
40
|
+
NO_IMAGE_ID,
|
|
41
|
+
TEXT_ANNOTATION_POSITION
|
|
38
42
|
};
|
|
39
43
|
const Cornerstone3DSEG = {
|
|
40
44
|
Segmentation: index
|
|
@@ -36,6 +36,17 @@ declare const adaptersSR: {
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
CORNERSTONE_3D_TAG: string;
|
|
39
|
+
COMMENT_CODE: {
|
|
40
|
+
schemeDesignator: string;
|
|
41
|
+
meaning: string;
|
|
42
|
+
value: string;
|
|
43
|
+
};
|
|
44
|
+
NO_IMAGE_ID: string;
|
|
45
|
+
TEXT_ANNOTATION_POSITION: {
|
|
46
|
+
schemeDesignator: string;
|
|
47
|
+
meaning: string;
|
|
48
|
+
value: string;
|
|
49
|
+
};
|
|
39
50
|
};
|
|
40
51
|
};
|
|
41
52
|
declare const adaptersSEG: {
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.31.
|
|
1
|
+
export declare const version = "3.31.13";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/adapters",
|
|
3
|
-
"version": "3.31.
|
|
3
|
+
"version": "3.31.13",
|
|
4
4
|
"description": "Adapters for Cornerstone3D to/from formats including DICOM SR and others",
|
|
5
5
|
"module": "./dist/esm/index.js",
|
|
6
6
|
"types": "./dist/esm/index.d.ts",
|
|
@@ -90,8 +90,8 @@
|
|
|
90
90
|
"ndarray": "^1.0.19"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
|
-
"@cornerstonejs/core": "^3.31.
|
|
94
|
-
"@cornerstonejs/tools": "^3.31.
|
|
93
|
+
"@cornerstonejs/core": "^3.31.13",
|
|
94
|
+
"@cornerstonejs/tools": "^3.31.13"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "927b4adb9c9c46af4bb04f372c4580e40b9ee508"
|
|
97
97
|
}
|