dcmnorm 0.13.1 → 0.15.1
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 +59 -2
- package/dcmnorm.d.ts +181 -0
- package/dcmnorm.js +525 -0
- package/dicom-constants.d.ts +11473 -0
- package/dicom-constants.js +6188 -0
- package/index.d.ts +113 -0
- package/index.js +66 -56
- package/package.json +13 -9
package/index.d.ts
CHANGED
|
@@ -157,6 +157,33 @@ export declare function checkDicom(filePath: string): Promise<unknown>
|
|
|
157
157
|
*/
|
|
158
158
|
export declare function computeHistogram(filePath: string, options?: HistogramOptions | undefined | null): Promise<unknown>
|
|
159
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Internal (see `dcmnorm.js` `toDicomJson`): DICOM JSON of an encoded data set, bulk data from
|
|
162
|
+
* its source path/bytes in inline mode.
|
|
163
|
+
*/
|
|
164
|
+
export declare function datasetDocumentToJson(document: Buffer, sourcePath: string | undefined | null, sourceBytes: Buffer | undefined | null, options: NativeJsonOptions): Promise<unknown>
|
|
165
|
+
|
|
166
|
+
/** Internal (see `dcmnorm.js` `read`): the data set of a path or bytes, in the binary form. */
|
|
167
|
+
export declare function datasetRead(path: string | undefined | null, bytes: Buffer | undefined | null, untilPixelData: boolean, loadBulkData: boolean): Promise<unknown>
|
|
168
|
+
|
|
169
|
+
/** Internal (see `dcmnorm.js` `renderPixels`): one frame's 8-bit display pixels. */
|
|
170
|
+
export declare function datasetRenderPixels(path: string | undefined | null, bytes: Buffer | undefined | null, frameIndex: number, params: NativeRenderParams): Promise<unknown>
|
|
171
|
+
|
|
172
|
+
/** Internal (see `dcmnorm.js` `toDicomJson`): DICOM JSON of a source. */
|
|
173
|
+
export declare function datasetSourceToJson(path: string | undefined | null, bytes: Buffer | undefined | null, options: NativeJsonOptions): Promise<unknown>
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Internal (see `dcmnorm.js` `transcode`): transcode a source to `outputPath`, or resolve to
|
|
177
|
+
* the bytes.
|
|
178
|
+
*/
|
|
179
|
+
export declare function datasetTranscode(path: string | undefined | null, bytes: Buffer | undefined | null, outputPath: string | undefined | null, transferSyntaxUid: string): Promise<unknown>
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Internal (see `dcmnorm.js` `write`): write an encoded data set to `outputPath`, or (no path)
|
|
183
|
+
* resolve to the file's bytes.
|
|
184
|
+
*/
|
|
185
|
+
export declare function datasetWrite(document: Buffer, sourcePath?: string | undefined | null, sourceBytes?: Buffer | undefined | null, outputPath?: string | undefined | null, transferSyntaxUid?: string | undefined | null): Promise<unknown>
|
|
186
|
+
|
|
160
187
|
/**
|
|
161
188
|
* One file of the File-set for `writeDicomdir`: its File ID plus its header, either as DICOM
|
|
162
189
|
* JSON (`json`) or a file to read it from (`path`; pixel data isn't loaded).
|
|
@@ -378,6 +405,9 @@ export interface HistogramOptions {
|
|
|
378
405
|
maxValue?: number
|
|
379
406
|
}
|
|
380
407
|
|
|
408
|
+
/** The standard keyword of a tag (`0x0020000D` -> `"StudyInstanceUID"`), or null. */
|
|
409
|
+
export declare function keywordOf(tag: number): string | null
|
|
410
|
+
|
|
381
411
|
/**
|
|
382
412
|
* Performs a C-MOVE (Study Root Query/Retrieve), asking `destination` ("host:port") to push
|
|
383
413
|
* `studyInstanceUid` - or one series of it / a list of its instances, per
|
|
@@ -442,6 +472,69 @@ export interface MoveScuResult {
|
|
|
442
472
|
cancelledVia?: string
|
|
443
473
|
}
|
|
444
474
|
|
|
475
|
+
export interface NativeError {
|
|
476
|
+
kind: string
|
|
477
|
+
message: string
|
|
478
|
+
sourceTransferSyntaxUid?: string
|
|
479
|
+
targetTransferSyntaxUid?: string
|
|
480
|
+
frameIndex?: number
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/** Options of `toDicomJson`, as `dcmnorm.js` passes them. */
|
|
484
|
+
export interface NativeJsonOptions {
|
|
485
|
+
includeTags?: Array<number>
|
|
486
|
+
excludeTags?: Array<number>
|
|
487
|
+
bulkData?: string
|
|
488
|
+
bulkDataUriBase?: string
|
|
489
|
+
includeFileMeta?: boolean
|
|
490
|
+
keywordAndVm?: boolean
|
|
491
|
+
/**
|
|
492
|
+
* Write each BulkDataURI as the placeholder `dcmnorm-bulk:<TAG>:<VR>:<offset>:<length>`,
|
|
493
|
+
* for the JS layer to replace with its `bulkDataUriBuilder`'s result (a JS callback can't
|
|
494
|
+
* run on the thread pool).
|
|
495
|
+
*/
|
|
496
|
+
placeholderUris?: boolean
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export interface NativeOverlay {
|
|
500
|
+
index: number
|
|
501
|
+
group: number
|
|
502
|
+
rows: number
|
|
503
|
+
columns: number
|
|
504
|
+
overlayType?: string
|
|
505
|
+
label?: string
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export interface NativeRendered {
|
|
509
|
+
width: number
|
|
510
|
+
height: number
|
|
511
|
+
channels: number
|
|
512
|
+
pixels: Buffer
|
|
513
|
+
overlays: Array<NativeOverlay>
|
|
514
|
+
selectedOverlayIndex?: number
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
export interface NativeRenderParams {
|
|
518
|
+
windowCenter?: number
|
|
519
|
+
windowWidth?: number
|
|
520
|
+
voiLut?: boolean
|
|
521
|
+
modalityLut?: boolean
|
|
522
|
+
iccProfile?: boolean
|
|
523
|
+
outputWidth?: number
|
|
524
|
+
outputHeight?: number
|
|
525
|
+
showOverlays?: boolean
|
|
526
|
+
overlayIndex?: number
|
|
527
|
+
overlayColor?: string
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
/** What a `dataset*` call resolves to: `error`, or one of the payloads. */
|
|
531
|
+
export interface NativeResult {
|
|
532
|
+
error?: NativeError
|
|
533
|
+
data?: Buffer
|
|
534
|
+
text?: string
|
|
535
|
+
rendered?: NativeRendered
|
|
536
|
+
}
|
|
537
|
+
|
|
445
538
|
/** Mirrors `dcmnorm::dicom_io::OverlaySummary` for the JS side. */
|
|
446
539
|
export interface OverlaySummary {
|
|
447
540
|
index: number
|
|
@@ -664,6 +757,9 @@ export interface StoreScuResult {
|
|
|
664
757
|
status: number
|
|
665
758
|
}
|
|
666
759
|
|
|
760
|
+
/** The tag of a standard keyword or tag expression, or null. */
|
|
761
|
+
export declare function tagForKeyword(keyword: string): number | null
|
|
762
|
+
|
|
667
763
|
export interface TextureExportResult {
|
|
668
764
|
/** 'volume', 'image2d', or 'framestack'. */
|
|
669
765
|
contentKind: string
|
|
@@ -736,6 +832,23 @@ export interface TextureExportResult {
|
|
|
736
832
|
*/
|
|
737
833
|
export declare function transcode(filePath: string, outputPath: string, transferSyntaxUid: string): Promise<unknown>
|
|
738
834
|
|
|
835
|
+
/** What this build can read, write, decode and encode, per transfer syntax UID. */
|
|
836
|
+
export declare function transferSyntaxSupport(): Array<TransferSyntaxSupportInfo>
|
|
837
|
+
|
|
838
|
+
export interface TransferSyntaxSupportInfo {
|
|
839
|
+
uid: string
|
|
840
|
+
name: string
|
|
841
|
+
encapsulated: boolean
|
|
842
|
+
canReadDataset: boolean
|
|
843
|
+
canWriteDataset: boolean
|
|
844
|
+
canDecode: boolean
|
|
845
|
+
canEncode: boolean
|
|
846
|
+
canTranscodeTo: boolean
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
/** The dictionary VR of a tag, or null. */
|
|
850
|
+
export declare function vrOf(tag: number): string | null
|
|
851
|
+
|
|
739
852
|
/**
|
|
740
853
|
* Writes a DICOMDIR (Media Storage Directory, Explicit VR Little Endian) for a File-set:
|
|
741
854
|
* PATIENT > STUDY > SERIES > one record per entry, its type from the SOP Class (IMAGE, SR
|
package/index.js
CHANGED
|
@@ -94,8 +94,8 @@ function requireNative() {
|
|
|
94
94
|
try {
|
|
95
95
|
const binding = require('@dcmnorm/android-arm64')
|
|
96
96
|
const bindingPackageVersion = require('@dcmnorm/android-arm64/package.json').version
|
|
97
|
-
if (bindingPackageVersion !== '0.
|
|
98
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
97
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
98
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
99
99
|
}
|
|
100
100
|
return binding
|
|
101
101
|
} catch (e) {
|
|
@@ -110,8 +110,8 @@ function requireNative() {
|
|
|
110
110
|
try {
|
|
111
111
|
const binding = require('@dcmnorm/android-arm-eabi')
|
|
112
112
|
const bindingPackageVersion = require('@dcmnorm/android-arm-eabi/package.json').version
|
|
113
|
-
if (bindingPackageVersion !== '0.
|
|
114
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
113
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
114
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
115
115
|
}
|
|
116
116
|
return binding
|
|
117
117
|
} catch (e) {
|
|
@@ -131,8 +131,8 @@ function requireNative() {
|
|
|
131
131
|
try {
|
|
132
132
|
const binding = require('@dcmnorm/win32-x64-gnu')
|
|
133
133
|
const bindingPackageVersion = require('@dcmnorm/win32-x64-gnu/package.json').version
|
|
134
|
-
if (bindingPackageVersion !== '0.
|
|
135
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
134
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
135
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
136
136
|
}
|
|
137
137
|
return binding
|
|
138
138
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('@dcmnorm/win32-x64-msvc')
|
|
149
149
|
const bindingPackageVersion = require('@dcmnorm/win32-x64-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
150
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -164,8 +164,8 @@ function requireNative() {
|
|
|
164
164
|
try {
|
|
165
165
|
const binding = require('@dcmnorm/win32-ia32-msvc')
|
|
166
166
|
const bindingPackageVersion = require('@dcmnorm/win32-ia32-msvc/package.json').version
|
|
167
|
-
if (bindingPackageVersion !== '0.
|
|
168
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
167
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
168
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
169
169
|
}
|
|
170
170
|
return binding
|
|
171
171
|
} catch (e) {
|
|
@@ -180,8 +180,8 @@ function requireNative() {
|
|
|
180
180
|
try {
|
|
181
181
|
const binding = require('@dcmnorm/win32-arm64-msvc')
|
|
182
182
|
const bindingPackageVersion = require('@dcmnorm/win32-arm64-msvc/package.json').version
|
|
183
|
-
if (bindingPackageVersion !== '0.
|
|
184
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
183
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
184
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
185
185
|
}
|
|
186
186
|
return binding
|
|
187
187
|
} catch (e) {
|
|
@@ -199,8 +199,8 @@ function requireNative() {
|
|
|
199
199
|
try {
|
|
200
200
|
const binding = require('@dcmnorm/darwin-universal')
|
|
201
201
|
const bindingPackageVersion = require('@dcmnorm/darwin-universal/package.json').version
|
|
202
|
-
if (bindingPackageVersion !== '0.
|
|
203
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
202
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
203
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
204
204
|
}
|
|
205
205
|
return binding
|
|
206
206
|
} catch (e) {
|
|
@@ -215,8 +215,8 @@ function requireNative() {
|
|
|
215
215
|
try {
|
|
216
216
|
const binding = require('@dcmnorm/darwin-x64')
|
|
217
217
|
const bindingPackageVersion = require('@dcmnorm/darwin-x64/package.json').version
|
|
218
|
-
if (bindingPackageVersion !== '0.
|
|
219
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
218
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
219
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
220
220
|
}
|
|
221
221
|
return binding
|
|
222
222
|
} catch (e) {
|
|
@@ -231,8 +231,8 @@ function requireNative() {
|
|
|
231
231
|
try {
|
|
232
232
|
const binding = require('@dcmnorm/darwin-arm64')
|
|
233
233
|
const bindingPackageVersion = require('@dcmnorm/darwin-arm64/package.json').version
|
|
234
|
-
if (bindingPackageVersion !== '0.
|
|
235
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
234
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
235
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
236
236
|
}
|
|
237
237
|
return binding
|
|
238
238
|
} catch (e) {
|
|
@@ -251,8 +251,8 @@ function requireNative() {
|
|
|
251
251
|
try {
|
|
252
252
|
const binding = require('@dcmnorm/freebsd-x64')
|
|
253
253
|
const bindingPackageVersion = require('@dcmnorm/freebsd-x64/package.json').version
|
|
254
|
-
if (bindingPackageVersion !== '0.
|
|
255
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
254
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
255
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
256
256
|
}
|
|
257
257
|
return binding
|
|
258
258
|
} catch (e) {
|
|
@@ -267,8 +267,8 @@ function requireNative() {
|
|
|
267
267
|
try {
|
|
268
268
|
const binding = require('@dcmnorm/freebsd-arm64')
|
|
269
269
|
const bindingPackageVersion = require('@dcmnorm/freebsd-arm64/package.json').version
|
|
270
|
-
if (bindingPackageVersion !== '0.
|
|
271
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
270
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
271
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
272
272
|
}
|
|
273
273
|
return binding
|
|
274
274
|
} catch (e) {
|
|
@@ -283,8 +283,8 @@ function requireNative() {
|
|
|
283
283
|
try {
|
|
284
284
|
const binding = require('@dcmnorm/freebsd-ppc64')
|
|
285
285
|
const bindingPackageVersion = require('@dcmnorm/freebsd-ppc64/package.json').version
|
|
286
|
-
if (bindingPackageVersion !== '0.
|
|
287
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
286
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
287
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
288
288
|
}
|
|
289
289
|
return binding
|
|
290
290
|
} catch (e) {
|
|
@@ -304,8 +304,8 @@ function requireNative() {
|
|
|
304
304
|
try {
|
|
305
305
|
const binding = require('@dcmnorm/linux-x64-musl')
|
|
306
306
|
const bindingPackageVersion = require('@dcmnorm/linux-x64-musl/package.json').version
|
|
307
|
-
if (bindingPackageVersion !== '0.
|
|
308
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
307
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
308
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
309
309
|
}
|
|
310
310
|
return binding
|
|
311
311
|
} catch (e) {
|
|
@@ -320,8 +320,8 @@ function requireNative() {
|
|
|
320
320
|
try {
|
|
321
321
|
const binding = require('@dcmnorm/linux-x64-gnu')
|
|
322
322
|
const bindingPackageVersion = require('@dcmnorm/linux-x64-gnu/package.json').version
|
|
323
|
-
if (bindingPackageVersion !== '0.
|
|
324
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
323
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
324
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
325
325
|
}
|
|
326
326
|
return binding
|
|
327
327
|
} catch (e) {
|
|
@@ -338,8 +338,8 @@ function requireNative() {
|
|
|
338
338
|
try {
|
|
339
339
|
const binding = require('@dcmnorm/linux-arm64-musl')
|
|
340
340
|
const bindingPackageVersion = require('@dcmnorm/linux-arm64-musl/package.json').version
|
|
341
|
-
if (bindingPackageVersion !== '0.
|
|
342
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
341
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
342
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
343
343
|
}
|
|
344
344
|
return binding
|
|
345
345
|
} catch (e) {
|
|
@@ -354,8 +354,8 @@ function requireNative() {
|
|
|
354
354
|
try {
|
|
355
355
|
const binding = require('@dcmnorm/linux-arm64-gnu')
|
|
356
356
|
const bindingPackageVersion = require('@dcmnorm/linux-arm64-gnu/package.json').version
|
|
357
|
-
if (bindingPackageVersion !== '0.
|
|
358
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
357
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
358
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
359
359
|
}
|
|
360
360
|
return binding
|
|
361
361
|
} catch (e) {
|
|
@@ -372,8 +372,8 @@ function requireNative() {
|
|
|
372
372
|
try {
|
|
373
373
|
const binding = require('@dcmnorm/linux-arm-musleabihf')
|
|
374
374
|
const bindingPackageVersion = require('@dcmnorm/linux-arm-musleabihf/package.json').version
|
|
375
|
-
if (bindingPackageVersion !== '0.
|
|
376
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
375
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
376
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
377
377
|
}
|
|
378
378
|
return binding
|
|
379
379
|
} catch (e) {
|
|
@@ -388,8 +388,8 @@ function requireNative() {
|
|
|
388
388
|
try {
|
|
389
389
|
const binding = require('@dcmnorm/linux-arm-gnueabihf')
|
|
390
390
|
const bindingPackageVersion = require('@dcmnorm/linux-arm-gnueabihf/package.json').version
|
|
391
|
-
if (bindingPackageVersion !== '0.
|
|
392
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
391
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
392
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
393
393
|
}
|
|
394
394
|
return binding
|
|
395
395
|
} catch (e) {
|
|
@@ -406,8 +406,8 @@ function requireNative() {
|
|
|
406
406
|
try {
|
|
407
407
|
const binding = require('@dcmnorm/linux-loong64-musl')
|
|
408
408
|
const bindingPackageVersion = require('@dcmnorm/linux-loong64-musl/package.json').version
|
|
409
|
-
if (bindingPackageVersion !== '0.
|
|
410
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
409
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
410
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
411
411
|
}
|
|
412
412
|
return binding
|
|
413
413
|
} catch (e) {
|
|
@@ -422,8 +422,8 @@ function requireNative() {
|
|
|
422
422
|
try {
|
|
423
423
|
const binding = require('@dcmnorm/linux-loong64-gnu')
|
|
424
424
|
const bindingPackageVersion = require('@dcmnorm/linux-loong64-gnu/package.json').version
|
|
425
|
-
if (bindingPackageVersion !== '0.
|
|
426
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
425
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
426
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
427
427
|
}
|
|
428
428
|
return binding
|
|
429
429
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('@dcmnorm/linux-riscv64-musl')
|
|
442
442
|
const bindingPackageVersion = require('@dcmnorm/linux-riscv64-musl/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
443
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('@dcmnorm/linux-riscv64-gnu')
|
|
458
458
|
const bindingPackageVersion = require('@dcmnorm/linux-riscv64-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
459
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -473,8 +473,8 @@ function requireNative() {
|
|
|
473
473
|
try {
|
|
474
474
|
const binding = require('@dcmnorm/linux-ppc64-gnu')
|
|
475
475
|
const bindingPackageVersion = require('@dcmnorm/linux-ppc64-gnu/package.json').version
|
|
476
|
-
if (bindingPackageVersion !== '0.
|
|
477
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
476
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
477
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
478
478
|
}
|
|
479
479
|
return binding
|
|
480
480
|
} catch (e) {
|
|
@@ -489,8 +489,8 @@ function requireNative() {
|
|
|
489
489
|
try {
|
|
490
490
|
const binding = require('@dcmnorm/linux-s390x-gnu')
|
|
491
491
|
const bindingPackageVersion = require('@dcmnorm/linux-s390x-gnu/package.json').version
|
|
492
|
-
if (bindingPackageVersion !== '0.
|
|
493
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
492
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
493
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
494
494
|
}
|
|
495
495
|
return binding
|
|
496
496
|
} catch (e) {
|
|
@@ -509,8 +509,8 @@ function requireNative() {
|
|
|
509
509
|
try {
|
|
510
510
|
const binding = require('@dcmnorm/openharmony-arm64')
|
|
511
511
|
const bindingPackageVersion = require('@dcmnorm/openharmony-arm64/package.json').version
|
|
512
|
-
if (bindingPackageVersion !== '0.
|
|
513
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
512
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
513
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
514
514
|
}
|
|
515
515
|
return binding
|
|
516
516
|
} catch (e) {
|
|
@@ -525,8 +525,8 @@ function requireNative() {
|
|
|
525
525
|
try {
|
|
526
526
|
const binding = require('@dcmnorm/openharmony-x64')
|
|
527
527
|
const bindingPackageVersion = require('@dcmnorm/openharmony-x64/package.json').version
|
|
528
|
-
if (bindingPackageVersion !== '0.
|
|
529
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
528
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
529
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
530
530
|
}
|
|
531
531
|
return binding
|
|
532
532
|
} catch (e) {
|
|
@@ -541,8 +541,8 @@ function requireNative() {
|
|
|
541
541
|
try {
|
|
542
542
|
const binding = require('@dcmnorm/openharmony-arm')
|
|
543
543
|
const bindingPackageVersion = require('@dcmnorm/openharmony-arm/package.json').version
|
|
544
|
-
if (bindingPackageVersion !== '0.
|
|
545
|
-
throw new Error(`Native binding package version mismatch, expected 0.
|
|
544
|
+
if (bindingPackageVersion !== '0.15.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
545
|
+
throw new Error(`Native binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
546
546
|
}
|
|
547
547
|
return binding
|
|
548
548
|
} catch (e) {
|
|
@@ -683,8 +683,8 @@ if (!nativeBinding || forceWasi) {
|
|
|
683
683
|
if (!candidateFailed) {
|
|
684
684
|
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
685
685
|
const bindingPackageVersion = require('@dcmnorm/wasm32-wasi/package.json').version
|
|
686
|
-
if (bindingPackageVersion !== '0.
|
|
687
|
-
throw new Error(`WASI binding package version mismatch, expected 0.
|
|
686
|
+
if (bindingPackageVersion !== '0.15.1') {
|
|
687
|
+
throw new Error(`WASI binding package version mismatch, expected 0.15.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
690
|
wasiBinding = require('@dcmnorm/wasm32-wasi')
|
|
@@ -844,6 +844,12 @@ module.exports.StoreScuHandle = nativeBinding.StoreScuHandle
|
|
|
844
844
|
module.exports.buildVolume = nativeBinding.buildVolume
|
|
845
845
|
module.exports.checkDicom = nativeBinding.checkDicom
|
|
846
846
|
module.exports.computeHistogram = nativeBinding.computeHistogram
|
|
847
|
+
module.exports.datasetDocumentToJson = nativeBinding.datasetDocumentToJson
|
|
848
|
+
module.exports.datasetRead = nativeBinding.datasetRead
|
|
849
|
+
module.exports.datasetRenderPixels = nativeBinding.datasetRenderPixels
|
|
850
|
+
module.exports.datasetSourceToJson = nativeBinding.datasetSourceToJson
|
|
851
|
+
module.exports.datasetTranscode = nativeBinding.datasetTranscode
|
|
852
|
+
module.exports.datasetWrite = nativeBinding.datasetWrite
|
|
847
853
|
module.exports.echoScu = nativeBinding.echoScu
|
|
848
854
|
module.exports.editTags = nativeBinding.editTags
|
|
849
855
|
module.exports.exportFrameStackTexture = nativeBinding.exportFrameStackTexture
|
|
@@ -851,6 +857,7 @@ module.exports.exportFrameStackTextureRgb = nativeBinding.exportFrameStackTextur
|
|
|
851
857
|
module.exports.exportFrameTexture = nativeBinding.exportFrameTexture
|
|
852
858
|
module.exports.exportFrameTextureRgb = nativeBinding.exportFrameTextureRgb
|
|
853
859
|
module.exports.findScu = nativeBinding.findScu
|
|
860
|
+
module.exports.keywordOf = nativeBinding.keywordOf
|
|
854
861
|
module.exports.moveScu = nativeBinding.moveScu
|
|
855
862
|
module.exports.readJson = nativeBinding.readJson
|
|
856
863
|
module.exports.readTags = nativeBinding.readTags
|
|
@@ -861,6 +868,9 @@ module.exports.startEchoScu = nativeBinding.startEchoScu
|
|
|
861
868
|
module.exports.startFindScu = nativeBinding.startFindScu
|
|
862
869
|
module.exports.startStoreScu = nativeBinding.startStoreScu
|
|
863
870
|
module.exports.storeScu = nativeBinding.storeScu
|
|
871
|
+
module.exports.tagForKeyword = nativeBinding.tagForKeyword
|
|
864
872
|
module.exports.transcode = nativeBinding.transcode
|
|
873
|
+
module.exports.transferSyntaxSupport = nativeBinding.transferSyntaxSupport
|
|
874
|
+
module.exports.vrOf = nativeBinding.vrOf
|
|
865
875
|
module.exports.writeDicomdir = nativeBinding.writeDicomdir
|
|
866
876
|
module.exports.writeJson = nativeBinding.writeJson
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dcmnorm",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "Native Node.js bindings for dcmnorm: DICOM read/edit/transcode/render and DIMSE networking in-process (no CLI subprocess)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Jason Klotzer",
|
|
@@ -20,9 +20,13 @@
|
|
|
20
20
|
"dimse",
|
|
21
21
|
"napi-rs"
|
|
22
22
|
],
|
|
23
|
-
"main": "
|
|
24
|
-
"types": "
|
|
23
|
+
"main": "dcmnorm.js",
|
|
24
|
+
"types": "dcmnorm.d.ts",
|
|
25
25
|
"files": [
|
|
26
|
+
"dcmnorm.js",
|
|
27
|
+
"dcmnorm.d.ts",
|
|
28
|
+
"dicom-constants.js",
|
|
29
|
+
"dicom-constants.d.ts",
|
|
26
30
|
"index.js",
|
|
27
31
|
"index.d.ts"
|
|
28
32
|
],
|
|
@@ -46,14 +50,14 @@
|
|
|
46
50
|
"build": "napi build --platform --release && node prepare-npm.js --fix-loader",
|
|
47
51
|
"build:debug": "napi build --platform && node prepare-npm.js --fix-loader",
|
|
48
52
|
"build:docker": "./build-in-docker.sh",
|
|
49
|
-
"test": "node test/smoke.js"
|
|
53
|
+
"test": "node test/smoke.js && node test/dataset.js"
|
|
50
54
|
},
|
|
51
55
|
"optionalDependencies": {
|
|
52
|
-
"@dcmnorm/linux-x64-gnu": "0.
|
|
53
|
-
"@dcmnorm/linux-arm64-gnu": "0.
|
|
54
|
-
"@dcmnorm/win32-x64-msvc": "0.
|
|
55
|
-
"@dcmnorm/darwin-arm64": "0.
|
|
56
|
-
"@dcmnorm/darwin-x64": "0.
|
|
56
|
+
"@dcmnorm/linux-x64-gnu": "0.15.1",
|
|
57
|
+
"@dcmnorm/linux-arm64-gnu": "0.15.1",
|
|
58
|
+
"@dcmnorm/win32-x64-msvc": "0.15.1",
|
|
59
|
+
"@dcmnorm/darwin-arm64": "0.15.1",
|
|
60
|
+
"@dcmnorm/darwin-x64": "0.15.1"
|
|
57
61
|
},
|
|
58
62
|
"devDependencies": {
|
|
59
63
|
"@napi-rs/cli": "^3.7.3"
|