@cornerstonejs/adapters 4.11.1 → 4.11.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.
- package/dist/esm/adapters/Cornerstone/Bidirectional.js +0 -1
- package/dist/esm/adapters/Cornerstone/MeasurementReport.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/Angle.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/ArrowAnnotate.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/BaseAdapter3D.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/Bidirectional.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/CircleROI.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/CobbAngle.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/EllipticalROI.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/LabelData.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/Length.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.d.ts +23 -10
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.js +38 -48
- package/dist/esm/adapters/Cornerstone3D/PlanarFreehandROI.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/Probe.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/RTStruct/RTSS.d.ts +10 -67
- package/dist/esm/adapters/Cornerstone3D/RTStruct/RTSS.js +111 -119
- package/dist/esm/adapters/Cornerstone3D/RTStruct/index.d.ts +2 -2
- package/dist/esm/adapters/Cornerstone3D/RTStruct/index.js +1 -1
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getRTROIObservationsSequence.d.ts +3 -3
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getRTROIObservationsSequence.js +4 -4
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getReferencedFrameOfReferenceSequence.d.ts +1 -11
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getReferencedFrameOfReferenceSequence.js +10 -20
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getReferencedSeriesSequence.d.ts +1 -4
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getReferencedSeriesSequence.js +27 -26
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getStructureSetModule.d.ts +4 -3
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getStructureSetModule.js +5 -5
- package/dist/esm/adapters/Cornerstone3D/RectangleROI.js +0 -1
- package/dist/esm/adapters/Cornerstone3D/Segmentation/generateSegmentation.d.ts +7 -1
- package/dist/esm/adapters/Cornerstone3D/Segmentation/generateSegmentation.js +47 -10
- package/dist/esm/adapters/Cornerstone3D/constants/index.d.ts +44 -0
- package/dist/esm/adapters/Cornerstone3D/constants/index.js +41 -8
- package/dist/esm/adapters/Cornerstone3D/index.d.ts +18 -18
- package/dist/esm/adapters/helpers/copySeriesTags.d.ts +2 -4
- package/dist/esm/adapters/helpers/copySeriesTags.js +4 -7
- package/dist/esm/adapters/helpers/copyStudyTags.js +2 -2
- package/dist/esm/adapters/helpers/downloadDICOMData.js +6 -9
- package/dist/esm/adapters/index.js +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +6 -4
- package/dist/esm/utilities/createInstance.d.ts +2 -0
- package/dist/esm/utilities/createInstance.js +39 -0
- package/dist/esm/utilities/index.d.ts +3 -0
- package/dist/esm/utilities/index.js +2 -0
- package/dist/esm/utilities/referencedMetadataProvider.d.ts +65 -0
- package/dist/esm/utilities/referencedMetadataProvider.js +114 -0
- package/dist/esm/version.d.ts +1 -1
- package/package.json +86 -86
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getPatientModule.d.ts +0 -13
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getPatientModule.js +0 -22
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getRTSeriesModule.d.ts +0 -4
- package/dist/esm/adapters/Cornerstone3D/RTStruct/utilities/getRTSeriesModule.js +0 -9
|
@@ -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 'buffer';
|
|
6
5
|
import { toScoord } from '../helpers/toScoordType.js';
|
|
7
6
|
|
|
8
7
|
var _ArrowAnnotate;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { utilities } from 'dcmjs';
|
|
2
2
|
import MeasurementReport from './MeasurementReport.js';
|
|
3
3
|
import { toArray } from '../helpers/toArray.js';
|
|
4
|
-
import 'buffer';
|
|
5
4
|
import { toScoord } from '../helpers/toScoordType.js';
|
|
6
5
|
import { scoordToWorld } from '../helpers/scoordToWorld.js';
|
|
7
6
|
import BaseAdapter3D from './BaseAdapter3D.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type Types as CSTypes } from
|
|
2
|
-
import type { Types } from
|
|
3
|
-
import LabelData from
|
|
1
|
+
import { type Types as CSTypes } from '@cornerstonejs/core';
|
|
2
|
+
import type { Types } from '@cornerstonejs/tools';
|
|
3
|
+
import LabelData from './LabelData';
|
|
4
4
|
type Annotation = Types.Annotation;
|
|
5
5
|
type SpatialCoordinatesState = {
|
|
6
6
|
description?: string;
|
|
@@ -38,7 +38,7 @@ type SetupMeasurementData = {
|
|
|
38
38
|
SCOORD3DGroup?: ScoordType;
|
|
39
39
|
FrameOfReferenceUID?: string;
|
|
40
40
|
};
|
|
41
|
-
type SpatialCoordinatesData = Omit<SetupMeasurementData,
|
|
41
|
+
type SpatialCoordinatesData = Omit<SetupMeasurementData, 'defaultState' | 'NUMGroup'> & {
|
|
42
42
|
state: SpatialCoordinatesState;
|
|
43
43
|
};
|
|
44
44
|
export type AdapterOptions = {
|
|
@@ -76,7 +76,7 @@ export default class MeasurementReport {
|
|
|
76
76
|
vr: string;
|
|
77
77
|
};
|
|
78
78
|
ImplementationClassUID: {
|
|
79
|
-
Value:
|
|
79
|
+
Value: string[];
|
|
80
80
|
vr: string;
|
|
81
81
|
};
|
|
82
82
|
ImplementationVersionName: {
|
|
@@ -85,10 +85,23 @@ export default class MeasurementReport {
|
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
static generateDerivationSourceDataset: (instance: any) => {
|
|
88
|
+
StudyInstanceUID?: string;
|
|
89
|
+
SeriesInstanceUID?: string;
|
|
90
|
+
SeriesDescription?: string;
|
|
91
|
+
SeriesNumber?: number | string;
|
|
92
|
+
SeriesDate?: string;
|
|
93
|
+
SeriesTime?: string;
|
|
94
|
+
Modality?: string;
|
|
95
|
+
SOPInstanceUID?: string;
|
|
96
|
+
SOPClassUID?: string;
|
|
97
|
+
InstanceNumber?: string | number;
|
|
98
|
+
FrameOfReferenceUID?: string;
|
|
99
|
+
PerFrameFunctionalGroupsSequence?: CSTypes.FunctionalGroups[];
|
|
100
|
+
SharedFunctionalGroupsSequence?: CSTypes.FunctionalGroups;
|
|
88
101
|
_meta: any;
|
|
89
102
|
_vrMap: any;
|
|
90
103
|
};
|
|
91
|
-
static processSCOORDGroup({ SCOORDGroup, toolType, sopInstanceUIDToImageIdMap, metadata }: {
|
|
104
|
+
static processSCOORDGroup({ SCOORDGroup, toolType, sopInstanceUIDToImageIdMap, metadata, }: {
|
|
92
105
|
SCOORDGroup: any;
|
|
93
106
|
toolType: any;
|
|
94
107
|
sopInstanceUIDToImageIdMap: any;
|
|
@@ -122,17 +135,17 @@ export default class MeasurementReport {
|
|
|
122
135
|
};
|
|
123
136
|
};
|
|
124
137
|
};
|
|
125
|
-
static processSCOORD3DGroup({ SCOORD3DGroup, toolType }: {
|
|
138
|
+
static processSCOORD3DGroup({ SCOORD3DGroup, toolType, }: {
|
|
126
139
|
SCOORD3DGroup: any;
|
|
127
140
|
toolType: any;
|
|
128
141
|
}): SpatialCoordinatesData;
|
|
129
|
-
static getSpatialCoordinatesState({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, toolType }: {
|
|
142
|
+
static getSpatialCoordinatesState({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, toolType, }: {
|
|
130
143
|
NUMGroup: any;
|
|
131
144
|
sopInstanceUIDToImageIdMap: any;
|
|
132
145
|
metadata: any;
|
|
133
146
|
toolType: any;
|
|
134
147
|
}): SpatialCoordinatesData;
|
|
135
|
-
static processSpatialCoordinatesGroup({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, findingGroup, findingSiteGroups, commentGroup, commentPositionGroup, toolType }: {
|
|
148
|
+
static processSpatialCoordinatesGroup({ NUMGroup, sopInstanceUIDToImageIdMap, metadata, findingGroup, findingSiteGroups, commentGroup, commentPositionGroup, toolType, }: {
|
|
136
149
|
NUMGroup: any;
|
|
137
150
|
sopInstanceUIDToImageIdMap: any;
|
|
138
151
|
metadata: any;
|
|
@@ -156,7 +169,7 @@ export default class MeasurementReport {
|
|
|
156
169
|
FrameOfReferenceUID: string;
|
|
157
170
|
};
|
|
158
171
|
static getSetupMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, metadata: any, toolType: any): SetupMeasurementData;
|
|
159
|
-
static generateReferencedSOPSequence({ toolData, toolTypes, metadataProvider, imageId, sopInstanceUIDsToSeriesInstanceUIDMap, derivationSourceDatasets }: {
|
|
172
|
+
static generateReferencedSOPSequence({ toolData, toolTypes, metadataProvider, imageId, sopInstanceUIDsToSeriesInstanceUIDMap, derivationSourceDatasets, }: {
|
|
160
173
|
toolData: any;
|
|
161
174
|
toolTypes: any;
|
|
162
175
|
metadataProvider: any;
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { utilities as utilities$1, derivations, normalizers, data } from 'dcmjs';
|
|
2
|
-
import { utilities, cache } from '@cornerstonejs/core';
|
|
2
|
+
import { utilities, cache, Enums } from '@cornerstonejs/core';
|
|
3
3
|
import CORNERSTONE_3D_TAG from './cornerstone3DTag.js';
|
|
4
4
|
import { toArray } from '../helpers/toArray.js';
|
|
5
5
|
import { codeMeaningEquals } from '../helpers/codeMeaningEquals.js';
|
|
6
|
-
import 'buffer';
|
|
7
6
|
import { copyStudyTags } from '../helpers/copyStudyTags.js';
|
|
8
7
|
import { copySeriesTags } from '../helpers/copySeriesTags.js';
|
|
9
8
|
import { scoordToWorld } from '../helpers/scoordToWorld.js';
|
|
10
9
|
import { toPoint3 } from '../helpers/toPoint3.js';
|
|
11
10
|
import CodingScheme from './CodingScheme.js';
|
|
12
|
-
import { COMMENT_CODE, TEXT_ANNOTATION_POSITION, NO_IMAGE_ID } from './constants/index.js';
|
|
11
|
+
import { COMMENT_CODE, TEXT_ANNOTATION_POSITION, metaSRAnnotation, NO_IMAGE_ID } from './constants/index.js';
|
|
13
12
|
import LabelData from './LabelData.js';
|
|
14
13
|
|
|
15
14
|
var _MeasurementReport;
|
|
15
|
+
const {
|
|
16
|
+
MetadataModules
|
|
17
|
+
} = Enums;
|
|
16
18
|
const {
|
|
17
19
|
TID1500,
|
|
18
20
|
addAccessors
|
|
@@ -31,8 +33,8 @@ const {
|
|
|
31
33
|
DicomMetaDictionary
|
|
32
34
|
} = data;
|
|
33
35
|
const FINDING = {
|
|
34
|
-
CodingSchemeDesignator:
|
|
35
|
-
CodeValue:
|
|
36
|
+
CodingSchemeDesignator: 'DCM',
|
|
37
|
+
CodeValue: '121071'
|
|
36
38
|
};
|
|
37
39
|
const COMMENT = {
|
|
38
40
|
CodingSchemeDesignator: COMMENT_CODE.schemeDesignator,
|
|
@@ -43,12 +45,12 @@ const COMMENT_POSITION = {
|
|
|
43
45
|
CodeValue: TEXT_ANNOTATION_POSITION.value
|
|
44
46
|
};
|
|
45
47
|
const FINDING_SITE = {
|
|
46
|
-
CodingSchemeDesignator:
|
|
47
|
-
CodeValue:
|
|
48
|
+
CodingSchemeDesignator: 'SCT',
|
|
49
|
+
CodeValue: '363698007'
|
|
48
50
|
};
|
|
49
51
|
const FINDING_SITE_OLD = {
|
|
50
|
-
CodingSchemeDesignator:
|
|
51
|
-
CodeValue:
|
|
52
|
+
CodingSchemeDesignator: 'SRT',
|
|
53
|
+
CodeValue: 'G-C0E3'
|
|
52
54
|
};
|
|
53
55
|
class MeasurementReport {
|
|
54
56
|
static getTID300ContentItem(tool, ReferencedSOPSequence, toolClass, is3DMeasurement) {
|
|
@@ -91,27 +93,7 @@ class MeasurementReport {
|
|
|
91
93
|
}
|
|
92
94
|
}
|
|
93
95
|
static generateDatasetMeta() {
|
|
94
|
-
|
|
95
|
-
fileMetaInformationVersionArray[1] = 1;
|
|
96
|
-
const _meta = {
|
|
97
|
-
FileMetaInformationVersion: {
|
|
98
|
-
Value: [fileMetaInformationVersionArray.buffer],
|
|
99
|
-
vr: "OB"
|
|
100
|
-
},
|
|
101
|
-
TransferSyntaxUID: {
|
|
102
|
-
Value: ["1.2.840.10008.1.2.1"],
|
|
103
|
-
vr: "UI"
|
|
104
|
-
},
|
|
105
|
-
ImplementationClassUID: {
|
|
106
|
-
Value: [DicomMetaDictionary.uid()],
|
|
107
|
-
vr: "UI"
|
|
108
|
-
},
|
|
109
|
-
ImplementationVersionName: {
|
|
110
|
-
Value: ["dcmjs"],
|
|
111
|
-
vr: "SH"
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
return _meta;
|
|
96
|
+
return metaSRAnnotation;
|
|
115
97
|
}
|
|
116
98
|
static processSCOORDGroup(_ref) {
|
|
117
99
|
let {
|
|
@@ -128,7 +110,7 @@ class MeasurementReport {
|
|
|
128
110
|
ReferencedFrameNumber = 1
|
|
129
111
|
} = ReferencedSOPSequence;
|
|
130
112
|
const referencedImageId = sopInstanceUIDToImageIdMap[`${ReferencedSOPInstanceUID}:${ReferencedFrameNumber}`];
|
|
131
|
-
const imagePlaneModule = metadata.get(
|
|
113
|
+
const imagePlaneModule = metadata.get('imagePlaneModule', referencedImageId);
|
|
132
114
|
const annotationUID = DicomMetaDictionary.uid();
|
|
133
115
|
return {
|
|
134
116
|
SCOORDGroup,
|
|
@@ -201,8 +183,8 @@ class MeasurementReport {
|
|
|
201
183
|
toolType
|
|
202
184
|
} = _ref3;
|
|
203
185
|
const contentSequenceArr = toArray(NUMGroup.ContentSequence);
|
|
204
|
-
const SCOORDGroup = contentSequenceArr.find(group => group.ValueType ===
|
|
205
|
-
const SCOORD3DGroup = contentSequenceArr.find(group => group.ValueType ===
|
|
186
|
+
const SCOORDGroup = contentSequenceArr.find(group => group.ValueType === 'SCOORD');
|
|
187
|
+
const SCOORD3DGroup = contentSequenceArr.find(group => group.ValueType === 'SCOORD3D');
|
|
206
188
|
const result = SCOORD3DGroup && this.processSCOORD3DGroup({
|
|
207
189
|
SCOORD3DGroup,
|
|
208
190
|
toolType
|
|
@@ -213,7 +195,7 @@ class MeasurementReport {
|
|
|
213
195
|
sopInstanceUIDToImageIdMap
|
|
214
196
|
});
|
|
215
197
|
if (!result) {
|
|
216
|
-
throw new Error(
|
|
198
|
+
throw new Error('No spatial coordinates group found.');
|
|
217
199
|
}
|
|
218
200
|
return result;
|
|
219
201
|
}
|
|
@@ -291,8 +273,8 @@ class MeasurementReport {
|
|
|
291
273
|
const commentGroup = contentSequenceArr.find(group => this.codeValueMatch(group, COMMENT));
|
|
292
274
|
const commentPositionGroup = contentSequenceArr.find(group => this.codeValueMatch(group, COMMENT_POSITION));
|
|
293
275
|
const findingSiteGroups = contentSequenceArr.filter(group => this.codeValueMatch(group, FINDING_SITE, FINDING_SITE_OLD)) || [];
|
|
294
|
-
const NUMGroup = contentSequenceArr.find(group => group.ValueType ===
|
|
295
|
-
ContentSequence: contentSequenceArr.filter(group => group.ValueType ===
|
|
276
|
+
const NUMGroup = contentSequenceArr.find(group => group.ValueType === 'NUM') || {
|
|
277
|
+
ContentSequence: contentSequenceArr.filter(group => group.ValueType === 'SCOORD' || group.ValueType === 'SCOORD3D')
|
|
296
278
|
};
|
|
297
279
|
const spatialGroup = this.processSpatialCoordinatesGroup({
|
|
298
280
|
NUMGroup,
|
|
@@ -335,8 +317,8 @@ class MeasurementReport {
|
|
|
335
317
|
toolData,
|
|
336
318
|
toolTypes
|
|
337
319
|
}) : imageId;
|
|
338
|
-
const sopCommonModule = metadataProvider.get(
|
|
339
|
-
const instance = metadataProvider.get(
|
|
320
|
+
const sopCommonModule = metadataProvider.get('sopCommonModule', effectiveImageId);
|
|
321
|
+
const instance = metadataProvider.get('instance', effectiveImageId);
|
|
340
322
|
const {
|
|
341
323
|
sopInstanceUID,
|
|
342
324
|
sopClassUID
|
|
@@ -349,7 +331,7 @@ class MeasurementReport {
|
|
|
349
331
|
const derivationSourceDataset = MeasurementReport.generateDerivationSourceDataset(instance);
|
|
350
332
|
derivationSourceDatasets.push(derivationSourceDataset);
|
|
351
333
|
}
|
|
352
|
-
const frameNumber = metadataProvider.get(
|
|
334
|
+
const frameNumber = metadataProvider.get('frameNumber', effectiveImageId);
|
|
353
335
|
const ReferencedSOPSequence = {
|
|
354
336
|
ReferencedSOPClassUID: sopClassUID,
|
|
355
337
|
ReferencedSOPInstanceUID: sopInstanceUID,
|
|
@@ -414,7 +396,11 @@ class MeasurementReport {
|
|
|
414
396
|
});
|
|
415
397
|
report.dataset = Object.assign(report.dataset, contentItem);
|
|
416
398
|
report.dataset._meta = _meta;
|
|
417
|
-
report.SpecificCharacterSet =
|
|
399
|
+
report.SpecificCharacterSet = 'ISO_IR 192';
|
|
400
|
+
report.dataset.InstanceNumber ||= options.InstanceNumber || 1;
|
|
401
|
+
if (options.predecessorImageId) {
|
|
402
|
+
Object.assign(report.dataset, metadataProvider.get(MetadataModules.PREDECESSOR_SEQUENCE, options.predecessorImageId));
|
|
403
|
+
}
|
|
418
404
|
if (is3DSR) {
|
|
419
405
|
report.dataset.SOPClassUID = DicomMetaDictionary.sopClassUIDsByName.Comprehensive3DSR;
|
|
420
406
|
if (!report.dataset.SOPClassUID) {
|
|
@@ -424,13 +410,16 @@ class MeasurementReport {
|
|
|
424
410
|
return report;
|
|
425
411
|
}
|
|
426
412
|
static generateToolState(dataset, sopInstanceUIDToImageIdMap, metadata, hooks) {
|
|
427
|
-
if (dataset.ContentTemplateSequence.TemplateIdentifier !==
|
|
428
|
-
throw new Error(
|
|
413
|
+
if (dataset.ContentTemplateSequence.TemplateIdentifier !== '1500') {
|
|
414
|
+
throw new Error('This package can currently only interpret DICOM SR TID 1500');
|
|
429
415
|
}
|
|
430
|
-
const REPORT =
|
|
431
|
-
const GROUP =
|
|
432
|
-
const TRACKING_IDENTIFIER =
|
|
433
|
-
const TRACKING_UNIQUE_IDENTIFIER =
|
|
416
|
+
const REPORT = 'Imaging Measurements';
|
|
417
|
+
const GROUP = 'Measurement Group';
|
|
418
|
+
const TRACKING_IDENTIFIER = 'Tracking Identifier';
|
|
419
|
+
const TRACKING_UNIQUE_IDENTIFIER = 'Tracking Unique Identifier';
|
|
420
|
+
const {
|
|
421
|
+
imageId: predecessorImageId
|
|
422
|
+
} = dataset;
|
|
434
423
|
const imagingMeasurementContent = toArray(dataset.ContentSequence).find(codeMeaningEquals(REPORT));
|
|
435
424
|
const measurementGroups = toArray(imagingMeasurementContent.ContentSequence).filter(codeMeaningEquals(GROUP));
|
|
436
425
|
const measurementData = {};
|
|
@@ -447,13 +436,14 @@ class MeasurementReport {
|
|
|
447
436
|
if (toolAdapter) {
|
|
448
437
|
const measurement = toolAdapter.getMeasurementData(measurementGroup, sopInstanceUIDToImageIdMap, metadata, trackingIdentifierValue);
|
|
449
438
|
measurement.TrackingUniqueIdentifier = trackingUniqueIdentifierValue;
|
|
439
|
+
measurement.predecessorImageId = predecessorImageId;
|
|
450
440
|
console.log(`=== ${toolAdapter.toolType} ===`);
|
|
451
441
|
console.log(measurement);
|
|
452
442
|
measurementData[toolAdapter.toolType] ||= [];
|
|
453
443
|
measurementData[toolAdapter.toolType].push(measurement);
|
|
454
444
|
}
|
|
455
445
|
} catch (e) {
|
|
456
|
-
console.warn(
|
|
446
|
+
console.warn('Unable to generate tool state for', measurementGroup, e);
|
|
457
447
|
}
|
|
458
448
|
});
|
|
459
449
|
return measurementData;
|
|
@@ -465,7 +455,7 @@ class MeasurementReport {
|
|
|
465
455
|
if (!replace) {
|
|
466
456
|
throw new Error(`The registered tool name ${registerName} already exists in adapters, use a different toolType or use replace`);
|
|
467
457
|
}
|
|
468
|
-
if (typeof replace ===
|
|
458
|
+
if (typeof replace === 'function') {
|
|
469
459
|
replace(this.measurementAdapterByToolType.get(registerName));
|
|
470
460
|
}
|
|
471
461
|
}
|
|
@@ -2,7 +2,6 @@ import MeasurementReport from './MeasurementReport.js';
|
|
|
2
2
|
import { utilities } from 'dcmjs';
|
|
3
3
|
import { vec3 } from 'gl-matrix';
|
|
4
4
|
import BaseAdapter3D from './BaseAdapter3D.js';
|
|
5
|
-
import 'buffer';
|
|
6
5
|
import { toScoords } from '../helpers/toScoordType.js';
|
|
7
6
|
import '@cornerstonejs/core';
|
|
8
7
|
|
|
@@ -1,67 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
ReferringPhysicianName: string;
|
|
12
|
-
OperatorsName: string;
|
|
13
|
-
StructureSetDate: any;
|
|
14
|
-
StructureSetTime: any;
|
|
15
|
-
_meta: any;
|
|
16
|
-
SeriesInstanceUID: any;
|
|
17
|
-
SeriesNumber: string;
|
|
18
|
-
PatientID: any;
|
|
19
|
-
PatientName: any;
|
|
20
|
-
PatientBirthDate: string;
|
|
21
|
-
PatientAge: any;
|
|
22
|
-
PatientSex: any;
|
|
23
|
-
PatientWeight: any;
|
|
24
|
-
StudyDate: any;
|
|
25
|
-
StudyTime: any;
|
|
26
|
-
StudyID: string;
|
|
27
|
-
AccessionNumber: any;
|
|
28
|
-
StructureSetROISequence: any[];
|
|
29
|
-
ROIContourSequence: any[];
|
|
30
|
-
RTROIObservationsSequence: any[];
|
|
31
|
-
ReferencedSeriesSequence: any[];
|
|
32
|
-
ReferencedFrameOfReferenceSequence: any[];
|
|
33
|
-
}>;
|
|
34
|
-
declare function generateRTSSFromAnnotations(annotations: any, metadataProvider: any, DicomMetadataStore: any): {
|
|
35
|
-
StudyInstanceUID: any;
|
|
36
|
-
SOPClassUID: string;
|
|
37
|
-
SOPInstanceUID: any;
|
|
38
|
-
Manufacturer: string;
|
|
39
|
-
Modality: string;
|
|
40
|
-
FrameOfReferenceUID: any;
|
|
41
|
-
PositionReferenceIndicator: string;
|
|
42
|
-
StructureSetLabel: any;
|
|
43
|
-
StructureSetName: any;
|
|
44
|
-
ReferringPhysicianName: string;
|
|
45
|
-
OperatorsName: string;
|
|
46
|
-
StructureSetDate: any;
|
|
47
|
-
StructureSetTime: any;
|
|
48
|
-
_meta: any;
|
|
49
|
-
SeriesInstanceUID: any;
|
|
50
|
-
SeriesNumber: string;
|
|
51
|
-
PatientID: any;
|
|
52
|
-
PatientName: any;
|
|
53
|
-
PatientBirthDate: string;
|
|
54
|
-
PatientAge: any;
|
|
55
|
-
PatientSex: any;
|
|
56
|
-
PatientWeight: any;
|
|
57
|
-
StudyDate: any;
|
|
58
|
-
StudyTime: any;
|
|
59
|
-
StudyID: string;
|
|
60
|
-
AccessionNumber: any;
|
|
61
|
-
StructureSetROISequence: any[];
|
|
62
|
-
ROIContourSequence: any[];
|
|
63
|
-
RTROIObservationsSequence: any[];
|
|
64
|
-
ReferencedSeriesSequence: any[];
|
|
65
|
-
ReferencedFrameOfReferenceSequence: any[];
|
|
66
|
-
};
|
|
67
|
-
export { generateRTSSFromSegmentations, generateRTSSFromAnnotations };
|
|
1
|
+
import type { Types } from '@cornerstonejs/core';
|
|
2
|
+
import type { Types as ToolTypes } from '@cornerstonejs/tools';
|
|
3
|
+
import '../../../utilities/referencedMetadataProvider';
|
|
4
|
+
type Segmentation = ToolTypes.Segmentation;
|
|
5
|
+
export declare function generateRTSSFromSegmentations(segmentation: Segmentation, metadataProvider: any, _DicomMetadataStore: any): Promise<Types.RtssModule>;
|
|
6
|
+
export declare function generateRTSSFromLabelmap(segmentations: Segmentation, options: any): Promise<Types.RtssModule>;
|
|
7
|
+
export declare function generateRTSSFromAnnotations(segmentations: any, annotations: any, options: any): Types.RtssModule;
|
|
8
|
+
export declare function generateRTSSFromContour(segmentations: Segmentation, options: any): Types.RtssModule;
|
|
9
|
+
export declare function generateRTSSFromRepresentation(segmentations: Segmentation, options?: {}): Types.RtssModule | Promise<Types.RtssModule>;
|
|
10
|
+
export {};
|