@radicalimaging/static-wado-creator 1.3.0 → 1.3.2

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.
@@ -1,6 +1,5 @@
1
1
  /* eslint-disable no-param-reassign */
2
2
  const { Tags, readBulkData } = require("@radicalimaging/static-wado-util");
3
- const fs = require("fs");
4
3
  const dcmjs = require("dcmjs");
5
4
 
6
5
  const StaticWado = require("./StaticWado");
@@ -72,7 +72,7 @@ const { mkdicomwebConfig } = ConfigPoint.register({
72
72
  {
73
73
  key: "-t, --content-type <type>",
74
74
  description: 'Destination type to compress to (choices: "jpeg", "jls", "lei", "jls-lossy", "jhc", "jxl" or DICOM Transfer Syntax UID - default: "jls")',
75
- defaultValue: "jhc",
75
+ defaultValue: "jls",
76
76
  customParser: compressionOptionParser,
77
77
  },
78
78
  {
@@ -135,8 +135,8 @@ const { mkdicomwebConfig } = ConfigPoint.register({
135
135
  defaultValue: false,
136
136
  },
137
137
  {
138
- key: "--no-thumb",
139
- description: "Skip thumbnail generation",
138
+ key: "--thumb",
139
+ description: "Generate thumbnails",
140
140
  },
141
141
  {
142
142
  key: "--dcm2jpg",
@@ -201,14 +201,14 @@ const beforeEncode = (options, encoder) => {
201
201
 
202
202
  function scale(imageFrame, imageInfo) {
203
203
  const { rows, columns, bitsPerPixel, pixelRepresentation, samplesPerPixel } = imageInfo;
204
- let arrayConstructor = Float32Array;
204
+ let ArrayConstructor = Float32Array;
205
205
  if (bitsPerPixel === 8) {
206
- arrayConstructor = pixelRepresentation ? Int8Array : Uint8Array;
206
+ ArrayConstructor = pixelRepresentation ? Int8Array : Uint8Array;
207
207
  } else if (bitsPerPixel > 8 && bitsPerPixel <= 16) {
208
- arrayConstructor = pixelRepresentation ? Int16Array : Uint16Array;
208
+ ArrayConstructor = pixelRepresentation ? Int16Array : Uint16Array;
209
209
  }
210
210
  const src = {
211
- pixelData: new arrayConstructor(imageFrame.buffer),
211
+ pixelData: new ArrayConstructor(imageFrame.buffer),
212
212
  rows,
213
213
  columns,
214
214
  samplesPerPixel,
@@ -218,7 +218,7 @@ function scale(imageFrame, imageInfo) {
218
218
  columns: Math.round(columns / 4),
219
219
  samplesPerPixel,
220
220
  };
221
- dest.pixelData = new arrayConstructor(dest.rows * dest.columns * samplesPerPixel);
221
+ dest.pixelData = new ArrayConstructor(dest.rows * dest.columns * samplesPerPixel);
222
222
  replicate(src, dest);
223
223
 
224
224
  return {
@@ -16,7 +16,6 @@ const extensions = {
16
16
  };
17
17
 
18
18
  const baseHasher = hashFactory.hasher();
19
- const MAX_HASH = 1024 * 1024;
20
19
 
21
20
  const hasher = {
22
21
  hash: (v) => {
package/license.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Radical Imaging Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radicalimaging/static-wado-creator",
3
- "version": "1.3.0",
3
+ "version": "1.3.2",
4
4
  "description": "Library to convert DICOMP10 to DICOMweb format. Original upstream: https://github.com/chafey/dicomp10-to-dicomweb-js",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -55,9 +55,9 @@
55
55
  "verbose": true
56
56
  },
57
57
  "dependencies": {
58
- "@cornerstonejs/dicom-codec": ">=1.0.2",
59
- "@radicalimaging/static-cs-lite": ">=1.3.0",
60
- "@radicalimaging/static-wado-util": ">=1.3.0",
58
+ "@cornerstonejs/dicom-codec": ">=1.0.5",
59
+ "@radicalimaging/static-cs-lite": "^1.3.2",
60
+ "@radicalimaging/static-wado-util": "^1.3.2",
61
61
  "canvas": "^2.11.1",
62
62
  "config-point": ">=0.5.1",
63
63
  "dcmjs": "^0.29.5",
@@ -68,5 +68,6 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "must": "^0.13.4"
71
- }
71
+ },
72
+ "gitHead": "202e8673a2c9618f441023c8382187ae7fdf5b1a"
72
73
  }
package/CHANGELOG.md DELETED
@@ -1,67 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [0.6.4](https://github.com/OHIF/static-wado/compare/@radicalimaging/static-wado-creator@0.6.3...@radicalimaging/static-wado-creator@0.6.4) (2022-04-04)
7
-
8
- **Note:** Version bump only for package @radicalimaging/static-wado-creator
9
-
10
-
11
-
12
-
13
-
14
- ## [0.6.3](https://github.com/OHIF/static-wado/compare/@radicalimaging/static-wado-creator@0.6.2...@radicalimaging/static-wado-creator@0.6.3) (2022-03-14)
15
-
16
- **Note:** Version bump only for package @radicalimaging/static-wado-creator
17
-
18
-
19
-
20
-
21
-
22
- ## [0.6.2](https://github.com/OHIF/static-wado/compare/@radicalimaging/static-wado-creator@0.6.1...@radicalimaging/static-wado-creator@0.6.2) (2022-03-04)
23
-
24
- **Note:** Version bump only for package @radicalimaging/static-wado-creator
25
-
26
-
27
-
28
-
29
-
30
- ## [0.6.1](https://github.com/OHIF/static-wado/compare/@radicalimaging/static-wado-creator@0.6.0...@radicalimaging/static-wado-creator@0.6.1) (2022-03-04)
31
-
32
- **Note:** Version bump only for package @radicalimaging/static-wado-creator
33
-
34
-
35
-
36
-
37
-
38
- # [0.6.0](https://github.com/OHIF/static-wado/compare/@radicalimaging/static-wado-creator@0.5.1...@radicalimaging/static-wado-creator@0.6.0) (2022-03-03)
39
-
40
-
41
- ### Bug Fixes
42
-
43
- * **static-wado:** make the various constructors use a straight configuration without using the program data ([1997d9f](https://github.com/OHIF/static-wado/commit/1997d9f0fe2e0a084d31edeb475494bcec78fd77))
44
-
45
-
46
- ### Features
47
-
48
- * **static-wado:** qido series fallback to retrieve from proxyAe ([#8](https://github.com/OHIF/static-wado/issues/8)) ([47b5550](https://github.com/OHIF/static-wado/commit/47b55503732e25be08b215bdc201593f64de52e6))
49
-
50
-
51
-
52
-
53
-
54
- ## 0.5.1 (2022-02-16)
55
-
56
-
57
- ### Bug Fixes
58
-
59
- * **pencil:** add more files to lint, increase test config and README ([89b667c](https://github.com/OHIF/static-wado/commit/89b667c83d324ab9fa540cda0c037af8fe088f72))
60
- * **pencil:** adding must package and minor test changes ([9194f3f](https://github.com/OHIF/static-wado/commit/9194f3f1bb52da57e20bb8bb9f07262bcebdffbf))
61
- * **pencil:** code review.lint ([fa1a58a](https://github.com/OHIF/static-wado/commit/fa1a58a0c62015503575fbeb172b71810c6833de))
62
- * **pencil:** fix format ([68fbc9b](https://github.com/OHIF/static-wado/commit/68fbc9bf5a3e9bf85e3fbcddfb3e0759e79b769d))
63
- * **pencil:** fix lint and add pre-commit restr ([deec345](https://github.com/OHIF/static-wado/commit/deec34524531d5a8595a775bac414f63f60e9f23))
64
- * **pencil:** lint/prettier ([d6ecbc6](https://github.com/OHIF/static-wado/commit/d6ecbc6b5961e03e8a557f4fcc78af53549132cd))
65
- * **pencil:** moving from wado-js to wado repo ([5916aec](https://github.com/OHIF/static-wado/commit/5916aecd7c77dbc4882681877e2b51210976427f))
66
- * **pencil:** readme link name ([40408ab](https://github.com/OHIF/static-wado/commit/40408ab6b4e97c8656e30b1dd2c30b92440b9f90))
67
- * **pencil:** unit tests migration ([d9d56dd](https://github.com/OHIF/static-wado/commit/d9d56dd619fb1f41ed1d5ad85f7f804e013c6527))