larvitar 1.3.4 → 1.3.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.
- package/README.md +3 -3
- package/imaging/imageParsing.js +14 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
## Dicom Image Toolkit for CornerstoneJS
|
|
8
8
|
|
|
9
|
-
### Current version: 1.3.
|
|
9
|
+
### Current version: 1.3.5
|
|
10
10
|
|
|
11
|
-
### Latest Stable version: 1.3.
|
|
11
|
+
### Latest Stable version: 1.3.5
|
|
12
12
|
|
|
13
|
-
### Latest Published Release: 1.3.
|
|
13
|
+
### Latest Published Release: 1.3.5
|
|
14
14
|
|
|
15
15
|
This library provides common DICOM functionalities to be used in web-applications: it's wrapper that simplifies the use of cornerstone-js environment.
|
|
16
16
|
Orthogonal multiplanar reformat is included as well as custom loader/exporter for nrrd files and [Vuex](https://vuex.vuejs.org/) custom integration.
|
package/imaging/imageParsing.js
CHANGED
|
@@ -78,11 +78,10 @@ export const readFile = function (entry) {
|
|
|
78
78
|
* @instance
|
|
79
79
|
* @function parseDataSet
|
|
80
80
|
* @param {Object} dataSet - dicom parser dataSet object
|
|
81
|
-
* @param {
|
|
81
|
+
* @param {Object} metadata - Initialized metadata object
|
|
82
82
|
* @param {Array} customFilter - Optional filter: {tags:[], frameId: 0}
|
|
83
83
|
*/
|
|
84
|
-
// This function iterates through dataSet recursively and
|
|
85
|
-
// to the output array passed into it
|
|
84
|
+
// This function iterates through dataSet recursively and store tag values into metadata object
|
|
86
85
|
export const parseDataSet = function (dataSet, metadata, customFilter) {
|
|
87
86
|
// customFilter= {tags:[], frameId:xxx}
|
|
88
87
|
// the dataSet.elements object contains properties for each element parsed. The name of the property
|
|
@@ -113,7 +112,18 @@ export const parseDataSet = function (dataSet, metadata, customFilter) {
|
|
|
113
112
|
}
|
|
114
113
|
} else {
|
|
115
114
|
let tagValue = parseTag(dataSet, propertyName, element);
|
|
116
|
-
|
|
115
|
+
|
|
116
|
+
// identify duplicated tags (keep the first occurency and store the others in another tag eg x00280010_uuid)
|
|
117
|
+
if (metadata[propertyName] !== undefined) {
|
|
118
|
+
console.debug(
|
|
119
|
+
`Identified duplicated tag "${propertyName}", values are:`,
|
|
120
|
+
metadata[propertyName],
|
|
121
|
+
tagValue
|
|
122
|
+
);
|
|
123
|
+
metadata[propertyName + "_" + uuidv4()] = tagValue;
|
|
124
|
+
} else {
|
|
125
|
+
metadata[propertyName] = tagValue;
|
|
126
|
+
}
|
|
117
127
|
}
|
|
118
128
|
}
|
|
119
129
|
} catch (err) {
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"medical",
|
|
7
7
|
"cornerstone"
|
|
8
8
|
],
|
|
9
|
-
"version": "1.3.
|
|
9
|
+
"version": "1.3.5",
|
|
10
10
|
"description": "javascript library for parsing, loading, rendering and interacting with DICOM images",
|
|
11
11
|
"repository": {
|
|
12
12
|
"url": "https://github.com/dvisionlab/Larvitar.git",
|
|
@@ -54,4 +54,4 @@
|
|
|
54
54
|
"module": "dist/larvitar.js",
|
|
55
55
|
"browser": "dist/larvitar.js",
|
|
56
56
|
"type": "module"
|
|
57
|
-
}
|
|
57
|
+
}
|