@cornerstonejs/adapters 3.7.5 → 3.7.6
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/Segmentation_4X.js +1 -1
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.d.ts +4 -1
- package/dist/esm/adapters/Cornerstone3D/MeasurementReport.js +3 -9
- package/dist/esm/adapters/Cornerstone3D/Segmentation/labelmapImagesFromBuffer.js +1 -1
- package/dist/esm/adapters/enums/Events.d.ts +1 -1
- package/dist/esm/adapters/enums/Events.js +1 -2
- package/dist/esm/adapters/enums/index.d.ts +1 -2
- package/dist/esm/adapters/enums/index.js +1 -1
- package/dist/esm/adapters/helpers/copyStudyTags.d.ts +7 -0
- package/dist/esm/adapters/helpers/copyStudyTags.js +19 -0
- package/dist/esm/adapters/helpers/index.d.ts +1 -0
- package/dist/esm/adapters/helpers/index.js +1 -0
- package/dist/esm/index.d.ts +1 -2
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import ndarray from 'ndarray';
|
|
|
3
3
|
import getDatasetsFromImages from '../helpers/getDatasetsFromImages.js';
|
|
4
4
|
import checkOrientation from '../helpers/checkOrientation.js';
|
|
5
5
|
import compareArrays from '../helpers/compareArrays.js';
|
|
6
|
-
import Events from '../enums/Events.js';
|
|
6
|
+
import { Events } from '../enums/Events.js';
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
rotateDirectionCosinesInPlane,
|
|
@@ -39,7 +39,10 @@ export default class MeasurementReport {
|
|
|
39
39
|
vr: string;
|
|
40
40
|
};
|
|
41
41
|
};
|
|
42
|
-
static generateDerivationSourceDataset: (instance: any) =>
|
|
42
|
+
static generateDerivationSourceDataset: (instance: any) => {
|
|
43
|
+
_meta: any;
|
|
44
|
+
_vrMap: any;
|
|
45
|
+
};
|
|
43
46
|
static getSetupMeasurementData(MeasurementGroup: any, sopInstanceUIDToImageIdMap: any, metadata: any, toolType: any): {
|
|
44
47
|
defaultState: {
|
|
45
48
|
description: any;
|
|
@@ -3,6 +3,7 @@ import CORNERSTONE_3D_TAG from './cornerstone3DTag.js';
|
|
|
3
3
|
import { toArray } from '../helpers/toArray.js';
|
|
4
4
|
import { codeMeaningEquals } from '../helpers/codeMeaningEquals.js';
|
|
5
5
|
import 'buffer';
|
|
6
|
+
import { copyStudyTags } from '../helpers/copyStudyTags.js';
|
|
6
7
|
import CodingScheme from './CodingScheme.js';
|
|
7
8
|
|
|
8
9
|
var _MeasurementReport;
|
|
@@ -282,15 +283,8 @@ _MeasurementReport.codeValueMatch = (group, code, oldCode) => {
|
|
|
282
283
|
return CodingSchemeDesignator == code.CodingSchemeDesignator && CodeValue == code.CodeValue || oldCode && CodingSchemeDesignator == oldCode.CodingSchemeDesignator && CodeValue == oldCode.CodeValue;
|
|
283
284
|
};
|
|
284
285
|
_MeasurementReport.generateDerivationSourceDataset = instance => {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
};
|
|
288
|
-
const _meta = _MeasurementReport.generateDatasetMeta();
|
|
289
|
-
const derivationSourceDataset = {
|
|
290
|
-
...instance,
|
|
291
|
-
_meta: _meta,
|
|
292
|
-
_vrMap: _vrMap
|
|
293
|
-
};
|
|
286
|
+
_MeasurementReport.generateDatasetMeta();
|
|
287
|
+
const derivationSourceDataset = copyStudyTags(instance);
|
|
294
288
|
return derivationSourceDataset;
|
|
295
289
|
};
|
|
296
290
|
|
|
@@ -5,7 +5,7 @@ import ndarray from 'ndarray';
|
|
|
5
5
|
import checkOrientation from '../../helpers/checkOrientation.js';
|
|
6
6
|
import { getValidOrientations, getSegmentMetadata, unpackPixelData, calculateCentroid, readFromUnpackedChunks, alignPixelDataWithSourceData, getSegmentIndex, findReferenceSourceImageId } from '../../Cornerstone/Segmentation_4X.js';
|
|
7
7
|
import { compactMergeSegmentDataWithoutInformationLoss } from './compactMergeSegData.js';
|
|
8
|
-
import Events from '../../enums/Events.js';
|
|
8
|
+
import { Events } from '../../enums/Events.js';
|
|
9
9
|
|
|
10
10
|
const {
|
|
11
11
|
DicomMessage,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { Events };
|
|
1
|
+
export * from "./Events";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Events } from './Events.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const patientTags = ["PatientName", "PatientID", "PatientBirthDate", "PatientBirthTime", "PatientID", "IssuerOfPatientID", "OtherPatientIDs", "OtherPatientIDsSequence", "PatientSex", "PatientIdentityRemoved", "DeidentificationMethodCodeSequence"];
|
|
2
|
+
const studyTags = ["StudyDate", "StudyTime", "StudyStatusID", "StudyPriorityID", "StudyInstanceUID", "StudyDescription", "AccessionNumber", "StudyID", "ReferringPhysicianName", "BodyPartExamined", "TimezoneOffsetFromUTC"];
|
|
3
|
+
const patientStudyTags = [...patientTags, ...studyTags];
|
|
4
|
+
function copyStudyTags(src) {
|
|
5
|
+
const study = {
|
|
6
|
+
_meta: src._meta,
|
|
7
|
+
_vrMap: src._vrMap
|
|
8
|
+
};
|
|
9
|
+
for (const tagKey of patientStudyTags) {
|
|
10
|
+
const value = src[tagKey];
|
|
11
|
+
if (value === undefined) {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
study[tagKey] = value;
|
|
15
|
+
}
|
|
16
|
+
return study;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { copyStudyTags, patientStudyTags, patientTags, studyTags };
|
|
@@ -2,4 +2,5 @@ import { toArray } from "./toArray";
|
|
|
2
2
|
import { codeMeaningEquals } from "./codeMeaningEquals";
|
|
3
3
|
import { graphicTypeEquals } from "./graphicTypeEquals";
|
|
4
4
|
import { downloadDICOMData } from "./downloadDICOMData";
|
|
5
|
+
export { copyStudyTags } from "./copyStudyTags";
|
|
5
6
|
export { toArray, codeMeaningEquals, graphicTypeEquals, downloadDICOMData };
|
|
@@ -2,3 +2,4 @@ export { toArray } from './toArray.js';
|
|
|
2
2
|
export { codeMeaningEquals } from './codeMeaningEquals.js';
|
|
3
3
|
export { graphicTypeEquals } from './graphicTypeEquals.js';
|
|
4
4
|
export { downloadDICOMData } from './downloadDICOMData.js';
|
|
5
|
+
export { copyStudyTags } from './copyStudyTags.js';
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { adaptersSR, adaptersSEG, adaptersPMAP, adaptersRT, Enums, helpers };
|
|
1
|
+
export * from "./adapters";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/adapters",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.6",
|
|
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",
|
|
@@ -84,8 +84,8 @@
|
|
|
84
84
|
"ndarray": "^1.0.19"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@cornerstonejs/core": "^3.7.
|
|
88
|
-
"@cornerstonejs/tools": "^3.7.
|
|
87
|
+
"@cornerstonejs/core": "^3.7.6",
|
|
88
|
+
"@cornerstonejs/tools": "^3.7.6"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "ac7b9b61b1ba9d4e466d158d6c07332075312f54"
|
|
91
91
|
}
|