@radicalimaging/static-wado-creator 1.5.0 → 1.6.11
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/CHANGELOG.md +234 -0
- package/README.md +1 -1
- package/bin/mkdicomweb.mjs +8 -0
- package/dist/canvas-xaqc8v6y.node +0 -0
- package/dist/index.js +511433 -0
- package/lib/DeleteStudy.js +11 -9
- package/lib/RejectInstance.js +6 -5
- package/lib/StaticWado.js +222 -73
- package/lib/createMain.js +3 -3
- package/lib/createPart10.js +19 -19
- package/lib/createThumbnail.js +163 -0
- package/lib/deleteMain.js +2 -2
- package/lib/groupMain.js +2 -2
- package/lib/index.js +7 -5
- package/lib/indexMain.js +2 -2
- package/lib/instanceMain.js +3 -2
- package/lib/metadataMain.js +2 -2
- package/lib/mkdicomwebConfig.js +210 -115
- package/lib/model/TagLists.js +13 -4
- package/lib/model/uids.js +32 -28
- package/lib/operation/InstanceDeduplicate.js +18 -13
- package/lib/operation/ScanStudy.js +33 -7
- package/lib/operation/StudyData.js +122 -71
- package/lib/operation/ThumbnailService.js +44 -36
- package/lib/operation/adapter/decodeImage.js +7 -4
- package/lib/operation/adapter/getImageInfo.js +23 -6
- package/lib/operation/adapter/transcodeImage.js +157 -90
- package/lib/operation/extractImageFrames.js +25 -14
- package/lib/operation/getDataSet.js +4 -4
- package/lib/operation/getEncapsulatedImageFrame.js +16 -4
- package/lib/operation/getNumberOfFrames.js +2 -2
- package/lib/operation/getVR.js +12 -4
- package/lib/operation/getValue.js +42 -65
- package/lib/operation/validateMetadata.js +40 -0
- package/lib/program/index.js +2 -3
- package/lib/rejectMain.js +2 -2
- package/lib/serverMain.js +21 -0
- package/lib/util/IdCreator.js +25 -8
- package/lib/util/adaptProgramOpts.js +1 -1
- package/lib/util/compressionOptionParser.js +4 -4
- package/lib/util/resultsReport.ts +87 -0
- package/lib/writer/CompleteStudyWriter.js +42 -19
- package/lib/writer/DeduplicateWriter.js +7 -7
- package/lib/writer/ExpandUriPath.js +4 -3
- package/lib/writer/HashDataWriter.js +21 -17
- package/lib/writer/ImageFrameWriter.js +22 -10
- package/lib/writer/MultipartHeader.js +1 -1
- package/lib/writer/RawDicomWriter.js +18 -10
- package/lib/writer/ThumbnailWriter.js +2 -2
- package/lib/writer/VideoWriter.js +23 -34
- package/lib/writer/WriteMultipart.js +3 -3
- package/lib/writer/WriteStream.js +14 -12
- package/package.json +22 -18
- package/bin/mkdicomweb.js +0 -9
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
const hashFactory = require(
|
|
2
|
-
const { createHash } = require(
|
|
1
|
+
const hashFactory = require('node-object-hash');
|
|
2
|
+
const { createHash } = require('crypto');
|
|
3
3
|
|
|
4
|
-
const path = require(
|
|
5
|
-
const { Tags } = require(
|
|
6
|
-
const WriteStream = require(
|
|
7
|
-
const WriteMultipart = require(
|
|
8
|
-
const ExpandUriPath = require(
|
|
9
|
-
const { MultipartHeader } = require(
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { Tags } = require('@radicalimaging/static-wado-util');
|
|
6
|
+
const WriteStream = require('./WriteStream');
|
|
7
|
+
const WriteMultipart = require('./WriteMultipart');
|
|
8
|
+
const ExpandUriPath = require('./ExpandUriPath');
|
|
9
|
+
const { MultipartHeader } = require('./MultipartHeader');
|
|
10
10
|
|
|
11
11
|
// Extensions for encapsulated content. Do NOT add any executable content extensions here.
|
|
12
12
|
const extensions = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
'application/pdf': '.pdf',
|
|
14
|
+
'text/json': '.json',
|
|
15
|
+
'application/xml+cda': '.cda.xml',
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const baseHasher = hashFactory.hasher();
|
|
19
19
|
|
|
20
20
|
const hasher = {
|
|
21
|
-
hash:
|
|
21
|
+
hash: v => {
|
|
22
22
|
const type = v.constructor?.name;
|
|
23
|
-
if (type ===
|
|
24
|
-
return createHash(
|
|
23
|
+
if (type === 'Buffer') {
|
|
24
|
+
return createHash('sha256').update(v).digest('hex');
|
|
25
25
|
}
|
|
26
26
|
return baseHasher.hash(v);
|
|
27
27
|
},
|
|
@@ -29,7 +29,7 @@ const hasher = {
|
|
|
29
29
|
|
|
30
30
|
/** Writes out JSON files to the given file name. Automatically GZips them, and adds the extension */
|
|
31
31
|
const HashDataWriter =
|
|
32
|
-
|
|
32
|
+
options =>
|
|
33
33
|
async (id, key, data, additionalOptions = {}) => {
|
|
34
34
|
const isRaw = ArrayBuffer.isView(data);
|
|
35
35
|
const { mimeType } = additionalOptions;
|
|
@@ -43,7 +43,11 @@ const HashDataWriter =
|
|
|
43
43
|
gzip,
|
|
44
44
|
});
|
|
45
45
|
if (isRaw) {
|
|
46
|
-
await WriteMultipart(
|
|
46
|
+
await WriteMultipart(
|
|
47
|
+
writeStream,
|
|
48
|
+
[new MultipartHeader('Content-Type', 'application/octet-stream')],
|
|
49
|
+
rawData
|
|
50
|
+
);
|
|
47
51
|
} else {
|
|
48
52
|
await writeStream.write(rawData);
|
|
49
53
|
}
|
|
@@ -57,7 +61,7 @@ const HashDataWriter =
|
|
|
57
61
|
HashDataWriter.createHashPath = (data, options = {}) => {
|
|
58
62
|
const { mimeType } = options;
|
|
59
63
|
const isRaw = ArrayBuffer.isView(data);
|
|
60
|
-
const extension = isRaw ? (mimeType && extensions[mimeType]) ||
|
|
64
|
+
const extension = isRaw ? (mimeType && extensions[mimeType]) || '' : '.json';
|
|
61
65
|
const hashValue = Tags.getValue(data, Tags.DeduppedHash) || hasher.hash(data);
|
|
62
66
|
|
|
63
67
|
return {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
const uids = require(
|
|
2
|
-
const WriteStream = require(
|
|
3
|
-
const WriteMultipart = require(
|
|
4
|
-
const ExpandUriPath = require(
|
|
5
|
-
const { MultipartHeader, MultipartAttribute } = require(
|
|
1
|
+
const uids = require('../model/uids');
|
|
2
|
+
const WriteStream = require('./WriteStream');
|
|
3
|
+
const WriteMultipart = require('./WriteMultipart');
|
|
4
|
+
const ExpandUriPath = require('./ExpandUriPath');
|
|
5
|
+
const { MultipartHeader, MultipartAttribute } = require('./MultipartHeader');
|
|
6
6
|
|
|
7
|
-
const ImageFrameWriter =
|
|
7
|
+
const ImageFrameWriter = options => {
|
|
8
8
|
const { encapsulatedImage, singlePartImage } = options;
|
|
9
9
|
return async (id, index, imageFrame) => {
|
|
10
10
|
const { transferSyntaxUid } = id;
|
|
@@ -24,11 +24,20 @@ const ImageFrameWriter = (options) => {
|
|
|
24
24
|
});
|
|
25
25
|
await WriteMultipart(
|
|
26
26
|
writeStream,
|
|
27
|
-
[
|
|
27
|
+
[
|
|
28
|
+
new MultipartHeader('Content-Type', type.contentType, [
|
|
29
|
+
new MultipartAttribute('transfer-syntax', transferSyntaxUid),
|
|
30
|
+
]),
|
|
31
|
+
],
|
|
28
32
|
content
|
|
29
33
|
);
|
|
30
34
|
await writeStream.close();
|
|
31
|
-
console.verbose(
|
|
35
|
+
console.verbose(
|
|
36
|
+
'Wrote encapsulated image frame',
|
|
37
|
+
id.sopInstanceUid,
|
|
38
|
+
index + 1,
|
|
39
|
+
type.contentType
|
|
40
|
+
);
|
|
32
41
|
}
|
|
33
42
|
if (extension && singlePartImage) {
|
|
34
43
|
const writeStreamSingle = WriteStream(id.imageFrameRootPath, `${1 + index}${extension}`, {
|
|
@@ -37,10 +46,13 @@ const ImageFrameWriter = (options) => {
|
|
|
37
46
|
});
|
|
38
47
|
await writeStreamSingle.write(content);
|
|
39
48
|
await writeStreamSingle.close();
|
|
40
|
-
console.verbose(
|
|
49
|
+
console.verbose('Wrote single part image frame', id.sopInstanceUid, index + 1, extension);
|
|
41
50
|
}
|
|
42
51
|
const includeSeries = true;
|
|
43
|
-
return ExpandUriPath(id, `instances/${id.sopInstanceUid}/frames`, {
|
|
52
|
+
return ExpandUriPath(id, `instances/${id.sopInstanceUid}/frames`, {
|
|
53
|
+
includeSeries,
|
|
54
|
+
...options,
|
|
55
|
+
});
|
|
44
56
|
};
|
|
45
57
|
};
|
|
46
58
|
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
const { Tags } = require(
|
|
2
|
-
const WriteStream = require(
|
|
3
|
-
const WriteMultipart = require(
|
|
4
|
-
const { MultipartHeader } = require(
|
|
1
|
+
const { Tags } = require('@radicalimaging/static-wado-util');
|
|
2
|
+
const WriteStream = require('./WriteStream');
|
|
3
|
+
const WriteMultipart = require('./WriteMultipart');
|
|
4
|
+
const { MultipartHeader } = require('./MultipartHeader');
|
|
5
5
|
|
|
6
|
-
const modalitiesToRawWrite = [
|
|
6
|
+
const modalitiesToRawWrite = ['SEG', 'SR'];
|
|
7
|
+
const sopClassesToRawWrite = ['1.2.840.10008.5.1.4.1.1.30'];
|
|
7
8
|
|
|
8
|
-
const defaultSelector =
|
|
9
|
+
const defaultSelector = instance => {
|
|
9
10
|
const modality = instance.metadata[Tags.Modality]?.Value?.[0];
|
|
10
|
-
|
|
11
|
+
const sopClass = instance.metadata[Tags.SOPClassUID]?.Value?.[0];
|
|
12
|
+
return (
|
|
13
|
+
modalitiesToRawWrite.indexOf(modality) !== -1 || sopClassesToRawWrite.indexOf(sopClass) !== -1
|
|
14
|
+
);
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
/** Writes out raw DICOM files, encapsulated in multipart and gzipped - currently just DICOM SR and SEG */
|
|
@@ -21,14 +25,18 @@ const RawDicomWriter =
|
|
|
21
25
|
if (!selector(instance)) {
|
|
22
26
|
return undefined;
|
|
23
27
|
}
|
|
24
|
-
const contentType = options.contentType ||
|
|
25
|
-
const writeStream = WriteStream(id.sopInstanceRootPath,
|
|
28
|
+
const contentType = options.contentType || 'application/dicom';
|
|
29
|
+
const writeStream = WriteStream(id.sopInstanceRootPath, 'index.mht', {
|
|
26
30
|
gzip: options.gzip,
|
|
27
31
|
mkdir: true,
|
|
28
32
|
});
|
|
29
33
|
const { length } = content;
|
|
30
34
|
const buffer = content.slice(0, length);
|
|
31
|
-
await WriteMultipart(
|
|
35
|
+
await WriteMultipart(
|
|
36
|
+
writeStream,
|
|
37
|
+
[new MultipartHeader('Content-Type', contentType, [])],
|
|
38
|
+
buffer
|
|
39
|
+
);
|
|
32
40
|
await writeStream.close();
|
|
33
41
|
};
|
|
34
42
|
RawDicomWriter.defaultSelector = defaultSelector;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const WriteStream = require(
|
|
1
|
+
const WriteStream = require('./WriteStream');
|
|
2
2
|
|
|
3
3
|
const ThumbnailWriter = () => async (filePath, fileName, thumbBuffer) => {
|
|
4
4
|
const writeStream = WriteStream(filePath, fileName, {
|
|
@@ -7,7 +7,7 @@ const ThumbnailWriter = () => async (filePath, fileName, thumbBuffer) => {
|
|
|
7
7
|
|
|
8
8
|
await writeStream.write(thumbBuffer);
|
|
9
9
|
|
|
10
|
-
console.verbose(
|
|
10
|
+
console.verbose('Wrote thumbnail frame', filePath, fileName);
|
|
11
11
|
return writeStream.close();
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1,62 +1,51 @@
|
|
|
1
1
|
/** Write raw video file */
|
|
2
|
-
const { Tags } = require(
|
|
3
|
-
const WriteStream = require(
|
|
2
|
+
const { Tags } = require('@radicalimaging/static-wado-util');
|
|
3
|
+
const WriteStream = require('./WriteStream');
|
|
4
4
|
|
|
5
|
-
const MPEG2 =
|
|
6
|
-
const H264 =
|
|
7
|
-
const H265 =
|
|
5
|
+
const MPEG2 = 'mpg';
|
|
6
|
+
const H264 = 'mp4';
|
|
7
|
+
const H265 = 'h265';
|
|
8
8
|
|
|
9
9
|
const VIDEO_TYPES = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
'1.2.840.10008.1.2.4.100': MPEG2,
|
|
11
|
+
'1.2.840.10008.1.2.4.101': MPEG2,
|
|
12
|
+
'1.2.840.10008.1.2.4.102': H264,
|
|
13
|
+
'1.2.840.10008.1.2.4.103': H264,
|
|
14
|
+
'1.2.840.10008.1.2.4.104': H264,
|
|
15
|
+
'1.2.840.10008.1.2.4.105': H264,
|
|
16
|
+
'1.2.840.10008.1.2.4.106': H264,
|
|
17
|
+
'1.2.840.10008.1.2.4.107': H265,
|
|
18
|
+
'1.2.840.10008.1.2.4.108': H265,
|
|
19
19
|
// TODO - add the new multi-segment MPEG2 and H264 variants
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const isVideo =
|
|
23
|
-
VIDEO_TYPES[
|
|
24
|
-
value && value.string ? value.string(Tags.RawTransferSyntaxUID) : value
|
|
25
|
-
];
|
|
22
|
+
const isVideo = value =>
|
|
23
|
+
VIDEO_TYPES[value && value.string ? value.string(Tags.RawTransferSyntaxUID) : value];
|
|
26
24
|
|
|
27
25
|
const VideoWriter = () =>
|
|
28
26
|
async function run(id, dataSet) {
|
|
29
27
|
console.log(`Writing video ${id.sopInstanceUid}`);
|
|
30
28
|
const extension = VIDEO_TYPES[dataSet.string(Tags.RawTransferSyntaxUID)];
|
|
31
29
|
const filename = `index.${extension}`;
|
|
32
|
-
const writeStream = WriteStream(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{
|
|
36
|
-
mkdir: true,
|
|
37
|
-
}
|
|
38
|
-
);
|
|
30
|
+
const writeStream = WriteStream(`${id.sopInstanceRootPath}/rendered`, filename, {
|
|
31
|
+
mkdir: true,
|
|
32
|
+
});
|
|
39
33
|
let length = 0;
|
|
40
34
|
const { fragments } = dataSet.elements.x7fe00010;
|
|
41
35
|
|
|
42
36
|
if (!fragments) {
|
|
43
|
-
console.warn(
|
|
44
|
-
return
|
|
37
|
+
console.warn('No video data');
|
|
38
|
+
return '';
|
|
45
39
|
}
|
|
46
40
|
// The zero position fragment isn't available, even though present in the original data
|
|
47
41
|
for (let i = 0; i < fragments.length; i++) {
|
|
48
42
|
const fragment = fragments[i];
|
|
49
|
-
const blob = dataSet.byteArray.slice(
|
|
50
|
-
fragment.position,
|
|
51
|
-
fragment.position + fragment.length
|
|
52
|
-
);
|
|
43
|
+
const blob = dataSet.byteArray.slice(fragment.position, fragment.position + fragment.length);
|
|
53
44
|
length += blob.length;
|
|
54
45
|
await writeStream.write(blob);
|
|
55
46
|
}
|
|
56
47
|
await writeStream.close();
|
|
57
|
-
console.log(
|
|
58
|
-
`Done video ${id.sopInstanceRootPath}\\${filename} of length ${length}`
|
|
59
|
-
);
|
|
48
|
+
console.log(`Done video ${id.sopInstanceRootPath}\\${filename} of length ${length}`);
|
|
60
49
|
return `series/${id.seriesInstanceUid}/instances/${id.sopInstanceUid}/rendered?length=${length}&offset=0&accept=video/mp4`;
|
|
61
50
|
};
|
|
62
51
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { v4: uuid } = require(
|
|
1
|
+
const { v4: uuid } = require('uuid');
|
|
2
2
|
|
|
3
3
|
const WriteMultipart = async (writeStream, headers, content) => {
|
|
4
4
|
const boundaryId = uuid();
|
|
@@ -12,9 +12,9 @@ const WriteMultipart = async (writeStream, headers, content) => {
|
|
|
12
12
|
await writeStream.write(`;${attribute.attributeName}=${attribute.attributeValue}`);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
await writeStream.write(
|
|
15
|
+
await writeStream.write('\r\n');
|
|
16
16
|
}
|
|
17
|
-
await writeStream.write(
|
|
17
|
+
await writeStream.write('\r\n');
|
|
18
18
|
await writeStream.write(content);
|
|
19
19
|
await writeStream.write(`\r\n--BOUNDARY_${boundaryId}--`);
|
|
20
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const fs = require(
|
|
2
|
-
const zlib = require(
|
|
3
|
-
const path = require(
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const zlib = require('zlib');
|
|
3
|
+
const path = require('path');
|
|
4
4
|
|
|
5
5
|
let writeCount = 0;
|
|
6
6
|
|
|
@@ -10,24 +10,26 @@ let writeCount = 0;
|
|
|
10
10
|
* requires syncing.
|
|
11
11
|
*/
|
|
12
12
|
const WriteStream = (dir, nameSrc, options = {}) => {
|
|
13
|
-
const isGzip = nameSrc.indexOf(
|
|
14
|
-
const name = (isGzip && nameSrc.indexOf(
|
|
15
|
-
if (options.mkdir
|
|
13
|
+
const isGzip = nameSrc.indexOf('.gz') != -1 || options.gzip;
|
|
14
|
+
const name = (isGzip && nameSrc.indexOf('.gz') === -1 && `${nameSrc}.gz`) || nameSrc;
|
|
15
|
+
if (options.mkdir && !fs.existsSync(dir)) {
|
|
16
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
17
|
+
}
|
|
16
18
|
|
|
17
19
|
const tempName = path.join(dir, `tempFile-${Math.round(Math.random() * 1000000000)}`);
|
|
18
20
|
const finalName = path.join(dir, name);
|
|
19
21
|
writeCount++;
|
|
20
22
|
if (writeCount > 10) {
|
|
21
|
-
console.log(
|
|
23
|
+
console.log('Write count', tempName, finalName, writeCount);
|
|
22
24
|
if (writeCount > 100) {
|
|
23
|
-
console.error(
|
|
25
|
+
console.error('Too many open writes', new Error());
|
|
24
26
|
throw new Error(`Write count too high ${writeCount} destination ${finalName}`);
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
29
|
const rawStream = fs.createWriteStream(tempName);
|
|
28
|
-
const closePromise = new Promise(
|
|
29
|
-
rawStream.on(
|
|
30
|
-
resolve(
|
|
30
|
+
const closePromise = new Promise(resolve => {
|
|
31
|
+
rawStream.on('close', () => {
|
|
32
|
+
resolve('closed');
|
|
31
33
|
});
|
|
32
34
|
});
|
|
33
35
|
|
|
@@ -35,7 +37,7 @@ const WriteStream = (dir, nameSrc, options = {}) => {
|
|
|
35
37
|
if (isGzip) {
|
|
36
38
|
writeStream = zlib.createGzip();
|
|
37
39
|
writeStream.pipe(rawStream);
|
|
38
|
-
writeStream.on(
|
|
40
|
+
writeStream.on('close', () => {
|
|
39
41
|
rawStream.close();
|
|
40
42
|
});
|
|
41
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radicalimaging/static-wado-creator",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.11",
|
|
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"
|
|
@@ -10,11 +10,9 @@
|
|
|
10
10
|
"DICOM",
|
|
11
11
|
"DICOMweb"
|
|
12
12
|
],
|
|
13
|
-
"author":
|
|
14
|
-
"Chris Hafey <chafey@gmail.com>",
|
|
15
|
-
"Bill Wallace <bill.wallace@radicalimaging.com>"
|
|
16
|
-
],
|
|
13
|
+
"author": "Bill Wallace <bill.wallace@radicalimaging.com>",
|
|
17
14
|
"contributors": [
|
|
15
|
+
"Chris Hafey <chafey@gmail.com>",
|
|
18
16
|
"Rodolfo Costa <rodolfo.costa@radicalimaging.com>"
|
|
19
17
|
],
|
|
20
18
|
"engines": {
|
|
@@ -24,48 +22,54 @@
|
|
|
24
22
|
},
|
|
25
23
|
"repository": {
|
|
26
24
|
"type": "git",
|
|
27
|
-
"url": "https://github.com/
|
|
25
|
+
"url": "https://github.com/radicalimaging/static-dicomweb",
|
|
28
26
|
"directory": "packages/static-wado-creator"
|
|
29
27
|
},
|
|
30
28
|
"bugs": {
|
|
31
|
-
"url": "https://github.com/
|
|
29
|
+
"url": "https://github.com/radicalimaging/static-dicomweb/issues"
|
|
32
30
|
},
|
|
33
|
-
"homepage": "https://github.com/
|
|
31
|
+
"homepage": "https://github.com/radicalimaging/static-dicomweb#readme",
|
|
34
32
|
"license": "ISC",
|
|
35
33
|
"main": "lib/index.js",
|
|
34
|
+
"module": "dist/index.js",
|
|
36
35
|
"directories": {
|
|
37
36
|
"lib": "lib",
|
|
37
|
+
"dist": "dist",
|
|
38
38
|
"bin": "bin"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"bin",
|
|
42
|
+
"dist",
|
|
42
43
|
"lib"
|
|
43
44
|
],
|
|
44
45
|
"bin": {
|
|
45
|
-
"mkdicomweb": "bin/mkdicomweb.
|
|
46
|
+
"mkdicomweb": "bin/mkdicomweb.mjs"
|
|
46
47
|
},
|
|
47
48
|
"scripts": {
|
|
48
49
|
"test": "jest --config ./jest.config.js",
|
|
49
|
-
"build": "
|
|
50
|
+
"build": "bun run build:esm",
|
|
51
|
+
"build:esm": "bun build lib/index.js --target node --outdir dist --",
|
|
52
|
+
"clean": "rimraf dist",
|
|
50
53
|
"link:exec": "npm install -g && npm link",
|
|
51
54
|
"lint": "npx eslint --color \"**/*.{js,mjs,cjs}\"",
|
|
55
|
+
"mkdicomweb": "bun bin/mkdicomwebDev.mjs --",
|
|
56
|
+
"pack:js": "npm pack --",
|
|
57
|
+
"publishJS": "yarn publish --no-git-tag-version",
|
|
52
58
|
"lint:fix": "npx eslint --fix --color \"**/*.{js,mjs,cjs}\""
|
|
53
59
|
},
|
|
54
60
|
"jest": {
|
|
55
61
|
"verbose": true
|
|
56
62
|
},
|
|
57
63
|
"dependencies": {
|
|
58
|
-
"@
|
|
59
|
-
"@radicalimaging/static-
|
|
60
|
-
"
|
|
61
|
-
"canvas": "^2.11.1",
|
|
64
|
+
"@radicalimaging/cs3d": ">=1.6.1",
|
|
65
|
+
"@radicalimaging/static-wado-util": ">=1.6.1",
|
|
66
|
+
"canvas": ">=3.1.0",
|
|
62
67
|
"config-point": ">=0.5.1",
|
|
63
|
-
"dcmjs": "
|
|
68
|
+
"dcmjs": "0.35.0",
|
|
64
69
|
"dicom-parser": "^1.8.13",
|
|
65
|
-
"glob": "^
|
|
70
|
+
"glob": "^11.0.0",
|
|
66
71
|
"node-object-hash": "^3.0.0",
|
|
67
|
-
"
|
|
68
|
-
"uuid": "^8.3.2"
|
|
72
|
+
"uuid": "^11.0.2"
|
|
69
73
|
},
|
|
70
74
|
"devDependencies": {
|
|
71
75
|
"must": "^0.13.4"
|
package/bin/mkdicomweb.js
DELETED