@cornerstonejs/dicom-image-loader 2.0.0-beta.23 → 2.0.0-beta.25
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/cornerstoneDICOMImageLoader.bundle.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.bundle.min.js.map +1 -1
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/dynamic-import/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/esm/src/constants/index.d.ts +2 -0
- package/dist/esm/src/constants/index.js +2 -0
- package/dist/esm/src/imageLoader/configure.js +1 -1
- package/dist/esm/src/imageLoader/createImage.js +1 -3
- package/dist/esm/src/imageLoader/wadors/metaData/metaDataProvider.js +21 -4
- package/package.json +15 -8
|
@@ -3,7 +3,7 @@ import external from '../externalModules';
|
|
|
3
3
|
import registerLoaders from './registerLoaders';
|
|
4
4
|
function configure(options) {
|
|
5
5
|
if (!options.cornerstone || !options.dicomParser) {
|
|
6
|
-
throw new Error('cornerstoneWADOImageLoader.configure: Options object must contain the
|
|
6
|
+
throw new Error('cornerstoneWADOImageLoader.configure: Options object must contain the cornerstone and dicomParser packages.');
|
|
7
7
|
}
|
|
8
8
|
setOptions(options);
|
|
9
9
|
external.cornerstone = options.cornerstone;
|
|
@@ -120,9 +120,7 @@ function createImage(imageId, pixelData, transferSyntax, options = {}) {
|
|
|
120
120
|
if (!useRGBA) {
|
|
121
121
|
imageData = {
|
|
122
122
|
...imageData,
|
|
123
|
-
data: new Uint8ClampedArray(imageFrame.
|
|
124
|
-
imageFrame.columns *
|
|
125
|
-
imageFrame.rows),
|
|
123
|
+
data: new Uint8ClampedArray(3 * imageFrame.columns * imageFrame.rows),
|
|
126
124
|
};
|
|
127
125
|
}
|
|
128
126
|
convertColorSpace(imageFrame, imageData.data, useRGBA);
|
|
@@ -95,17 +95,23 @@ function metaDataProvider(type, imageId) {
|
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
if (type === MetadataModules.IMAGE_PLANE) {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
let imageOrientationPatient = extractOrientationFromMetadata(metaData);
|
|
99
|
+
let imagePositionPatient = extractPositionFromMetadata(metaData);
|
|
100
100
|
const pixelSpacing = getNumberValues(metaData['00280030'], 2);
|
|
101
101
|
let columnPixelSpacing = null;
|
|
102
102
|
let rowPixelSpacing = null;
|
|
103
|
+
let rowCosines = null;
|
|
104
|
+
let columnCosines = null;
|
|
105
|
+
let usingDefaultValues = false;
|
|
103
106
|
if (pixelSpacing) {
|
|
104
107
|
rowPixelSpacing = pixelSpacing[0];
|
|
105
108
|
columnPixelSpacing = pixelSpacing[1];
|
|
106
109
|
}
|
|
107
|
-
|
|
108
|
-
|
|
110
|
+
else {
|
|
111
|
+
usingDefaultValues = true;
|
|
112
|
+
rowPixelSpacing = 1;
|
|
113
|
+
columnPixelSpacing = 1;
|
|
114
|
+
}
|
|
109
115
|
if (imageOrientationPatient) {
|
|
110
116
|
rowCosines = [
|
|
111
117
|
parseFloat(imageOrientationPatient[0]),
|
|
@@ -118,6 +124,16 @@ function metaDataProvider(type, imageId) {
|
|
|
118
124
|
parseFloat(imageOrientationPatient[5]),
|
|
119
125
|
];
|
|
120
126
|
}
|
|
127
|
+
else {
|
|
128
|
+
rowCosines = [0, 1, 0];
|
|
129
|
+
columnCosines = [0, 0, -1];
|
|
130
|
+
usingDefaultValues = true;
|
|
131
|
+
imageOrientationPatient = [...rowCosines, ...columnCosines];
|
|
132
|
+
}
|
|
133
|
+
if (!imagePositionPatient) {
|
|
134
|
+
imagePositionPatient = [0, 0, 0];
|
|
135
|
+
usingDefaultValues = true;
|
|
136
|
+
}
|
|
121
137
|
return {
|
|
122
138
|
frameOfReferenceUID: getValue(metaData['00200052']),
|
|
123
139
|
rows: getNumberValue(metaData['00280010']),
|
|
@@ -131,6 +147,7 @@ function metaDataProvider(type, imageId) {
|
|
|
131
147
|
pixelSpacing,
|
|
132
148
|
rowPixelSpacing,
|
|
133
149
|
columnPixelSpacing,
|
|
150
|
+
usingDefaultValues,
|
|
134
151
|
};
|
|
135
152
|
}
|
|
136
153
|
if (type === MetadataModules.ULTRASOUND_ENHANCED_REGION) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cornerstonejs/dicom-image-loader",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.25",
|
|
4
4
|
"description": "Cornerstone Image Loader for DICOM WADO-URI and WADO-RS and Local file",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"DICOM",
|
|
@@ -26,12 +26,19 @@
|
|
|
26
26
|
"access": "public"
|
|
27
27
|
},
|
|
28
28
|
"exports": {
|
|
29
|
-
".":
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"./
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
".": "./dist/esm/src/imageLoader/index.js",
|
|
30
|
+
"./umd": "./dist/umd/cornerstoneDICOMImageLoader.bundle.min.js",
|
|
31
|
+
"./dynamic-umd": "./dist/dynamic-import/cornerstoneDICOMImageLoader.min.js",
|
|
32
|
+
"./constants": "./dist/esm/src/constants/index.js",
|
|
33
|
+
"./constants/*": "./dist/esm/src/constants/*.js",
|
|
34
|
+
"./imageLoader": "./dist/esm/src/imageLoader/index.js",
|
|
35
|
+
"./imageLoader/*": "./dist/esm/src/imageLoader/*.js",
|
|
36
|
+
"./imageLoader/wadors": "./dist/esm/src/imageLoader/wadors/index.js",
|
|
37
|
+
"./imageLoader/wadors/*": "./dist/esm/src/imageLoader/wadors/*.js",
|
|
38
|
+
"./imageLoader/wadouri": "./dist/esm/src/imageLoader/wadouri/index.js",
|
|
39
|
+
"./imageLoader/wadouri/*": "./dist/esm/src/imageLoader/wadouri/*.js",
|
|
40
|
+
"./types": "./dist/esm/src/types/index.d.ts",
|
|
41
|
+
"./types/*": "./dist/esm/src/types/*.d.ts"
|
|
35
42
|
},
|
|
36
43
|
"scripts": {
|
|
37
44
|
"build:loader": "yarn run build:all && yarn run copy-dts",
|
|
@@ -96,5 +103,5 @@
|
|
|
96
103
|
"path": "./node_modules/cz-conventional-changelog"
|
|
97
104
|
}
|
|
98
105
|
},
|
|
99
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "90947900761ea63ff5342676f7c31a0e3e82cc18"
|
|
100
107
|
}
|