@flywheel-io/fw-file-rs 0.3.17 → 0.4.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 +34 -33
- package/dcm/dcm.js +140 -124
- package/dcm/dcm_bg.wasm +0 -0
- package/dcm/dcm_bg.wasm.d.ts +19 -17
- package/package.json +1 -1
package/dcm/dcm.d.ts
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function read_until_pixels(file: File, stop_tags: any, max_size?: number | null): Promise<Uint8Array>;
|
|
4
3
|
export function create_dcm_as_bytes(tags_js: any): Uint8Array;
|
|
4
|
+
export function read_until_pixels(file: File, stop_tags: any, max_size?: number | null): Promise<Uint8Array>;
|
|
5
|
+
export function group_series(path_meta_pairs: any, group_by_tags: any, split_localizer: boolean): any;
|
|
5
6
|
export function get_fw_meta(path_meta_pairs: any, arg1: any): any;
|
|
6
7
|
export function parse_header(bytes: Uint8Array, include_tags?: string[] | null): any;
|
|
7
|
-
export function group_series(path_meta_pairs: any, group_by_tags: any, split_localizer: boolean): any;
|
|
8
8
|
export class Context {
|
|
9
9
|
free(): void;
|
|
10
10
|
[Symbol.dispose](): void;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
deid_header(bytes: Uint8Array): Uint8Array;
|
|
12
|
+
get_fw_meta(header: any): any;
|
|
13
|
+
deid_profile(yaml: string): Context;
|
|
14
|
+
group_series(path_header_pairs: any): any;
|
|
15
15
|
include_tags(tags: any): Context;
|
|
16
|
+
parse_header(bytes: Uint8Array): any;
|
|
17
|
+
stop_at_tags(tags: any): Context;
|
|
16
18
|
group_by_tags(tags: any): Context;
|
|
19
|
+
static is_dcm_filename(filename: string): boolean;
|
|
17
20
|
split_localizer(flag: boolean): Context;
|
|
18
|
-
|
|
19
|
-
deid_profile(yaml: string): Context;
|
|
20
|
-
/**
|
|
21
|
-
* Read file until pixel data using configured stop tags
|
|
22
|
-
*/
|
|
21
|
+
get_deid_profile(): DeidProfile | undefined;
|
|
23
22
|
read_until_pixels(file: File): Promise<Uint8Array>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
constructor();
|
|
24
|
+
static default(): Context;
|
|
25
|
+
mappings(mappings: any): Context;
|
|
26
|
+
max_size(size: number): Context;
|
|
28
27
|
}
|
|
29
28
|
export class DeidProfile {
|
|
30
29
|
private constructor();
|
|
31
30
|
free(): void;
|
|
32
31
|
[Symbol.dispose](): void;
|
|
33
|
-
static from_yaml(yaml: string): DeidProfile;
|
|
34
32
|
deid_dcm(dcm_bytes: Uint8Array): Uint8Array;
|
|
33
|
+
static from_yaml(yaml: string): DeidProfile;
|
|
35
34
|
}
|
|
36
35
|
export class WasmDCMGroup {
|
|
37
36
|
private constructor();
|
|
@@ -45,31 +44,33 @@ export interface InitOutput {
|
|
|
45
44
|
readonly memory: WebAssembly.Memory;
|
|
46
45
|
readonly __wbg_context_free: (a: number, b: number) => void;
|
|
47
46
|
readonly context_default: () => number;
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
readonly
|
|
47
|
+
readonly context_deid_header: (a: number, b: number, c: number) => [number, number, number, number];
|
|
48
|
+
readonly context_deid_profile: (a: number, b: number, c: number) => [number, number, number];
|
|
49
|
+
readonly context_get_deid_profile: (a: number) => number;
|
|
50
|
+
readonly context_get_fw_meta: (a: number, b: any) => [number, number, number];
|
|
51
51
|
readonly context_group_by_tags: (a: number, b: any) => [number, number, number];
|
|
52
|
-
readonly
|
|
52
|
+
readonly context_group_series: (a: number, b: any) => [number, number, number];
|
|
53
|
+
readonly context_include_tags: (a: number, b: any) => [number, number, number];
|
|
54
|
+
readonly context_is_dcm_filename: (a: number, b: number) => number;
|
|
53
55
|
readonly context_mappings: (a: number, b: any) => [number, number, number];
|
|
54
|
-
readonly
|
|
55
|
-
readonly context_read_until_pixels: (a: number, b: any) => any;
|
|
56
|
+
readonly context_max_size: (a: number, b: number) => number;
|
|
56
57
|
readonly context_parse_header: (a: number, b: number, c: number) => [number, number, number];
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
58
|
+
readonly context_read_until_pixels: (a: number, b: any) => any;
|
|
59
|
+
readonly context_split_localizer: (a: number, b: number) => number;
|
|
60
|
+
readonly context_stop_at_tags: (a: number, b: any) => [number, number, number];
|
|
60
61
|
readonly context_new: () => number;
|
|
61
|
-
readonly read_until_pixels: (a: any, b: any, c: number) => any;
|
|
62
62
|
readonly create_dcm_as_bytes: (a: any) => [number, number, number, number];
|
|
63
|
-
readonly
|
|
64
|
-
readonly parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
63
|
+
readonly read_until_pixels: (a: any, b: any, c: number) => any;
|
|
65
64
|
readonly __wbg_deidprofile_free: (a: number, b: number) => void;
|
|
66
|
-
readonly deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
67
|
-
readonly deidprofile_deid_dcm: (a: number, b: number, c: number) => [number, number, number, number];
|
|
68
65
|
readonly __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
66
|
+
readonly deidprofile_deid_dcm: (a: number, b: number, c: number) => [number, number, number, number];
|
|
67
|
+
readonly deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
69
68
|
readonly group_series: (a: any, b: any, c: number) => any;
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
69
|
+
readonly get_fw_meta: (a: any, b: any) => [number, number, number];
|
|
70
|
+
readonly parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
71
|
+
readonly wasm_bindgen__convert__closures_____invoke__h2ba0c54d32b8d7ba: (a: number, b: number, c: any) => void;
|
|
72
|
+
readonly wasm_bindgen__closure__destroy__hfc572f640437337e: (a: number, b: number) => void;
|
|
73
|
+
readonly wasm_bindgen__convert__closures_____invoke__hb78066fcf1fecd31: (a: number, b: number, c: any, d: any) => void;
|
|
73
74
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
74
75
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
75
76
|
readonly __wbindgen_exn_store: (a: number) => void;
|
package/dcm/dcm.js
CHANGED
|
@@ -214,29 +214,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
214
214
|
return real;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
function takeFromExternrefTable0(idx) {
|
|
218
|
-
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
219
|
-
wasm.__externref_table_dealloc(idx);
|
|
220
|
-
return value;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
217
|
function passArray8ToWasm0(arg, malloc) {
|
|
224
218
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
225
219
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
226
220
|
WASM_VECTOR_LEN = arg.length;
|
|
227
221
|
return ptr;
|
|
228
222
|
}
|
|
229
|
-
/**
|
|
230
|
-
* @param {File} file
|
|
231
|
-
* @param {any} stop_tags
|
|
232
|
-
* @param {number | null} [max_size]
|
|
233
|
-
* @returns {Promise<Uint8Array>}
|
|
234
|
-
*/
|
|
235
|
-
export function read_until_pixels(file, stop_tags, max_size) {
|
|
236
|
-
const ret = wasm.read_until_pixels(file, stop_tags, isLikeNone(max_size) ? 0x100000001 : (max_size) >>> 0);
|
|
237
|
-
return ret;
|
|
238
|
-
}
|
|
239
223
|
|
|
224
|
+
function takeFromExternrefTable0(idx) {
|
|
225
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
226
|
+
wasm.__externref_table_dealloc(idx);
|
|
227
|
+
return value;
|
|
228
|
+
}
|
|
240
229
|
/**
|
|
241
230
|
* @param {any} tags_js
|
|
242
231
|
* @returns {Uint8Array}
|
|
@@ -251,6 +240,28 @@ export function create_dcm_as_bytes(tags_js) {
|
|
|
251
240
|
return v1;
|
|
252
241
|
}
|
|
253
242
|
|
|
243
|
+
/**
|
|
244
|
+
* @param {File} file
|
|
245
|
+
* @param {any} stop_tags
|
|
246
|
+
* @param {number | null} [max_size]
|
|
247
|
+
* @returns {Promise<Uint8Array>}
|
|
248
|
+
*/
|
|
249
|
+
export function read_until_pixels(file, stop_tags, max_size) {
|
|
250
|
+
const ret = wasm.read_until_pixels(file, stop_tags, isLikeNone(max_size) ? 0x100000001 : (max_size) >>> 0);
|
|
251
|
+
return ret;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @param {any} path_meta_pairs
|
|
256
|
+
* @param {any} group_by_tags
|
|
257
|
+
* @param {boolean} split_localizer
|
|
258
|
+
* @returns {any}
|
|
259
|
+
*/
|
|
260
|
+
export function group_series(path_meta_pairs, group_by_tags, split_localizer) {
|
|
261
|
+
const ret = wasm.group_series(path_meta_pairs, group_by_tags, split_localizer);
|
|
262
|
+
return ret;
|
|
263
|
+
}
|
|
264
|
+
|
|
254
265
|
/**
|
|
255
266
|
* @param {any} path_meta_pairs
|
|
256
267
|
* @param {any} arg1
|
|
@@ -290,23 +301,12 @@ export function parse_header(bytes, include_tags) {
|
|
|
290
301
|
return takeFromExternrefTable0(ret[0]);
|
|
291
302
|
}
|
|
292
303
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
* @param {any} group_by_tags
|
|
296
|
-
* @param {boolean} split_localizer
|
|
297
|
-
* @returns {any}
|
|
298
|
-
*/
|
|
299
|
-
export function group_series(path_meta_pairs, group_by_tags, split_localizer) {
|
|
300
|
-
const ret = wasm.group_series(path_meta_pairs, group_by_tags, split_localizer);
|
|
301
|
-
return ret;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
function wasm_bindgen__convert__closures_____invoke__hb8fb879a4264a98e(arg0, arg1, arg2) {
|
|
305
|
-
wasm.wasm_bindgen__convert__closures_____invoke__hb8fb879a4264a98e(arg0, arg1, arg2);
|
|
304
|
+
function wasm_bindgen__convert__closures_____invoke__h2ba0c54d32b8d7ba(arg0, arg1, arg2) {
|
|
305
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h2ba0c54d32b8d7ba(arg0, arg1, arg2);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
function
|
|
309
|
-
wasm.
|
|
308
|
+
function wasm_bindgen__convert__closures_____invoke__hb78066fcf1fecd31(arg0, arg1, arg2, arg3) {
|
|
309
|
+
wasm.wasm_bindgen__convert__closures_____invoke__hb78066fcf1fecd31(arg0, arg1, arg2, arg3);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
312
|
const ContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -334,39 +334,56 @@ export class Context {
|
|
|
334
334
|
const ptr = this.__destroy_into_raw();
|
|
335
335
|
wasm.__wbg_context_free(ptr, 0);
|
|
336
336
|
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
337
|
+
/**
|
|
338
|
+
* @param {Uint8Array} bytes
|
|
339
|
+
* @returns {Uint8Array}
|
|
340
|
+
*/
|
|
341
|
+
deid_header(bytes) {
|
|
342
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
343
|
+
const len0 = WASM_VECTOR_LEN;
|
|
344
|
+
const ret = wasm.context_deid_header(this.__wbg_ptr, ptr0, len0);
|
|
345
|
+
if (ret[3]) {
|
|
346
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
347
|
+
}
|
|
348
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
349
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
350
|
+
return v2;
|
|
342
351
|
}
|
|
343
352
|
/**
|
|
344
|
-
* @
|
|
353
|
+
* @param {any} header
|
|
354
|
+
* @returns {any}
|
|
345
355
|
*/
|
|
346
|
-
|
|
347
|
-
const ret = wasm.
|
|
348
|
-
|
|
356
|
+
get_fw_meta(header) {
|
|
357
|
+
const ret = wasm.context_get_fw_meta(this.__wbg_ptr, header);
|
|
358
|
+
if (ret[2]) {
|
|
359
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
360
|
+
}
|
|
361
|
+
return takeFromExternrefTable0(ret[0]);
|
|
349
362
|
}
|
|
350
363
|
/**
|
|
351
|
-
* @param {
|
|
364
|
+
* @param {string} yaml
|
|
352
365
|
* @returns {Context}
|
|
353
366
|
*/
|
|
354
|
-
|
|
367
|
+
deid_profile(yaml) {
|
|
355
368
|
const ptr = this.__destroy_into_raw();
|
|
356
|
-
const
|
|
369
|
+
const ptr0 = passStringToWasm0(yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
370
|
+
const len0 = WASM_VECTOR_LEN;
|
|
371
|
+
const ret = wasm.context_deid_profile(ptr, ptr0, len0);
|
|
357
372
|
if (ret[2]) {
|
|
358
373
|
throw takeFromExternrefTable0(ret[1]);
|
|
359
374
|
}
|
|
360
375
|
return Context.__wrap(ret[0]);
|
|
361
376
|
}
|
|
362
377
|
/**
|
|
363
|
-
* @param {
|
|
364
|
-
* @returns {
|
|
378
|
+
* @param {any} path_header_pairs
|
|
379
|
+
* @returns {any}
|
|
365
380
|
*/
|
|
366
|
-
|
|
367
|
-
const
|
|
368
|
-
|
|
369
|
-
|
|
381
|
+
group_series(path_header_pairs) {
|
|
382
|
+
const ret = wasm.context_group_series(this.__wbg_ptr, path_header_pairs);
|
|
383
|
+
if (ret[2]) {
|
|
384
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
385
|
+
}
|
|
386
|
+
return takeFromExternrefTable0(ret[0]);
|
|
370
387
|
}
|
|
371
388
|
/**
|
|
372
389
|
* @param {any} tags
|
|
@@ -381,54 +398,69 @@ export class Context {
|
|
|
381
398
|
return Context.__wrap(ret[0]);
|
|
382
399
|
}
|
|
383
400
|
/**
|
|
384
|
-
* @param {
|
|
385
|
-
* @returns {
|
|
401
|
+
* @param {Uint8Array} bytes
|
|
402
|
+
* @returns {any}
|
|
386
403
|
*/
|
|
387
|
-
|
|
388
|
-
const
|
|
389
|
-
const
|
|
404
|
+
parse_header(bytes) {
|
|
405
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
406
|
+
const len0 = WASM_VECTOR_LEN;
|
|
407
|
+
const ret = wasm.context_parse_header(this.__wbg_ptr, ptr0, len0);
|
|
390
408
|
if (ret[2]) {
|
|
391
409
|
throw takeFromExternrefTable0(ret[1]);
|
|
392
410
|
}
|
|
393
|
-
return
|
|
411
|
+
return takeFromExternrefTable0(ret[0]);
|
|
394
412
|
}
|
|
395
413
|
/**
|
|
396
|
-
* @param {
|
|
414
|
+
* @param {any} tags
|
|
397
415
|
* @returns {Context}
|
|
398
416
|
*/
|
|
399
|
-
|
|
417
|
+
stop_at_tags(tags) {
|
|
400
418
|
const ptr = this.__destroy_into_raw();
|
|
401
|
-
const ret = wasm.
|
|
402
|
-
|
|
419
|
+
const ret = wasm.context_stop_at_tags(ptr, tags);
|
|
420
|
+
if (ret[2]) {
|
|
421
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
422
|
+
}
|
|
423
|
+
return Context.__wrap(ret[0]);
|
|
403
424
|
}
|
|
404
425
|
/**
|
|
405
|
-
* @param {any}
|
|
426
|
+
* @param {any} tags
|
|
406
427
|
* @returns {Context}
|
|
407
428
|
*/
|
|
408
|
-
|
|
429
|
+
group_by_tags(tags) {
|
|
409
430
|
const ptr = this.__destroy_into_raw();
|
|
410
|
-
const ret = wasm.
|
|
431
|
+
const ret = wasm.context_group_by_tags(ptr, tags);
|
|
411
432
|
if (ret[2]) {
|
|
412
433
|
throw takeFromExternrefTable0(ret[1]);
|
|
413
434
|
}
|
|
414
435
|
return Context.__wrap(ret[0]);
|
|
415
436
|
}
|
|
416
437
|
/**
|
|
417
|
-
* @param {string}
|
|
438
|
+
* @param {string} filename
|
|
439
|
+
* @returns {boolean}
|
|
440
|
+
*/
|
|
441
|
+
static is_dcm_filename(filename) {
|
|
442
|
+
const ptr0 = passStringToWasm0(filename, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
443
|
+
const len0 = WASM_VECTOR_LEN;
|
|
444
|
+
const ret = wasm.context_is_dcm_filename(ptr0, len0);
|
|
445
|
+
return ret !== 0;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* @param {boolean} flag
|
|
418
449
|
* @returns {Context}
|
|
419
450
|
*/
|
|
420
|
-
|
|
451
|
+
split_localizer(flag) {
|
|
421
452
|
const ptr = this.__destroy_into_raw();
|
|
422
|
-
const
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
453
|
+
const ret = wasm.context_split_localizer(ptr, flag);
|
|
454
|
+
return Context.__wrap(ret);
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* @returns {DeidProfile | undefined}
|
|
458
|
+
*/
|
|
459
|
+
get_deid_profile() {
|
|
460
|
+
const ret = wasm.context_get_deid_profile(this.__wbg_ptr);
|
|
461
|
+
return ret === 0 ? undefined : DeidProfile.__wrap(ret);
|
|
429
462
|
}
|
|
430
463
|
/**
|
|
431
|
-
* Read file until pixel data using configured stop tags
|
|
432
464
|
* @param {File} file
|
|
433
465
|
* @returns {Promise<Uint8Array>}
|
|
434
466
|
*/
|
|
@@ -436,55 +468,39 @@ export class Context {
|
|
|
436
468
|
const ret = wasm.context_read_until_pixels(this.__wbg_ptr, file);
|
|
437
469
|
return ret;
|
|
438
470
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
445
|
-
const len0 = WASM_VECTOR_LEN;
|
|
446
|
-
const ret = wasm.context_parse_header(this.__wbg_ptr, ptr0, len0);
|
|
447
|
-
if (ret[2]) {
|
|
448
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
449
|
-
}
|
|
450
|
-
return takeFromExternrefTable0(ret[0]);
|
|
471
|
+
constructor() {
|
|
472
|
+
const ret = wasm.context_default();
|
|
473
|
+
this.__wbg_ptr = ret >>> 0;
|
|
474
|
+
ContextFinalization.register(this, this.__wbg_ptr, this);
|
|
475
|
+
return this;
|
|
451
476
|
}
|
|
452
477
|
/**
|
|
453
|
-
* @
|
|
454
|
-
* @returns {any}
|
|
478
|
+
* @returns {Context}
|
|
455
479
|
*/
|
|
456
|
-
|
|
457
|
-
const ret = wasm.
|
|
458
|
-
|
|
459
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
460
|
-
}
|
|
461
|
-
return takeFromExternrefTable0(ret[0]);
|
|
480
|
+
static default() {
|
|
481
|
+
const ret = wasm.context_default();
|
|
482
|
+
return Context.__wrap(ret);
|
|
462
483
|
}
|
|
463
484
|
/**
|
|
464
|
-
* @param {any}
|
|
465
|
-
* @returns {
|
|
485
|
+
* @param {any} mappings
|
|
486
|
+
* @returns {Context}
|
|
466
487
|
*/
|
|
467
|
-
|
|
468
|
-
const
|
|
488
|
+
mappings(mappings) {
|
|
489
|
+
const ptr = this.__destroy_into_raw();
|
|
490
|
+
const ret = wasm.context_mappings(ptr, mappings);
|
|
469
491
|
if (ret[2]) {
|
|
470
492
|
throw takeFromExternrefTable0(ret[1]);
|
|
471
493
|
}
|
|
472
|
-
return
|
|
494
|
+
return Context.__wrap(ret[0]);
|
|
473
495
|
}
|
|
474
496
|
/**
|
|
475
|
-
* @param {
|
|
476
|
-
* @returns {
|
|
497
|
+
* @param {number} size
|
|
498
|
+
* @returns {Context}
|
|
477
499
|
*/
|
|
478
|
-
|
|
479
|
-
const
|
|
480
|
-
const
|
|
481
|
-
|
|
482
|
-
if (ret[3]) {
|
|
483
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
484
|
-
}
|
|
485
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
486
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
487
|
-
return v2;
|
|
500
|
+
max_size(size) {
|
|
501
|
+
const ptr = this.__destroy_into_raw();
|
|
502
|
+
const ret = wasm.context_max_size(ptr, size);
|
|
503
|
+
return Context.__wrap(ret);
|
|
488
504
|
}
|
|
489
505
|
}
|
|
490
506
|
if (Symbol.dispose) Context.prototype[Symbol.dispose] = Context.prototype.free;
|
|
@@ -514,19 +530,6 @@ export class DeidProfile {
|
|
|
514
530
|
const ptr = this.__destroy_into_raw();
|
|
515
531
|
wasm.__wbg_deidprofile_free(ptr, 0);
|
|
516
532
|
}
|
|
517
|
-
/**
|
|
518
|
-
* @param {string} yaml
|
|
519
|
-
* @returns {DeidProfile}
|
|
520
|
-
*/
|
|
521
|
-
static from_yaml(yaml) {
|
|
522
|
-
const ptr0 = passStringToWasm0(yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
523
|
-
const len0 = WASM_VECTOR_LEN;
|
|
524
|
-
const ret = wasm.deidprofile_from_yaml(ptr0, len0);
|
|
525
|
-
if (ret[2]) {
|
|
526
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
527
|
-
}
|
|
528
|
-
return DeidProfile.__wrap(ret[0]);
|
|
529
|
-
}
|
|
530
533
|
/**
|
|
531
534
|
* @param {Uint8Array} dcm_bytes
|
|
532
535
|
* @returns {Uint8Array}
|
|
@@ -542,6 +545,19 @@ export class DeidProfile {
|
|
|
542
545
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
543
546
|
return v2;
|
|
544
547
|
}
|
|
548
|
+
/**
|
|
549
|
+
* @param {string} yaml
|
|
550
|
+
* @returns {DeidProfile}
|
|
551
|
+
*/
|
|
552
|
+
static from_yaml(yaml) {
|
|
553
|
+
const ptr0 = passStringToWasm0(yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
554
|
+
const len0 = WASM_VECTOR_LEN;
|
|
555
|
+
const ret = wasm.deidprofile_from_yaml(ptr0, len0);
|
|
556
|
+
if (ret[2]) {
|
|
557
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
558
|
+
}
|
|
559
|
+
return DeidProfile.__wrap(ret[0]);
|
|
560
|
+
}
|
|
545
561
|
}
|
|
546
562
|
if (Symbol.dispose) DeidProfile.prototype[Symbol.dispose] = DeidProfile.prototype.free;
|
|
547
563
|
|
|
@@ -785,7 +801,7 @@ function __wbg_get_imports() {
|
|
|
785
801
|
const a = state0.a;
|
|
786
802
|
state0.a = 0;
|
|
787
803
|
try {
|
|
788
|
-
return
|
|
804
|
+
return wasm_bindgen__convert__closures_____invoke__hb78066fcf1fecd31(a, state0.b, arg0, arg1);
|
|
789
805
|
} finally {
|
|
790
806
|
state0.a = a;
|
|
791
807
|
}
|
|
@@ -906,7 +922,7 @@ function __wbg_get_imports() {
|
|
|
906
922
|
};
|
|
907
923
|
imports.wbg.__wbindgen_cast_ddb8a4a62ab58f0b = function(arg0, arg1) {
|
|
908
924
|
// Cast intrinsic for `Closure(Closure { dtor_idx: 35, function: Function { arguments: [Externref], shim_idx: 36, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
909
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
925
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hfc572f640437337e, wasm_bindgen__convert__closures_____invoke__h2ba0c54d32b8d7ba);
|
|
910
926
|
return ret;
|
|
911
927
|
};
|
|
912
928
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
package/dcm/dcm_bg.wasm
CHANGED
|
Binary file
|
package/dcm/dcm_bg.wasm.d.ts
CHANGED
|
@@ -3,31 +3,33 @@
|
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
4
|
export const __wbg_context_free: (a: number, b: number) => void;
|
|
5
5
|
export const context_default: () => number;
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
6
|
+
export const context_deid_header: (a: number, b: number, c: number) => [number, number, number, number];
|
|
7
|
+
export const context_deid_profile: (a: number, b: number, c: number) => [number, number, number];
|
|
8
|
+
export const context_get_deid_profile: (a: number) => number;
|
|
9
|
+
export const context_get_fw_meta: (a: number, b: any) => [number, number, number];
|
|
9
10
|
export const context_group_by_tags: (a: number, b: any) => [number, number, number];
|
|
10
|
-
export const
|
|
11
|
+
export const context_group_series: (a: number, b: any) => [number, number, number];
|
|
12
|
+
export const context_include_tags: (a: number, b: any) => [number, number, number];
|
|
13
|
+
export const context_is_dcm_filename: (a: number, b: number) => number;
|
|
11
14
|
export const context_mappings: (a: number, b: any) => [number, number, number];
|
|
12
|
-
export const
|
|
13
|
-
export const context_read_until_pixels: (a: number, b: any) => any;
|
|
15
|
+
export const context_max_size: (a: number, b: number) => number;
|
|
14
16
|
export const context_parse_header: (a: number, b: number, c: number) => [number, number, number];
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
17
|
+
export const context_read_until_pixels: (a: number, b: any) => any;
|
|
18
|
+
export const context_split_localizer: (a: number, b: number) => number;
|
|
19
|
+
export const context_stop_at_tags: (a: number, b: any) => [number, number, number];
|
|
18
20
|
export const context_new: () => number;
|
|
19
|
-
export const read_until_pixels: (a: any, b: any, c: number) => any;
|
|
20
21
|
export const create_dcm_as_bytes: (a: any) => [number, number, number, number];
|
|
21
|
-
export const
|
|
22
|
-
export const parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
22
|
+
export const read_until_pixels: (a: any, b: any, c: number) => any;
|
|
23
23
|
export const __wbg_deidprofile_free: (a: number, b: number) => void;
|
|
24
|
-
export const deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
25
|
-
export const deidprofile_deid_dcm: (a: number, b: number, c: number) => [number, number, number, number];
|
|
26
24
|
export const __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
|
|
25
|
+
export const deidprofile_deid_dcm: (a: number, b: number, c: number) => [number, number, number, number];
|
|
26
|
+
export const deidprofile_from_yaml: (a: number, b: number) => [number, number, number];
|
|
27
27
|
export const group_series: (a: any, b: any, c: number) => any;
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
28
|
+
export const get_fw_meta: (a: any, b: any) => [number, number, number];
|
|
29
|
+
export const parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
|
|
30
|
+
export const wasm_bindgen__convert__closures_____invoke__h2ba0c54d32b8d7ba: (a: number, b: number, c: any) => void;
|
|
31
|
+
export const wasm_bindgen__closure__destroy__hfc572f640437337e: (a: number, b: number) => void;
|
|
32
|
+
export const wasm_bindgen__convert__closures_____invoke__hb78066fcf1fecd31: (a: number, b: number, c: any, d: any) => void;
|
|
31
33
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
32
34
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
33
35
|
export const __wbindgen_exn_store: (a: number) => void;
|