@cornerstonejs/adapters 4.0.0-beta.3 → 4.0.0-beta.5

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.
Files changed (55) hide show
  1. package/README.md +7 -7
  2. package/dist/esm/adapters/Cornerstone/Bidirectional.js +1 -0
  3. package/dist/esm/adapters/Cornerstone/MeasurementReport.js +8 -6
  4. package/dist/esm/adapters/Cornerstone/ParametricMap.js +2 -2
  5. package/dist/esm/adapters/Cornerstone/Segmentation_4X.js +14 -11
  6. package/dist/esm/adapters/Cornerstone3D/Angle.d.ts +25 -62
  7. package/dist/esm/adapters/Cornerstone3D/Angle.js +29 -146
  8. package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.d.ts +15 -27
  9. package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.js +31 -161
  10. package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.d.ts +12 -21
  11. package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.js +58 -43
  12. package/dist/esm/adapters/Cornerstone3D/Bidirectional.d.ts +25 -80
  13. package/dist/esm/adapters/Cornerstone3D/Bidirectional.js +36 -173
  14. package/dist/esm/adapters/Cornerstone3D/CircleROI.d.ts +18 -33
  15. package/dist/esm/adapters/Cornerstone3D/CircleROI.js +27 -133
  16. package/dist/esm/adapters/Cornerstone3D/CobbAngle.d.ts +25 -62
  17. package/dist/esm/adapters/Cornerstone3D/CobbAngle.js +24 -149
  18. package/dist/esm/adapters/Cornerstone3D/EllipticalROI.d.ts +18 -30
  19. package/dist/esm/adapters/Cornerstone3D/EllipticalROI.js +27 -241
  20. package/dist/esm/adapters/Cornerstone3D/KeyImage.d.ts +17 -11
  21. package/dist/esm/adapters/Cornerstone3D/KeyImage.js +4 -4
  22. package/dist/esm/adapters/Cornerstone3D/LabelData.d.ts +11 -0
  23. package/dist/esm/adapters/Cornerstone3D/LabelData.js +102 -0
  24. package/dist/esm/adapters/Cornerstone3D/Length.d.ts +17 -45
  25. package/dist/esm/adapters/Cornerstone3D/Length.js +27 -125
  26. package/dist/esm/adapters/Cornerstone3D/MeasurementReport.d.ts +77 -37
  27. package/dist/esm/adapters/Cornerstone3D/MeasurementReport.js +176 -51
  28. package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.d.ts +18 -41
  29. package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.js +26 -138
  30. package/dist/esm/adapters/Cornerstone3D/Probe.d.ts +17 -32
  31. package/dist/esm/adapters/Cornerstone3D/Probe.js +34 -106
  32. package/dist/esm/adapters/Cornerstone3D/RectangleROI.d.ts +19 -33
  33. package/dist/esm/adapters/Cornerstone3D/RectangleROI.js +28 -115
  34. package/dist/esm/adapters/Cornerstone3D/UltrasoundDirectional.d.ts +9 -15
  35. package/dist/esm/adapters/Cornerstone3D/UltrasoundDirectional.js +12 -21
  36. package/dist/esm/adapters/Cornerstone3D/constants/index.d.ts +11 -0
  37. package/dist/esm/adapters/Cornerstone3D/constants/index.js +12 -1
  38. package/dist/esm/adapters/Cornerstone3D/index.d.ts +11 -0
  39. package/dist/esm/adapters/Cornerstone3D/index.js +6 -2
  40. package/dist/esm/adapters/helpers/checkOrientation.js +2 -2
  41. package/dist/esm/adapters/helpers/index.d.ts +3 -0
  42. package/dist/esm/adapters/helpers/index.js +3 -0
  43. package/dist/esm/adapters/helpers/scoordToWorld.d.ts +5 -0
  44. package/dist/esm/adapters/helpers/scoordToWorld.js +32 -0
  45. package/dist/esm/adapters/helpers/toArray.js +1 -1
  46. package/dist/esm/adapters/helpers/toPoint3.d.ts +3 -0
  47. package/dist/esm/adapters/helpers/toPoint3.js +18 -0
  48. package/dist/esm/adapters/helpers/toScoordType.d.ts +23 -0
  49. package/dist/esm/adapters/helpers/toScoordType.js +33 -0
  50. package/dist/esm/adapters/index.d.ts +12 -1
  51. package/dist/esm/adapters/index.js +1 -0
  52. package/dist/esm/version.d.ts +1 -1
  53. package/package.json +6 -7
  54. package/dist/esm/adapters/helpers/compareArrays.d.ts +0 -1
  55. package/dist/esm/adapters/helpers/compareArrays.js +0 -18
@@ -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 };
@@ -1,65 +1,37 @@
1
1
  import BaseAdapter3D from "./BaseAdapter3D";
2
2
  export default class Length extends BaseAdapter3D {
3
- static getMeasurementDataFromScoord({ defaultState, NUMGroup, SCOORDGroup, ReferencedFrameNumber, imageToWorldCoords }: {
4
- defaultState: any;
5
- NUMGroup: any;
6
- SCOORDGroup: any;
7
- ReferencedFrameNumber: any;
8
- imageToWorldCoords: any;
9
- }): any;
10
- static getMeasurementDataFromScoord3d({ defaultState, SCOORD3DGroup }: {
11
- defaultState: any;
12
- SCOORD3DGroup: any;
13
- }): any;
14
- static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any): any;
15
- static getTID300RepresentationArguments(tool: any, worldToImageCoords: any): {
16
- point1: {
17
- x: any;
18
- y: any;
19
- z: any;
20
- };
21
- point2: {
22
- x: any;
23
- y: any;
24
- z: any;
25
- };
26
- distance: any;
27
- trackingIdentifierTextValue: string;
28
- finding: any;
29
- findingSites: any;
30
- ReferencedFrameOfReferenceUID: any;
31
- use3DSpatialCoordinates: boolean;
32
- } | {
33
- point1: {
34
- x: any;
35
- y: any;
36
- };
37
- point2: {
38
- x: any;
39
- y: any;
40
- };
41
- distance: any;
42
- trackingIdentifierTextValue: string;
43
- finding: any;
44
- findingSites: any;
45
- use3DSpatialCoordinates: boolean;
3
+ static getMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, metadata: any): {
4
+ description?: string;
5
+ sopInstanceUid?: string;
6
+ annotation: import("packages/tools/dist/esm/types").Annotation;
7
+ finding?: unknown;
8
+ findingSites?: unknown;
9
+ commentGroup?: any;
10
+ commentPositionGroup?: any;
46
11
  };
47
- static getTID300RepresentationArgumentsSCOORD3D(tool: any): {
12
+ static getTID300RepresentationArguments(tool: any, is3DMeasurement?: boolean): {
48
13
  point1: {
49
14
  x: any;
50
15
  y: any;
51
16
  z: any;
17
+ } | {
18
+ x: number;
19
+ y: number;
20
+ z?: undefined;
52
21
  };
53
22
  point2: {
54
23
  x: any;
55
24
  y: any;
56
25
  z: any;
26
+ } | {
27
+ x: number;
28
+ y: number;
29
+ z?: undefined;
57
30
  };
58
31
  distance: any;
59
32
  trackingIdentifierTextValue: string;
60
33
  finding: any;
61
34
  findingSites: any;
62
- ReferencedFrameOfReferenceUID: any;
63
35
  use3DSpatialCoordinates: boolean;
64
36
  };
65
37
  }
@@ -1,6 +1,9 @@
1
1
  import { utilities } from 'dcmjs';
2
2
  import MeasurementReport from './MeasurementReport.js';
3
3
  import BaseAdapter3D from './BaseAdapter3D.js';
4
+ import 'buffer';
5
+ import { toScoord } from '../helpers/toScoordType.js';
6
+ import '@cornerstonejs/core';
4
7
 
5
8
  var _Length;
6
9
  const {
@@ -8,89 +11,33 @@ const {
8
11
  } = utilities.TID300;
9
12
  const LENGTH = "Length";
10
13
  class Length extends BaseAdapter3D {
11
- static getMeasurementDataFromScoord(_ref) {
12
- let {
13
- defaultState,
14
- NUMGroup,
15
- SCOORDGroup,
16
- ReferencedFrameNumber,
17
- imageToWorldCoords
18
- } = _ref;
19
- const referencedImageId = defaultState.annotation.metadata.referencedImageId;
14
+ static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata) {
20
15
  const {
21
- GraphicData
22
- } = SCOORDGroup;
23
- const worldCoords = [];
24
- for (let i = 0; i < GraphicData.length; i += 2) {
25
- const point = imageToWorldCoords(referencedImageId, [GraphicData[i], GraphicData[i + 1]]);
26
- worldCoords.push(point);
27
- }
28
- const state = defaultState;
16
+ state,
17
+ NUMGroup,
18
+ worldCoords,
19
+ referencedImageId,
20
+ ReferencedFrameNumber
21
+ } = MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, this.toolType);
22
+ const cachedStats = referencedImageId ? {
23
+ [`imageId:${referencedImageId}`]: {
24
+ length: NUMGroup ? NUMGroup.MeasuredValueSequence.NumericValue : 0
25
+ }
26
+ } : {};
29
27
  state.annotation.data = {
28
+ ...state.annotation.data,
30
29
  handles: {
30
+ ...state.annotation.data.handles,
31
31
  points: [worldCoords[0], worldCoords[1]],
32
- activeHandleIndex: 0,
33
- textBox: {
34
- hasMoved: false
35
- }
36
- },
37
- cachedStats: {
38
- [`imageId:${referencedImageId}`]: {
39
- length: NUMGroup ? NUMGroup.MeasuredValueSequence.NumericValue : 0
40
- }
32
+ activeHandleIndex: 0
41
33
  },
34
+ cachedStats,
42
35
  frameNumber: ReferencedFrameNumber
43
36
  };
44
37
  return state;
45
38
  }
46
- static getMeasurementDataFromScoord3d(_ref2) {
47
- let {
48
- defaultState,
49
- SCOORD3DGroup
50
- } = _ref2;
51
- const {
52
- GraphicData
53
- } = SCOORD3DGroup;
54
- const worldCoords = GraphicData;
55
- const state = defaultState;
56
- state.annotation.data = {
57
- handles: {
58
- points: [worldCoords.slice(0, 3), worldCoords.slice(3, 6)],
59
- activeHandleIndex: 0,
60
- textBox: {
61
- hasMoved: false
62
- }
63
- },
64
- cachedStats: {}
65
- };
66
- return state;
67
- }
68
- static getMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, imageToWorldCoords, metadata) {
69
- const {
70
- defaultState,
71
- NUMGroup,
72
- SCOORDGroup,
73
- SCOORD3DGroup,
74
- ReferencedFrameNumber
75
- } = MeasurementReport.getSetupMeasurementData(MeasurementGroup, sopInstanceUIDToImageIdMap, metadata, this.toolType);
76
- if (SCOORDGroup) {
77
- return this.getMeasurementDataFromScoord({
78
- defaultState,
79
- NUMGroup,
80
- SCOORDGroup,
81
- ReferencedFrameNumber,
82
- imageToWorldCoords
83
- });
84
- } else if (SCOORD3DGroup) {
85
- return this.getMeasurementDataFromScoord3d({
86
- defaultState,
87
- SCOORD3DGroup
88
- });
89
- } else {
90
- throw new Error("Can't get measurement data with missing SCOORD and SCOORD3D groups.");
91
- }
92
- }
93
- static getTID300RepresentationArguments(tool, worldToImageCoords) {
39
+ static getTID300RepresentationArguments(tool) {
40
+ let is3DMeasurement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
94
41
  const {
95
42
  data,
96
43
  finding,
@@ -104,19 +51,12 @@ class Length extends BaseAdapter3D {
104
51
  const {
105
52
  referencedImageId
106
53
  } = metadata;
107
- if (!referencedImageId) {
108
- return this.getTID300RepresentationArgumentsSCOORD3D(tool);
109
- }
110
- const start = worldToImageCoords(referencedImageId, handles.points[0]);
111
- const end = worldToImageCoords(referencedImageId, handles.points[1]);
112
- const point1 = {
113
- x: start[0],
114
- y: start[1]
115
- };
116
- const point2 = {
117
- x: end[0],
118
- y: end[1]
54
+ const scoordProps = {
55
+ is3DMeasurement,
56
+ referencedImageId
119
57
  };
58
+ const point1 = toScoord(scoordProps, handles.points[0]);
59
+ const point2 = toScoord(scoordProps, handles.points[1]);
120
60
  const {
121
61
  length: distance
122
62
  } = cachedStats[`imageId:${referencedImageId}`] || {};
@@ -127,45 +67,7 @@ class Length extends BaseAdapter3D {
127
67
  trackingIdentifierTextValue: this.trackingIdentifierTextValue,
128
68
  finding,
129
69
  findingSites: findingSites || [],
130
- use3DSpatialCoordinates: false
131
- };
132
- }
133
- static getTID300RepresentationArgumentsSCOORD3D(tool) {
134
- const {
135
- data,
136
- finding,
137
- findingSites,
138
- metadata
139
- } = tool;
140
- const {
141
- cachedStats = {},
142
- handles
143
- } = data;
144
- const start = handles.points[0];
145
- const end = handles.points[1];
146
- const point1 = {
147
- x: start[0],
148
- y: start[1],
149
- z: start[2]
150
- };
151
- const point2 = {
152
- x: end[0],
153
- y: end[1],
154
- z: end[2]
155
- };
156
- const cachedStatsKeys = Object.keys(cachedStats)[0];
157
- const {
158
- length: distance
159
- } = cachedStatsKeys ? cachedStats[cachedStatsKeys] : {};
160
- return {
161
- point1,
162
- point2,
163
- distance,
164
- trackingIdentifierTextValue: this.trackingIdentifierTextValue,
165
- finding,
166
- findingSites: findingSites || [],
167
- ReferencedFrameOfReferenceUID: metadata.FrameOfReferenceUID,
168
- use3DSpatialCoordinates: true
70
+ use3DSpatialCoordinates: is3DMeasurement
169
71
  };
170
72
  }
171
73
  }
@@ -1,26 +1,41 @@
1
+ import { type Types as CSTypes } from "@cornerstonejs/core";
2
+ import type { Types } from "@cornerstonejs/tools";
3
+ import LabelData from "./LabelData";
4
+ type Annotation = Types.Annotation;
1
5
  type SpatialCoordinatesState = {
2
6
  description?: string;
3
7
  sopInstanceUid?: string;
4
- annotation: {
5
- annotationUID: string;
6
- metadata: {
7
- toolName: string;
8
- referencedImageId?: string;
9
- FrameOfReferenceUID: string;
10
- label: string;
11
- };
12
- };
8
+ annotation: Annotation;
13
9
  finding?: unknown;
14
10
  findingSites?: unknown;
11
+ commentGroup?: any;
12
+ commentPositionGroup?: any;
13
+ };
14
+ type ScoordType = {
15
+ GraphicData: number[];
15
16
  };
16
17
  type SetupMeasurementData = {
17
18
  defaultState: SpatialCoordinatesState;
18
- NUMGroup: Record<string, unknown>;
19
- SCOORDGroup?: Record<string, unknown>;
19
+ state?: SpatialCoordinatesState;
20
+ is3DMeasurement?: boolean;
21
+ scoord?: ScoordType;
22
+ worldCoords?: CSTypes.Point3[];
23
+ scoordArgs?: {
24
+ referencedImageId: string;
25
+ is3DMeasurement: boolean;
26
+ };
27
+ NUMGroup: {
28
+ MeasuredValueSequence: {
29
+ NumericValue: number;
30
+ };
31
+ };
32
+ SCOORDGroup?: ScoordType;
20
33
  ReferencedSOPSequence?: Record<string, unknown>;
21
34
  ReferencedSOPInstanceUID?: string;
35
+ referencedImageId?: string;
36
+ textBoxPosition?: ScoordType;
22
37
  ReferencedFrameNumber?: string;
23
- SCOORD3DGroup?: Record<string, unknown>;
38
+ SCOORD3DGroup?: ScoordType;
24
39
  FrameOfReferenceUID?: string;
25
40
  };
26
41
  type SpatialCoordinatesData = Omit<SetupMeasurementData, "defaultState" | "NUMGroup"> & {
@@ -37,17 +52,19 @@ export interface MeasurementAdapter {
37
52
  trackingIdentifiers: Set<string>;
38
53
  parentType: string;
39
54
  init(toolType: string, representation: any, options?: AdapterOptions): any;
40
- getMeasurementData(measurementGroup: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, trackingIdentifier: string): any;
55
+ getMeasurementData(measurementGroup: any, sopInstanceUIDToImageIdMap: any, metadata: any, trackingIdentifier: string): any;
41
56
  isValidCornerstoneTrackingIdentifier(trackingIdentifier: string): boolean;
42
- getTID300RepresentationArguments(tool: any, worldToImageCoords: any): Record<string, unknown>;
57
+ isValidMeasurement(measurementGroup: any): boolean;
58
+ getTID300RepresentationArguments(tool: any, is3DMeasurement: any): Record<string, unknown>;
43
59
  }
44
60
  export default class MeasurementReport {
45
61
  static CORNERSTONE_3D_TAG: string;
46
62
  static measurementAdapterByToolType: Map<string, MeasurementAdapter>;
63
+ static measurementAdaptersByType: Map<string, MeasurementAdapter[]>;
47
64
  static measurementAdapterByTrackingIdentifier: Map<string, MeasurementAdapter>;
48
- static getTID300ContentItem(tool: any, ReferencedSOPSequence: any, toolClass: any, worldToImageCoords: any): any;
65
+ static getTID300ContentItem(tool: any, ReferencedSOPSequence: any, toolClass: any, is3DMeasurement: any): LabelData;
49
66
  static codeValueMatch: (group: any, code: any, oldCode?: any) => boolean;
50
- static getMeasurementGroup(toolType: any, toolData: any, ReferencedSOPSequence: any, worldToImageCoords: any): any;
67
+ static getMeasurementGroup(toolType: any, toolData: any, ReferencedSOPSequence: any, is3DMeasurement: any): any;
51
68
  static getCornerstoneLabelFromDefaultState(defaultState: any): any;
52
69
  static generateDatasetMeta(): {
53
70
  FileMetaInformationVersion: {
@@ -76,7 +93,35 @@ export default class MeasurementReport {
76
93
  toolType: any;
77
94
  sopInstanceUIDToImageIdMap: any;
78
95
  metadata: any;
79
- }): SpatialCoordinatesData;
96
+ }): {
97
+ SCOORDGroup: any;
98
+ ReferencedSOPSequence: any;
99
+ ReferencedSOPInstanceUID: any;
100
+ ReferencedFrameNumber: any;
101
+ referencedImageId: any;
102
+ state: {
103
+ description: any;
104
+ sopInstanceUid: any;
105
+ annotation: {
106
+ data: {
107
+ annotationUID: any;
108
+ cachedStats: {};
109
+ handles: {
110
+ activeHandleIndex: number;
111
+ textBox: {
112
+ hasMoved: boolean;
113
+ };
114
+ };
115
+ };
116
+ annotationUID: any;
117
+ metadata: {
118
+ toolName: any;
119
+ referencedImageId: any;
120
+ FrameOfReferenceUID: any;
121
+ };
122
+ };
123
+ };
124
+ };
80
125
  static processSCOORD3DGroup({ SCOORD3DGroup, toolType }: {
81
126
  SCOORD3DGroup: any;
82
127
  toolType: any;
@@ -87,35 +132,27 @@ export default class MeasurementReport {
87
132
  metadata: any;
88
133
  toolType: any;
89
134
  }): SpatialCoordinatesData;
90
- static processSpatialCoordinatesGroup({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, findingGroup, findingSiteGroups, toolType }: {
135
+ static processSpatialCoordinatesGroup({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, findingGroup, findingSiteGroups, commentGroup, commentPositionGroup, toolType }: {
91
136
  NUMGroup: any;
92
137
  sopInstanceUIDToImageIdMap: any;
93
138
  metadata: any;
94
139
  findingGroup: any;
95
140
  findingSiteGroups: any;
141
+ commentGroup: any;
142
+ commentPositionGroup: any;
96
143
  toolType: any;
97
144
  }): {
98
- defaultState: {
99
- finding: any;
100
- findingSites: any;
101
- description?: string;
102
- sopInstanceUid?: string;
103
- annotation: {
104
- annotationUID: string;
105
- metadata: {
106
- toolName: string;
107
- referencedImageId?: string;
108
- FrameOfReferenceUID: string;
109
- label: string;
110
- };
111
- };
112
- };
145
+ defaultState: SpatialCoordinatesState;
146
+ state: SpatialCoordinatesState;
113
147
  NUMGroup: any;
114
- SCOORDGroup: Record<string, unknown>;
148
+ scoord: ScoordType;
149
+ SCOORDGroup: ScoordType;
115
150
  ReferencedSOPSequence: Record<string, unknown>;
116
151
  ReferencedSOPInstanceUID: string;
152
+ referencedImageId: string;
153
+ textBoxPosition: ScoordType;
117
154
  ReferencedFrameNumber: string;
118
- SCOORD3DGroup: Record<string, unknown>;
155
+ SCOORD3DGroup: ScoordType;
119
156
  FrameOfReferenceUID: string;
120
157
  };
121
158
  static getSetupMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, metadata: any, toolType: any): SetupMeasurementData;
@@ -135,10 +172,13 @@ export default class MeasurementReport {
135
172
  toolData: any;
136
173
  toolTypes: any;
137
174
  }): string;
138
- static generateReport(toolState: any, metadataProvider: any, worldToImageCoords: any, options: any): any;
139
- static generateToolState(dataset: any, sopInstanceUIDToImageIdMap: any, imageToWorldCoords: any, metadata: any, hooks: any): {};
175
+ static generateReport(toolState: any, metadataProvider: any, options: any): any;
176
+ static generateToolState(dataset: any, sopInstanceUIDToImageIdMap: any, metadata: any, hooks: any): {};
140
177
  static registerTool(toolAdapter: MeasurementAdapter, replace?: boolean | ((original: any) => void)): void;
141
178
  static registerTrackingIdentifier(toolClass: any, ...trackingIdentifiers: string[]): void;
142
179
  static getAdapterForTrackingIdentifier(trackingIdentifier: string): MeasurementAdapter;
180
+ static getAdapterForCodeType(measurementGroup: any): MeasurementAdapter;
181
+ static registerAdapterTypes(adapter: any, ...types: any[]): void;
182
+ static getAdaptersForTypes(graphicCode: string, graphicType: string, pointCount: number): any[];
143
183
  }
144
184
  export {};