@flywheel-io/fw-file-rs 0.7.0 → 0.8.0
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/dcm/dcm.d.ts +31 -9
- package/dcm/dcm.js +155 -90
- package/dcm/dcm_bg.wasm +0 -0
- package/dcm/dcm_bg.wasm.d.ts +13 -9
- package/package.json +1 -1
package/dcm/dcm.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ export class Context {
|
|
|
6
6
|
[Symbol.dispose](): void;
|
|
7
7
|
static default(): Context;
|
|
8
8
|
deid_header(bytes: Uint8Array): Uint8Array;
|
|
9
|
+
/**
|
|
10
|
+
* De-identify DICOM bytes and return `[bytes, report]` — see
|
|
11
|
+
* [`deid_result_to_js_array`] for the shape.
|
|
12
|
+
*/
|
|
13
|
+
deid_header_with_report(bytes: Uint8Array): Array<any>;
|
|
9
14
|
deid_profile(yaml: string): Context;
|
|
10
15
|
get_deid_profile(): DeidProfile | undefined;
|
|
11
16
|
get_fw_meta(header: any): any;
|
|
@@ -28,7 +33,13 @@ export class DeidProfile {
|
|
|
28
33
|
free(): void;
|
|
29
34
|
[Symbol.dispose](): void;
|
|
30
35
|
deid_dcm(dcm_bytes: Uint8Array): Uint8Array;
|
|
36
|
+
/**
|
|
37
|
+
* Apply the profile and return `[bytes, report]` — see
|
|
38
|
+
* [`deid_result_to_js_array`] for the shape.
|
|
39
|
+
*/
|
|
40
|
+
deid_dcm_with_report(dcm_bytes: Uint8Array): Array<any>;
|
|
31
41
|
static from_yaml(yaml: string): DeidProfile;
|
|
42
|
+
static schema(): any;
|
|
32
43
|
}
|
|
33
44
|
|
|
34
45
|
export class WasmDCMGroup {
|
|
@@ -47,6 +58,13 @@ export function is_dicom_part10(file: File): Promise<boolean>;
|
|
|
47
58
|
|
|
48
59
|
export function parse_header(bytes: Uint8Array, include_tags?: string[] | null): any;
|
|
49
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Walk every element in the DICOM header bytes in document order, including
|
|
63
|
+
* sequences and their nested items. Returns an array of row objects with
|
|
64
|
+
* keys: path, keyword, tag, depth, is_sq, value.
|
|
65
|
+
*/
|
|
66
|
+
export function parse_header_full(bytes: Uint8Array): any;
|
|
67
|
+
|
|
50
68
|
export function read_until_pixels(file: File, stop_tags: any, max_size?: number | null): Promise<Uint8Array>;
|
|
51
69
|
|
|
52
70
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -54,8 +72,11 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
54
72
|
export interface InitOutput {
|
|
55
73
|
readonly memory: WebAssembly.Memory;
|
|
56
74
|
readonly __wbg_context_free: (a: number, b: number) => void;
|
|
75
|
+
readonly __wbg_deidprofile_free: (a: number, b: number) => void;
|
|
76
|
+
readonly __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
57
77
|
readonly context_default: () => number;
|
|
58
78
|
readonly context_deid_header: (a: number, b: number, c: number) => [number, number, number, number];
|
|
79
|
+
readonly context_deid_header_with_report: (a: number, b: number, c: number) => [number, number, number];
|
|
59
80
|
readonly context_deid_profile: (a: number, b: number, c: number) => [number, number, number];
|
|
60
81
|
readonly context_get_deid_profile: (a: number) => number;
|
|
61
82
|
readonly context_get_fw_meta: (a: number, b: any) => [number, number, number];
|
|
@@ -65,24 +86,25 @@ export interface InitOutput {
|
|
|
65
86
|
readonly context_is_dcm_filename: (a: number, b: number) => number;
|
|
66
87
|
readonly context_matches_file_filter: (a: number, b: number, c: number) => number;
|
|
67
88
|
readonly context_max_size: (a: number, b: number) => number;
|
|
89
|
+
readonly context_new: () => number;
|
|
68
90
|
readonly context_parse_header: (a: number, b: number, c: number) => [number, number, number];
|
|
69
91
|
readonly context_read_until_pixels: (a: number, b: any) => any;
|
|
70
92
|
readonly context_rename_file: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
71
93
|
readonly context_split_localizer: (a: number, b: number) => number;
|
|
72
94
|
readonly context_stop_at_tags: (a: number, b: any) => [number, number, number];
|
|
73
|
-
readonly context_new: () => number;
|
|
74
|
-
readonly parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
75
|
-
readonly get_fw_meta: (a: any, b: any) => [number, number, number];
|
|
76
|
-
readonly __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
77
95
|
readonly create_dcm_as_bytes: (a: any) => [number, number, number, number];
|
|
96
|
+
readonly deidprofile_deid_dcm: (a: number, b: number, c: number) => [number, number, number, number];
|
|
97
|
+
readonly deidprofile_deid_dcm_with_report: (a: number, b: number, c: number) => [number, number, number];
|
|
98
|
+
readonly deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
99
|
+
readonly deidprofile_schema: () => [number, number, number];
|
|
100
|
+
readonly get_fw_meta: (a: any, b: any) => [number, number, number];
|
|
78
101
|
readonly group_series: (a: any, b: any, c: number) => any;
|
|
79
102
|
readonly is_dicom_part10: (a: any) => any;
|
|
103
|
+
readonly parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
104
|
+
readonly parse_header_full: (a: number, b: number) => [number, number, number];
|
|
80
105
|
readonly read_until_pixels: (a: any, b: any, c: number) => any;
|
|
81
|
-
readonly
|
|
82
|
-
readonly
|
|
83
|
-
readonly deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
84
|
-
readonly wasm_bindgen__convert__closures_____invoke__h023ec276d801cc59: (a: number, b: number, c: any) => [number, number];
|
|
85
|
-
readonly wasm_bindgen__convert__closures_____invoke__h4d206e7acbddb6aa: (a: number, b: number, c: any, d: any) => void;
|
|
106
|
+
readonly wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
107
|
+
readonly wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___wasm_bindgen_46acc7fd244e2d4a___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_46acc7fd244e2d4a___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
86
108
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
87
109
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
88
110
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/dcm/dcm.js
CHANGED
|
@@ -39,6 +39,21 @@ export class Context {
|
|
|
39
39
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
40
40
|
return v2;
|
|
41
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* De-identify DICOM bytes and return `[bytes, report]` — see
|
|
44
|
+
* [`deid_result_to_js_array`] for the shape.
|
|
45
|
+
* @param {Uint8Array} bytes
|
|
46
|
+
* @returns {Array<any>}
|
|
47
|
+
*/
|
|
48
|
+
deid_header_with_report(bytes) {
|
|
49
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
50
|
+
const len0 = WASM_VECTOR_LEN;
|
|
51
|
+
const ret = wasm.context_deid_header_with_report(this.__wbg_ptr, ptr0, len0);
|
|
52
|
+
if (ret[2]) {
|
|
53
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
54
|
+
}
|
|
55
|
+
return takeFromExternrefTable0(ret[0]);
|
|
56
|
+
}
|
|
42
57
|
/**
|
|
43
58
|
* @param {string} yaml
|
|
44
59
|
* @returns {Context}
|
|
@@ -234,6 +249,21 @@ export class DeidProfile {
|
|
|
234
249
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
235
250
|
return v2;
|
|
236
251
|
}
|
|
252
|
+
/**
|
|
253
|
+
* Apply the profile and return `[bytes, report]` — see
|
|
254
|
+
* [`deid_result_to_js_array`] for the shape.
|
|
255
|
+
* @param {Uint8Array} dcm_bytes
|
|
256
|
+
* @returns {Array<any>}
|
|
257
|
+
*/
|
|
258
|
+
deid_dcm_with_report(dcm_bytes) {
|
|
259
|
+
const ptr0 = passArray8ToWasm0(dcm_bytes, wasm.__wbindgen_malloc);
|
|
260
|
+
const len0 = WASM_VECTOR_LEN;
|
|
261
|
+
const ret = wasm.deidprofile_deid_dcm_with_report(this.__wbg_ptr, ptr0, len0);
|
|
262
|
+
if (ret[2]) {
|
|
263
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
264
|
+
}
|
|
265
|
+
return takeFromExternrefTable0(ret[0]);
|
|
266
|
+
}
|
|
237
267
|
/**
|
|
238
268
|
* @param {string} yaml
|
|
239
269
|
* @returns {DeidProfile}
|
|
@@ -247,6 +277,16 @@ export class DeidProfile {
|
|
|
247
277
|
}
|
|
248
278
|
return DeidProfile.__wrap(ret[0]);
|
|
249
279
|
}
|
|
280
|
+
/**
|
|
281
|
+
* @returns {any}
|
|
282
|
+
*/
|
|
283
|
+
static schema() {
|
|
284
|
+
const ret = wasm.deidprofile_schema();
|
|
285
|
+
if (ret[2]) {
|
|
286
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
287
|
+
}
|
|
288
|
+
return takeFromExternrefTable0(ret[0]);
|
|
289
|
+
}
|
|
250
290
|
}
|
|
251
291
|
if (Symbol.dispose) DeidProfile.prototype[Symbol.dispose] = DeidProfile.prototype.free;
|
|
252
292
|
|
|
@@ -328,6 +368,23 @@ export function parse_header(bytes, include_tags) {
|
|
|
328
368
|
return takeFromExternrefTable0(ret[0]);
|
|
329
369
|
}
|
|
330
370
|
|
|
371
|
+
/**
|
|
372
|
+
* Walk every element in the DICOM header bytes in document order, including
|
|
373
|
+
* sequences and their nested items. Returns an array of row objects with
|
|
374
|
+
* keys: path, keyword, tag, depth, is_sq, value.
|
|
375
|
+
* @param {Uint8Array} bytes
|
|
376
|
+
* @returns {any}
|
|
377
|
+
*/
|
|
378
|
+
export function parse_header_full(bytes) {
|
|
379
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
380
|
+
const len0 = WASM_VECTOR_LEN;
|
|
381
|
+
const ret = wasm.parse_header_full(ptr0, len0);
|
|
382
|
+
if (ret[2]) {
|
|
383
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
384
|
+
}
|
|
385
|
+
return takeFromExternrefTable0(ret[0]);
|
|
386
|
+
}
|
|
387
|
+
|
|
331
388
|
/**
|
|
332
389
|
* @param {File} file
|
|
333
390
|
* @param {any} stop_tags
|
|
@@ -341,11 +398,11 @@ export function read_until_pixels(file, stop_tags, max_size) {
|
|
|
341
398
|
function __wbg_get_imports() {
|
|
342
399
|
const import0 = {
|
|
343
400
|
__proto__: null,
|
|
344
|
-
|
|
401
|
+
__wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
|
|
345
402
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
346
403
|
return ret;
|
|
347
404
|
},
|
|
348
|
-
|
|
405
|
+
__wbg_Number_14af1003b8dd5ead: function(arg0) {
|
|
349
406
|
const ret = Number(arg0);
|
|
350
407
|
return ret;
|
|
351
408
|
},
|
|
@@ -356,68 +413,68 @@ function __wbg_get_imports() {
|
|
|
356
413
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
357
414
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
358
415
|
},
|
|
359
|
-
|
|
416
|
+
__wbg___wbindgen_bigint_get_as_i64_a2383202b9353e4c: function(arg0, arg1) {
|
|
360
417
|
const v = arg1;
|
|
361
418
|
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
362
419
|
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
363
420
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
364
421
|
},
|
|
365
|
-
|
|
422
|
+
__wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
|
|
366
423
|
const v = arg0;
|
|
367
424
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
368
425
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
369
426
|
},
|
|
370
|
-
|
|
427
|
+
__wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
|
|
371
428
|
const ret = debugString(arg1);
|
|
372
429
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
373
430
|
const len1 = WASM_VECTOR_LEN;
|
|
374
431
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
375
432
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
376
433
|
},
|
|
377
|
-
|
|
434
|
+
__wbg___wbindgen_in_92f62ee1427d9e49: function(arg0, arg1) {
|
|
378
435
|
const ret = arg0 in arg1;
|
|
379
436
|
return ret;
|
|
380
437
|
},
|
|
381
|
-
|
|
438
|
+
__wbg___wbindgen_is_bigint_b123553bed3bb382: function(arg0) {
|
|
382
439
|
const ret = typeof(arg0) === 'bigint';
|
|
383
440
|
return ret;
|
|
384
441
|
},
|
|
385
|
-
|
|
442
|
+
__wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
|
|
386
443
|
const ret = typeof(arg0) === 'function';
|
|
387
444
|
return ret;
|
|
388
445
|
},
|
|
389
|
-
|
|
446
|
+
__wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
|
|
390
447
|
const ret = arg0 === null;
|
|
391
448
|
return ret;
|
|
392
449
|
},
|
|
393
|
-
|
|
450
|
+
__wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
|
|
394
451
|
const val = arg0;
|
|
395
452
|
const ret = typeof(val) === 'object' && val !== null;
|
|
396
453
|
return ret;
|
|
397
454
|
},
|
|
398
|
-
|
|
455
|
+
__wbg___wbindgen_is_string_90b56bc79aad6f6c: function(arg0) {
|
|
399
456
|
const ret = typeof(arg0) === 'string';
|
|
400
457
|
return ret;
|
|
401
458
|
},
|
|
402
|
-
|
|
459
|
+
__wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
|
|
403
460
|
const ret = arg0 === undefined;
|
|
404
461
|
return ret;
|
|
405
462
|
},
|
|
406
|
-
|
|
463
|
+
__wbg___wbindgen_jsval_eq_02babf21faa37971: function(arg0, arg1) {
|
|
407
464
|
const ret = arg0 === arg1;
|
|
408
465
|
return ret;
|
|
409
466
|
},
|
|
410
|
-
|
|
467
|
+
__wbg___wbindgen_jsval_loose_eq_677f21e468d6b461: function(arg0, arg1) {
|
|
411
468
|
const ret = arg0 == arg1;
|
|
412
469
|
return ret;
|
|
413
470
|
},
|
|
414
|
-
|
|
471
|
+
__wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
|
|
415
472
|
const obj = arg1;
|
|
416
473
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
417
474
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
418
475
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
419
476
|
},
|
|
420
|
-
|
|
477
|
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
|
421
478
|
const obj = arg1;
|
|
422
479
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
423
480
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -425,56 +482,56 @@ function __wbg_get_imports() {
|
|
|
425
482
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
426
483
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
427
484
|
},
|
|
428
|
-
|
|
485
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
429
486
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
430
487
|
},
|
|
431
|
-
|
|
488
|
+
__wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
|
|
432
489
|
arg0._wbg_cb_unref();
|
|
433
490
|
},
|
|
434
|
-
|
|
491
|
+
__wbg_arrayBuffer_0fe6e1300abcf908: function(arg0) {
|
|
435
492
|
const ret = arg0.arrayBuffer();
|
|
436
493
|
return ret;
|
|
437
494
|
},
|
|
438
|
-
|
|
495
|
+
__wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
|
|
439
496
|
const ret = arg0.call(arg1, arg2);
|
|
440
497
|
return ret;
|
|
441
498
|
}, arguments); },
|
|
442
|
-
|
|
499
|
+
__wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
|
|
443
500
|
const ret = arg0.call(arg1);
|
|
444
501
|
return ret;
|
|
445
502
|
}, arguments); },
|
|
446
|
-
|
|
503
|
+
__wbg_done_b41a1d26cdb37fb6: function(arg0) {
|
|
447
504
|
const ret = arg0.done;
|
|
448
505
|
return ret;
|
|
449
506
|
},
|
|
450
|
-
|
|
507
|
+
__wbg_entries_fb6397112b1de25f: function(arg0) {
|
|
451
508
|
const ret = Object.entries(arg0);
|
|
452
509
|
return ret;
|
|
453
510
|
},
|
|
454
|
-
|
|
511
|
+
__wbg_getRandomValues_a608c4436c19407a: function() { return handleError(function (arg0, arg1) {
|
|
455
512
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
456
513
|
}, arguments); },
|
|
457
|
-
|
|
514
|
+
__wbg_getTime_f5a55efff2585d5d: function(arg0) {
|
|
458
515
|
const ret = arg0.getTime();
|
|
459
516
|
return ret;
|
|
460
517
|
},
|
|
461
|
-
|
|
518
|
+
__wbg_getTimezoneOffset_2e851fdaecc2dc92: function(arg0) {
|
|
462
519
|
const ret = arg0.getTimezoneOffset();
|
|
463
520
|
return ret;
|
|
464
521
|
},
|
|
465
|
-
|
|
466
|
-
const ret = arg0[arg1 >>> 0];
|
|
467
|
-
return ret;
|
|
468
|
-
},
|
|
469
|
-
__wbg_get_9a29be2cb383ed9a: function() { return handleError(function (arg0, arg1) {
|
|
522
|
+
__wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
|
|
470
523
|
const ret = Reflect.get(arg0, arg1);
|
|
471
524
|
return ret;
|
|
472
525
|
}, arguments); },
|
|
473
|
-
|
|
526
|
+
__wbg_get_6c896e0571ddae51: function(arg0, arg1) {
|
|
474
527
|
const ret = arg0[arg1 >>> 0];
|
|
475
528
|
return ret;
|
|
476
529
|
},
|
|
477
|
-
|
|
530
|
+
__wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
|
|
531
|
+
const ret = arg0[arg1 >>> 0];
|
|
532
|
+
return ret;
|
|
533
|
+
},
|
|
534
|
+
__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
|
|
478
535
|
let result;
|
|
479
536
|
try {
|
|
480
537
|
result = arg0 instanceof ArrayBuffer;
|
|
@@ -484,7 +541,7 @@ function __wbg_get_imports() {
|
|
|
484
541
|
const ret = result;
|
|
485
542
|
return ret;
|
|
486
543
|
},
|
|
487
|
-
|
|
544
|
+
__wbg_instanceof_Map_b2611749102d7ba3: function(arg0) {
|
|
488
545
|
let result;
|
|
489
546
|
try {
|
|
490
547
|
result = arg0 instanceof Map;
|
|
@@ -494,7 +551,7 @@ function __wbg_get_imports() {
|
|
|
494
551
|
const ret = result;
|
|
495
552
|
return ret;
|
|
496
553
|
},
|
|
497
|
-
|
|
554
|
+
__wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
|
|
498
555
|
let result;
|
|
499
556
|
try {
|
|
500
557
|
result = arg0 instanceof Uint8Array;
|
|
@@ -504,62 +561,62 @@ function __wbg_get_imports() {
|
|
|
504
561
|
const ret = result;
|
|
505
562
|
return ret;
|
|
506
563
|
},
|
|
507
|
-
|
|
564
|
+
__wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
|
|
508
565
|
const ret = Array.isArray(arg0);
|
|
509
566
|
return ret;
|
|
510
567
|
},
|
|
511
|
-
|
|
568
|
+
__wbg_isSafeInteger_717808ad6a54bd9e: function(arg0) {
|
|
512
569
|
const ret = Number.isSafeInteger(arg0);
|
|
513
570
|
return ret;
|
|
514
571
|
},
|
|
515
|
-
|
|
572
|
+
__wbg_iterator_e3c31c892080e444: function() {
|
|
516
573
|
const ret = Symbol.iterator;
|
|
517
574
|
return ret;
|
|
518
575
|
},
|
|
519
|
-
|
|
576
|
+
__wbg_length_7f3c00c40364105e: function(arg0) {
|
|
520
577
|
const ret = arg0.length;
|
|
521
578
|
return ret;
|
|
522
579
|
},
|
|
523
|
-
|
|
580
|
+
__wbg_length_d4bdea10311bd9cf: function(arg0) {
|
|
524
581
|
const ret = arg0.length;
|
|
525
582
|
return ret;
|
|
526
583
|
},
|
|
527
|
-
|
|
584
|
+
__wbg_new_0_72d020f0c63443d4: function() {
|
|
528
585
|
const ret = new Date();
|
|
529
586
|
return ret;
|
|
530
587
|
},
|
|
531
|
-
|
|
532
|
-
const ret = new
|
|
588
|
+
__wbg_new_1dbf7428bba60a42: function(arg0) {
|
|
589
|
+
const ret = new Uint8Array(arg0);
|
|
533
590
|
return ret;
|
|
534
591
|
},
|
|
535
|
-
|
|
592
|
+
__wbg_new_28744009d011f847: function() {
|
|
536
593
|
const ret = new Map();
|
|
537
594
|
return ret;
|
|
538
595
|
},
|
|
539
|
-
|
|
540
|
-
const ret = new
|
|
596
|
+
__wbg_new_34e56228080aa9f8: function(arg0) {
|
|
597
|
+
const ret = new Date(arg0);
|
|
541
598
|
return ret;
|
|
542
599
|
},
|
|
543
|
-
|
|
544
|
-
const ret = new
|
|
600
|
+
__wbg_new_617a8cdb8bb1130e: function() {
|
|
601
|
+
const ret = new Object();
|
|
545
602
|
return ret;
|
|
546
603
|
},
|
|
547
|
-
|
|
548
|
-
const ret = new
|
|
604
|
+
__wbg_new_ee2291f50781bf1d: function() {
|
|
605
|
+
const ret = new Array();
|
|
549
606
|
return ret;
|
|
550
607
|
},
|
|
551
|
-
|
|
608
|
+
__wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
|
|
552
609
|
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
553
610
|
return ret;
|
|
554
611
|
},
|
|
555
|
-
|
|
612
|
+
__wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
|
|
556
613
|
try {
|
|
557
614
|
var state0 = {a: arg0, b: arg1};
|
|
558
615
|
var cb0 = (arg0, arg1) => {
|
|
559
616
|
const a = state0.a;
|
|
560
617
|
state0.a = 0;
|
|
561
618
|
try {
|
|
562
|
-
return
|
|
619
|
+
return wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
563
620
|
} finally {
|
|
564
621
|
state0.a = a;
|
|
565
622
|
}
|
|
@@ -570,95 +627,99 @@ function __wbg_get_imports() {
|
|
|
570
627
|
state0.a = 0;
|
|
571
628
|
}
|
|
572
629
|
},
|
|
573
|
-
|
|
574
|
-
const ret = arg0.next();
|
|
575
|
-
return ret;
|
|
576
|
-
}, arguments); },
|
|
577
|
-
__wbg_next_402fa10b59ab20c3: function(arg0) {
|
|
630
|
+
__wbg_next_33784799010f1bbe: function(arg0) {
|
|
578
631
|
const ret = arg0.next;
|
|
579
632
|
return ret;
|
|
580
633
|
},
|
|
581
|
-
|
|
634
|
+
__wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
|
|
635
|
+
const ret = arg0.next();
|
|
636
|
+
return ret;
|
|
637
|
+
}, arguments); },
|
|
638
|
+
__wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
|
|
582
639
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
583
640
|
},
|
|
584
|
-
|
|
641
|
+
__wbg_push_2baf45db356cf468: function(arg0, arg1) {
|
|
642
|
+
const ret = arg0.push(arg1);
|
|
643
|
+
return ret;
|
|
644
|
+
},
|
|
645
|
+
__wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
|
|
585
646
|
const ret = arg0.queueMicrotask;
|
|
586
647
|
return ret;
|
|
587
648
|
},
|
|
588
|
-
|
|
649
|
+
__wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
|
|
589
650
|
queueMicrotask(arg0);
|
|
590
651
|
},
|
|
591
|
-
|
|
652
|
+
__wbg_resolve_0076e10020304ede: function(arg0) {
|
|
592
653
|
const ret = Promise.resolve(arg0);
|
|
593
654
|
return ret;
|
|
594
655
|
},
|
|
595
|
-
|
|
596
|
-
arg0[arg1] = arg2;
|
|
597
|
-
},
|
|
598
|
-
__wbg_set_9a1d61e17de7054c: function(arg0, arg1, arg2) {
|
|
656
|
+
__wbg_set_6ae97e73113c4f0b: function(arg0, arg1, arg2) {
|
|
599
657
|
const ret = arg0.set(arg1, arg2);
|
|
600
658
|
return ret;
|
|
601
659
|
},
|
|
602
|
-
|
|
660
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
661
|
+
arg0[arg1] = arg2;
|
|
662
|
+
},
|
|
663
|
+
__wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
|
|
603
664
|
arg0[arg1 >>> 0] = arg2;
|
|
604
665
|
},
|
|
605
|
-
|
|
666
|
+
__wbg_size_8f1c0b1a1fbb3810: function(arg0) {
|
|
606
667
|
const ret = arg0.size;
|
|
607
668
|
return ret;
|
|
608
669
|
},
|
|
609
|
-
|
|
670
|
+
__wbg_slice_afd8274aed4149c0: function() { return handleError(function (arg0, arg1, arg2) {
|
|
610
671
|
const ret = arg0.slice(arg1, arg2);
|
|
611
672
|
return ret;
|
|
612
673
|
}, arguments); },
|
|
613
|
-
|
|
614
|
-
const ret = typeof
|
|
674
|
+
__wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
|
|
675
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
615
676
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
616
677
|
},
|
|
617
|
-
|
|
618
|
-
const ret = typeof
|
|
678
|
+
__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
|
|
679
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
619
680
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
620
681
|
},
|
|
621
|
-
|
|
682
|
+
__wbg_static_accessor_SELF_0b583911f537483a: function() {
|
|
622
683
|
const ret = typeof self === 'undefined' ? null : self;
|
|
623
684
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
624
685
|
},
|
|
625
|
-
|
|
686
|
+
__wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
|
|
626
687
|
const ret = typeof window === 'undefined' ? null : window;
|
|
627
688
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
628
689
|
},
|
|
629
|
-
|
|
690
|
+
__wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
|
|
630
691
|
const ret = arg0.then(arg1, arg2);
|
|
631
692
|
return ret;
|
|
632
693
|
},
|
|
633
|
-
|
|
694
|
+
__wbg_then_e71170d78fcf8954: function(arg0, arg1) {
|
|
634
695
|
const ret = arg0.then(arg1);
|
|
635
696
|
return ret;
|
|
636
697
|
},
|
|
637
|
-
|
|
698
|
+
__wbg_value_f3c585ee8f5ba40c: function(arg0) {
|
|
638
699
|
const ret = arg0.value;
|
|
639
700
|
return ret;
|
|
640
701
|
},
|
|
641
|
-
|
|
642
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx:
|
|
643
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
702
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
703
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1346, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
704
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___wasm_bindgen_46acc7fd244e2d4a___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_46acc7fd244e2d4a___JsError___true_);
|
|
644
705
|
return ret;
|
|
645
706
|
},
|
|
646
|
-
|
|
707
|
+
__wbindgen_generic_0000000000000002: function(arg0) {
|
|
647
708
|
// Cast intrinsic for `F64 -> Externref`.
|
|
648
709
|
const ret = arg0;
|
|
649
710
|
return ret;
|
|
650
711
|
},
|
|
651
|
-
|
|
712
|
+
__wbindgen_generic_0000000000000003: function(arg0) {
|
|
652
713
|
// Cast intrinsic for `I64 -> Externref`.
|
|
653
714
|
const ret = arg0;
|
|
654
715
|
return ret;
|
|
655
716
|
},
|
|
656
|
-
|
|
717
|
+
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
657
718
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
658
719
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
659
720
|
return ret;
|
|
660
721
|
},
|
|
661
|
-
|
|
722
|
+
__wbindgen_generic_0000000000000005: function(arg0) {
|
|
662
723
|
// Cast intrinsic for `U64 -> Externref`.
|
|
663
724
|
const ret = BigInt.asUintN(64, arg0);
|
|
664
725
|
return ret;
|
|
@@ -679,15 +740,15 @@ function __wbg_get_imports() {
|
|
|
679
740
|
};
|
|
680
741
|
}
|
|
681
742
|
|
|
682
|
-
function
|
|
683
|
-
const ret = wasm.
|
|
743
|
+
function wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___wasm_bindgen_46acc7fd244e2d4a___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_46acc7fd244e2d4a___JsError___true_(arg0, arg1, arg2) {
|
|
744
|
+
const ret = wasm.wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___wasm_bindgen_46acc7fd244e2d4a___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_46acc7fd244e2d4a___JsError___true_(arg0, arg1, arg2);
|
|
684
745
|
if (ret[1]) {
|
|
685
746
|
throw takeFromExternrefTable0(ret[0]);
|
|
686
747
|
}
|
|
687
748
|
}
|
|
688
749
|
|
|
689
|
-
function
|
|
690
|
-
wasm.
|
|
750
|
+
function wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
751
|
+
wasm.wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
691
752
|
}
|
|
692
753
|
|
|
693
754
|
const ContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -943,11 +1004,15 @@ function __wbg_finalize_init(instance, module) {
|
|
|
943
1004
|
|
|
944
1005
|
async function __wbg_load(module, imports) {
|
|
945
1006
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
1007
|
+
if (!module.ok) {
|
|
1008
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
946
1011
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
947
1012
|
try {
|
|
948
1013
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
949
1014
|
} catch (e) {
|
|
950
|
-
const validResponse =
|
|
1015
|
+
const validResponse = expectedResponseType(module.type);
|
|
951
1016
|
|
|
952
1017
|
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
953
1018
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
package/dcm/dcm_bg.wasm
CHANGED
|
Binary file
|
package/dcm/dcm_bg.wasm.d.ts
CHANGED
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_context_free: (a: number, b: number) => void;
|
|
5
|
+
export const __wbg_deidprofile_free: (a: number, b: number) => void;
|
|
6
|
+
export const __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
5
7
|
export const context_default: () => number;
|
|
6
8
|
export const context_deid_header: (a: number, b: number, c: number) => [number, number, number, number];
|
|
9
|
+
export const context_deid_header_with_report: (a: number, b: number, c: number) => [number, number, number];
|
|
7
10
|
export const context_deid_profile: (a: number, b: number, c: number) => [number, number, number];
|
|
8
11
|
export const context_get_deid_profile: (a: number) => number;
|
|
9
12
|
export const context_get_fw_meta: (a: number, b: any) => [number, number, number];
|
|
@@ -13,24 +16,25 @@ export const context_include_tags: (a: number, b: any) => [number, number, numbe
|
|
|
13
16
|
export const context_is_dcm_filename: (a: number, b: number) => number;
|
|
14
17
|
export const context_matches_file_filter: (a: number, b: number, c: number) => number;
|
|
15
18
|
export const context_max_size: (a: number, b: number) => number;
|
|
19
|
+
export const context_new: () => number;
|
|
16
20
|
export const context_parse_header: (a: number, b: number, c: number) => [number, number, number];
|
|
17
21
|
export const context_read_until_pixels: (a: number, b: any) => any;
|
|
18
22
|
export const context_rename_file: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
|
|
19
23
|
export const context_split_localizer: (a: number, b: number) => number;
|
|
20
24
|
export const context_stop_at_tags: (a: number, b: any) => [number, number, number];
|
|
21
|
-
export const context_new: () => number;
|
|
22
|
-
export const parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
23
|
-
export const get_fw_meta: (a: any, b: any) => [number, number, number];
|
|
24
|
-
export const __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
25
25
|
export const create_dcm_as_bytes: (a: any) => [number, number, number, number];
|
|
26
|
+
export const deidprofile_deid_dcm: (a: number, b: number, c: number) => [number, number, number, number];
|
|
27
|
+
export const deidprofile_deid_dcm_with_report: (a: number, b: number, c: number) => [number, number, number];
|
|
28
|
+
export const deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
29
|
+
export const deidprofile_schema: () => [number, number, number];
|
|
30
|
+
export const get_fw_meta: (a: any, b: any) => [number, number, number];
|
|
26
31
|
export const group_series: (a: any, b: any, c: number) => any;
|
|
27
32
|
export const is_dicom_part10: (a: any) => any;
|
|
33
|
+
export const parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
34
|
+
export const parse_header_full: (a: number, b: number) => [number, number, number];
|
|
28
35
|
export const read_until_pixels: (a: any, b: any, c: number) => any;
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
32
|
-
export const wasm_bindgen__convert__closures_____invoke__h023ec276d801cc59: (a: number, b: number, c: any) => [number, number];
|
|
33
|
-
export const wasm_bindgen__convert__closures_____invoke__h4d206e7acbddb6aa: (a: number, b: number, c: any, d: any) => void;
|
|
36
|
+
export const wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined___js_sys_e24e7246c4058216___Function_fn_wasm_bindgen_46acc7fd244e2d4a___JsValue_____wasm_bindgen_46acc7fd244e2d4a___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
|
|
37
|
+
export const wasm_bindgen_46acc7fd244e2d4a___convert__closures_____invoke___wasm_bindgen_46acc7fd244e2d4a___JsValue__core_ed718c3d60ebd546___result__Result_____wasm_bindgen_46acc7fd244e2d4a___JsError___true_: (a: number, b: number, c: any) => [number, number];
|
|
34
38
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
35
39
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
36
40
|
export const __wbindgen_exn_store: (a: number) => void;
|