@flywheel-io/fw-file-rs 0.3.1 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dcm/dcm.d.ts ADDED
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export function get_fw_meta(path_meta_pairs: any, arg1: any): any;
4
+ export function parse_header(bytes: Uint8Array, include_tags?: string[] | null): any;
5
+ export function read_until_pixels(file: File, stop_tags: any, _max_size?: number | null): Promise<Uint8Array>;
6
+ export function create_dcm_as_bytes(tags_js: any): Uint8Array;
7
+ export function group_series(path_meta_pairs: any, group_by_tags: any, split_localizer: boolean): any;
8
+ export class Context {
9
+ free(): void;
10
+ [Symbol.dispose](): void;
11
+ constructor();
12
+ static default(): Context;
13
+ stop_at_tags(tags: any): Context;
14
+ max_size(size: number): Context;
15
+ include_tags(tags: any): Context;
16
+ group_by_tags(tags: any): Context;
17
+ split_localizer(flag: boolean): Context;
18
+ mappings(mappings: any): Context;
19
+ deid_profile(yaml: string): Context;
20
+ /**
21
+ * Read file until pixel data using configured stop tags
22
+ */
23
+ read_until_pixels(file: File): Promise<Uint8Array>;
24
+ parse_header(bytes: Uint8Array): any;
25
+ group_series(path_header_pairs: any): any;
26
+ get_fw_meta(header: any): any;
27
+ deid_header(bytes: Uint8Array): Uint8Array;
28
+ }
29
+ export class DeidProfile {
30
+ private constructor();
31
+ free(): void;
32
+ [Symbol.dispose](): void;
33
+ static from_yaml(yaml: string): DeidProfile;
34
+ deid_dcm(dcm_bytes: Uint8Array): Uint8Array;
35
+ }
36
+ export class WasmDCMGroup {
37
+ private constructor();
38
+ free(): void;
39
+ [Symbol.dispose](): void;
40
+ }
41
+
42
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
43
+
44
+ export interface InitOutput {
45
+ readonly memory: WebAssembly.Memory;
46
+ readonly __wbg_context_free: (a: number, b: number) => void;
47
+ readonly context_default: () => number;
48
+ readonly context_stop_at_tags: (a: number, b: any) => [number, number, number];
49
+ readonly context_max_size: (a: number, b: number) => number;
50
+ readonly context_include_tags: (a: number, b: any) => [number, number, number];
51
+ readonly context_group_by_tags: (a: number, b: any) => [number, number, number];
52
+ readonly context_split_localizer: (a: number, b: number) => number;
53
+ readonly context_mappings: (a: number, b: any) => [number, number, number];
54
+ readonly context_deid_profile: (a: number, b: number, c: number) => [number, number, number];
55
+ readonly context_read_until_pixels: (a: number, b: any) => any;
56
+ readonly context_parse_header: (a: number, b: number, c: number) => [number, number, number];
57
+ readonly context_group_series: (a: number, b: any) => [number, number, number];
58
+ readonly context_get_fw_meta: (a: number, b: any) => [number, number, number];
59
+ readonly context_deid_header: (a: number, b: number, c: number) => [number, number, number, number];
60
+ readonly context_new: () => number;
61
+ readonly get_fw_meta: (a: any, b: any) => [number, number, number];
62
+ 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;
64
+ readonly create_dcm_as_bytes: (a: any) => [number, number, number, number];
65
+ 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
+ readonly __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
69
+ readonly group_series: (a: any, b: any, c: number) => any;
70
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
71
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
72
+ readonly __wbindgen_exn_store: (a: number) => void;
73
+ readonly __externref_table_alloc: () => number;
74
+ readonly __wbindgen_export_4: WebAssembly.Table;
75
+ readonly __wbindgen_export_5: WebAssembly.Table;
76
+ readonly __externref_table_dealloc: (a: number) => void;
77
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
78
+ readonly closure43_externref_shim: (a: number, b: number, c: any) => void;
79
+ readonly closure1173_externref_shim: (a: number, b: number, c: any, d: any) => void;
80
+ readonly __wbindgen_start: () => void;
81
+ }
82
+
83
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
84
+ /**
85
+ * Instantiates the given `module`, which can either be bytes or
86
+ * a precompiled `WebAssembly.Module`.
87
+ *
88
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
89
+ *
90
+ * @returns {InitOutput}
91
+ */
92
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
93
+
94
+ /**
95
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
96
+ * for everything else, calls `WebAssembly.instantiate` directly.
97
+ *
98
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
99
+ *
100
+ * @returns {Promise<InitOutput>}
101
+ */
102
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
package/dcm/dcm.js ADDED
@@ -0,0 +1,1007 @@
1
+ let wasm;
2
+
3
+ let cachedUint8ArrayMemory0 = null;
4
+
5
+ function getUint8ArrayMemory0() {
6
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
7
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
8
+ }
9
+ return cachedUint8ArrayMemory0;
10
+ }
11
+
12
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
13
+
14
+ cachedTextDecoder.decode();
15
+
16
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
17
+ let numBytesDecoded = 0;
18
+ function decodeText(ptr, len) {
19
+ numBytesDecoded += len;
20
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
21
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
22
+ cachedTextDecoder.decode();
23
+ numBytesDecoded = len;
24
+ }
25
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
26
+ }
27
+
28
+ function getStringFromWasm0(ptr, len) {
29
+ ptr = ptr >>> 0;
30
+ return decodeText(ptr, len);
31
+ }
32
+
33
+ let WASM_VECTOR_LEN = 0;
34
+
35
+ const cachedTextEncoder = new TextEncoder();
36
+
37
+ if (!('encodeInto' in cachedTextEncoder)) {
38
+ cachedTextEncoder.encodeInto = function (arg, view) {
39
+ const buf = cachedTextEncoder.encode(arg);
40
+ view.set(buf);
41
+ return {
42
+ read: arg.length,
43
+ written: buf.length
44
+ };
45
+ }
46
+ }
47
+
48
+ function passStringToWasm0(arg, malloc, realloc) {
49
+
50
+ if (realloc === undefined) {
51
+ const buf = cachedTextEncoder.encode(arg);
52
+ const ptr = malloc(buf.length, 1) >>> 0;
53
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
54
+ WASM_VECTOR_LEN = buf.length;
55
+ return ptr;
56
+ }
57
+
58
+ let len = arg.length;
59
+ let ptr = malloc(len, 1) >>> 0;
60
+
61
+ const mem = getUint8ArrayMemory0();
62
+
63
+ let offset = 0;
64
+
65
+ for (; offset < len; offset++) {
66
+ const code = arg.charCodeAt(offset);
67
+ if (code > 0x7F) break;
68
+ mem[ptr + offset] = code;
69
+ }
70
+
71
+ if (offset !== len) {
72
+ if (offset !== 0) {
73
+ arg = arg.slice(offset);
74
+ }
75
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
76
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
77
+ const ret = cachedTextEncoder.encodeInto(arg, view);
78
+
79
+ offset += ret.written;
80
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
81
+ }
82
+
83
+ WASM_VECTOR_LEN = offset;
84
+ return ptr;
85
+ }
86
+
87
+ let cachedDataViewMemory0 = null;
88
+
89
+ function getDataViewMemory0() {
90
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
91
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
92
+ }
93
+ return cachedDataViewMemory0;
94
+ }
95
+
96
+ function addToExternrefTable0(obj) {
97
+ const idx = wasm.__externref_table_alloc();
98
+ wasm.__wbindgen_export_4.set(idx, obj);
99
+ return idx;
100
+ }
101
+
102
+ function handleError(f, args) {
103
+ try {
104
+ return f.apply(this, args);
105
+ } catch (e) {
106
+ const idx = addToExternrefTable0(e);
107
+ wasm.__wbindgen_exn_store(idx);
108
+ }
109
+ }
110
+
111
+ function getArrayU8FromWasm0(ptr, len) {
112
+ ptr = ptr >>> 0;
113
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
114
+ }
115
+
116
+ function isLikeNone(x) {
117
+ return x === undefined || x === null;
118
+ }
119
+
120
+ function debugString(val) {
121
+ // primitive types
122
+ const type = typeof val;
123
+ if (type == 'number' || type == 'boolean' || val == null) {
124
+ return `${val}`;
125
+ }
126
+ if (type == 'string') {
127
+ return `"${val}"`;
128
+ }
129
+ if (type == 'symbol') {
130
+ const description = val.description;
131
+ if (description == null) {
132
+ return 'Symbol';
133
+ } else {
134
+ return `Symbol(${description})`;
135
+ }
136
+ }
137
+ if (type == 'function') {
138
+ const name = val.name;
139
+ if (typeof name == 'string' && name.length > 0) {
140
+ return `Function(${name})`;
141
+ } else {
142
+ return 'Function';
143
+ }
144
+ }
145
+ // objects
146
+ if (Array.isArray(val)) {
147
+ const length = val.length;
148
+ let debug = '[';
149
+ if (length > 0) {
150
+ debug += debugString(val[0]);
151
+ }
152
+ for(let i = 1; i < length; i++) {
153
+ debug += ', ' + debugString(val[i]);
154
+ }
155
+ debug += ']';
156
+ return debug;
157
+ }
158
+ // Test for built-in
159
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
160
+ let className;
161
+ if (builtInMatches && builtInMatches.length > 1) {
162
+ className = builtInMatches[1];
163
+ } else {
164
+ // Failed to match the standard '[object ClassName]'
165
+ return toString.call(val);
166
+ }
167
+ if (className == 'Object') {
168
+ // we're a user defined class or Object
169
+ // JSON.stringify avoids problems with cycles, and is generally much
170
+ // easier than looping through ownProperties of `val`.
171
+ try {
172
+ return 'Object(' + JSON.stringify(val) + ')';
173
+ } catch (_) {
174
+ return 'Object';
175
+ }
176
+ }
177
+ // errors
178
+ if (val instanceof Error) {
179
+ return `${val.name}: ${val.message}\n${val.stack}`;
180
+ }
181
+ // TODO we could test for more things here, like `Set`s and `Map`s.
182
+ return className;
183
+ }
184
+
185
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
186
+ ? { register: () => {}, unregister: () => {} }
187
+ : new FinalizationRegistry(
188
+ state => {
189
+ wasm.__wbindgen_export_5.get(state.dtor)(state.a, state.b);
190
+ }
191
+ );
192
+
193
+ function makeMutClosure(arg0, arg1, dtor, f) {
194
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
195
+ const real = (...args) => {
196
+
197
+ // First up with a closure we increment the internal reference
198
+ // count. This ensures that the Rust closure environment won't
199
+ // be deallocated while we're invoking it.
200
+ state.cnt++;
201
+ const a = state.a;
202
+ state.a = 0;
203
+ try {
204
+ return f(a, state.b, ...args);
205
+ } finally {
206
+ if (--state.cnt === 0) {
207
+ wasm.__wbindgen_export_5.get(state.dtor)(a, state.b);
208
+ CLOSURE_DTORS.unregister(state);
209
+ } else {
210
+ state.a = a;
211
+ }
212
+ }
213
+ };
214
+ real.original = state;
215
+ CLOSURE_DTORS.register(real, state, state);
216
+ return real;
217
+ }
218
+
219
+ function takeFromExternrefTable0(idx) {
220
+ const value = wasm.__wbindgen_export_4.get(idx);
221
+ wasm.__externref_table_dealloc(idx);
222
+ return value;
223
+ }
224
+
225
+ function passArray8ToWasm0(arg, malloc) {
226
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
227
+ getUint8ArrayMemory0().set(arg, ptr / 1);
228
+ WASM_VECTOR_LEN = arg.length;
229
+ return ptr;
230
+ }
231
+ /**
232
+ * @param {any} path_meta_pairs
233
+ * @param {any} arg1
234
+ * @returns {any}
235
+ */
236
+ export function get_fw_meta(path_meta_pairs, arg1) {
237
+ const ret = wasm.get_fw_meta(path_meta_pairs, arg1);
238
+ if (ret[2]) {
239
+ throw takeFromExternrefTable0(ret[1]);
240
+ }
241
+ return takeFromExternrefTable0(ret[0]);
242
+ }
243
+
244
+ function passArrayJsValueToWasm0(array, malloc) {
245
+ const ptr = malloc(array.length * 4, 4) >>> 0;
246
+ for (let i = 0; i < array.length; i++) {
247
+ const add = addToExternrefTable0(array[i]);
248
+ getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
249
+ }
250
+ WASM_VECTOR_LEN = array.length;
251
+ return ptr;
252
+ }
253
+ /**
254
+ * @param {Uint8Array} bytes
255
+ * @param {string[] | null} [include_tags]
256
+ * @returns {any}
257
+ */
258
+ export function parse_header(bytes, include_tags) {
259
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
260
+ const len0 = WASM_VECTOR_LEN;
261
+ var ptr1 = isLikeNone(include_tags) ? 0 : passArrayJsValueToWasm0(include_tags, wasm.__wbindgen_malloc);
262
+ var len1 = WASM_VECTOR_LEN;
263
+ const ret = wasm.parse_header(ptr0, len0, ptr1, len1);
264
+ if (ret[2]) {
265
+ throw takeFromExternrefTable0(ret[1]);
266
+ }
267
+ return takeFromExternrefTable0(ret[0]);
268
+ }
269
+
270
+ /**
271
+ * @param {File} file
272
+ * @param {any} stop_tags
273
+ * @param {number | null} [_max_size]
274
+ * @returns {Promise<Uint8Array>}
275
+ */
276
+ export function read_until_pixels(file, stop_tags, _max_size) {
277
+ const ret = wasm.read_until_pixels(file, stop_tags, isLikeNone(_max_size) ? 0x100000001 : (_max_size) >>> 0);
278
+ return ret;
279
+ }
280
+
281
+ /**
282
+ * @param {any} tags_js
283
+ * @returns {Uint8Array}
284
+ */
285
+ export function create_dcm_as_bytes(tags_js) {
286
+ const ret = wasm.create_dcm_as_bytes(tags_js);
287
+ if (ret[3]) {
288
+ throw takeFromExternrefTable0(ret[2]);
289
+ }
290
+ var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
291
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
292
+ return v1;
293
+ }
294
+
295
+ /**
296
+ * @param {any} path_meta_pairs
297
+ * @param {any} group_by_tags
298
+ * @param {boolean} split_localizer
299
+ * @returns {any}
300
+ */
301
+ export function group_series(path_meta_pairs, group_by_tags, split_localizer) {
302
+ const ret = wasm.group_series(path_meta_pairs, group_by_tags, split_localizer);
303
+ return ret;
304
+ }
305
+
306
+ function __wbg_adapter_14(arg0, arg1, arg2) {
307
+ wasm.closure43_externref_shim(arg0, arg1, arg2);
308
+ }
309
+
310
+ function __wbg_adapter_94(arg0, arg1, arg2, arg3) {
311
+ wasm.closure1173_externref_shim(arg0, arg1, arg2, arg3);
312
+ }
313
+
314
+ const ContextFinalization = (typeof FinalizationRegistry === 'undefined')
315
+ ? { register: () => {}, unregister: () => {} }
316
+ : new FinalizationRegistry(ptr => wasm.__wbg_context_free(ptr >>> 0, 1));
317
+
318
+ export class Context {
319
+
320
+ static __wrap(ptr) {
321
+ ptr = ptr >>> 0;
322
+ const obj = Object.create(Context.prototype);
323
+ obj.__wbg_ptr = ptr;
324
+ ContextFinalization.register(obj, obj.__wbg_ptr, obj);
325
+ return obj;
326
+ }
327
+
328
+ __destroy_into_raw() {
329
+ const ptr = this.__wbg_ptr;
330
+ this.__wbg_ptr = 0;
331
+ ContextFinalization.unregister(this);
332
+ return ptr;
333
+ }
334
+
335
+ free() {
336
+ const ptr = this.__destroy_into_raw();
337
+ wasm.__wbg_context_free(ptr, 0);
338
+ }
339
+ constructor() {
340
+ const ret = wasm.context_default();
341
+ this.__wbg_ptr = ret >>> 0;
342
+ ContextFinalization.register(this, this.__wbg_ptr, this);
343
+ return this;
344
+ }
345
+ /**
346
+ * @returns {Context}
347
+ */
348
+ static default() {
349
+ const ret = wasm.context_default();
350
+ return Context.__wrap(ret);
351
+ }
352
+ /**
353
+ * @param {any} tags
354
+ * @returns {Context}
355
+ */
356
+ stop_at_tags(tags) {
357
+ const ptr = this.__destroy_into_raw();
358
+ const ret = wasm.context_stop_at_tags(ptr, tags);
359
+ if (ret[2]) {
360
+ throw takeFromExternrefTable0(ret[1]);
361
+ }
362
+ return Context.__wrap(ret[0]);
363
+ }
364
+ /**
365
+ * @param {number} size
366
+ * @returns {Context}
367
+ */
368
+ max_size(size) {
369
+ const ptr = this.__destroy_into_raw();
370
+ const ret = wasm.context_max_size(ptr, size);
371
+ return Context.__wrap(ret);
372
+ }
373
+ /**
374
+ * @param {any} tags
375
+ * @returns {Context}
376
+ */
377
+ include_tags(tags) {
378
+ const ptr = this.__destroy_into_raw();
379
+ const ret = wasm.context_include_tags(ptr, tags);
380
+ if (ret[2]) {
381
+ throw takeFromExternrefTable0(ret[1]);
382
+ }
383
+ return Context.__wrap(ret[0]);
384
+ }
385
+ /**
386
+ * @param {any} tags
387
+ * @returns {Context}
388
+ */
389
+ group_by_tags(tags) {
390
+ const ptr = this.__destroy_into_raw();
391
+ const ret = wasm.context_group_by_tags(ptr, tags);
392
+ if (ret[2]) {
393
+ throw takeFromExternrefTable0(ret[1]);
394
+ }
395
+ return Context.__wrap(ret[0]);
396
+ }
397
+ /**
398
+ * @param {boolean} flag
399
+ * @returns {Context}
400
+ */
401
+ split_localizer(flag) {
402
+ const ptr = this.__destroy_into_raw();
403
+ const ret = wasm.context_split_localizer(ptr, flag);
404
+ return Context.__wrap(ret);
405
+ }
406
+ /**
407
+ * @param {any} mappings
408
+ * @returns {Context}
409
+ */
410
+ mappings(mappings) {
411
+ const ptr = this.__destroy_into_raw();
412
+ const ret = wasm.context_mappings(ptr, mappings);
413
+ if (ret[2]) {
414
+ throw takeFromExternrefTable0(ret[1]);
415
+ }
416
+ return Context.__wrap(ret[0]);
417
+ }
418
+ /**
419
+ * @param {string} yaml
420
+ * @returns {Context}
421
+ */
422
+ deid_profile(yaml) {
423
+ const ptr = this.__destroy_into_raw();
424
+ const ptr0 = passStringToWasm0(yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
425
+ const len0 = WASM_VECTOR_LEN;
426
+ const ret = wasm.context_deid_profile(ptr, ptr0, len0);
427
+ if (ret[2]) {
428
+ throw takeFromExternrefTable0(ret[1]);
429
+ }
430
+ return Context.__wrap(ret[0]);
431
+ }
432
+ /**
433
+ * Read file until pixel data using configured stop tags
434
+ * @param {File} file
435
+ * @returns {Promise<Uint8Array>}
436
+ */
437
+ read_until_pixels(file) {
438
+ const ret = wasm.context_read_until_pixels(this.__wbg_ptr, file);
439
+ return ret;
440
+ }
441
+ /**
442
+ * @param {Uint8Array} bytes
443
+ * @returns {any}
444
+ */
445
+ parse_header(bytes) {
446
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
447
+ const len0 = WASM_VECTOR_LEN;
448
+ const ret = wasm.context_parse_header(this.__wbg_ptr, ptr0, len0);
449
+ if (ret[2]) {
450
+ throw takeFromExternrefTable0(ret[1]);
451
+ }
452
+ return takeFromExternrefTable0(ret[0]);
453
+ }
454
+ /**
455
+ * @param {any} path_header_pairs
456
+ * @returns {any}
457
+ */
458
+ group_series(path_header_pairs) {
459
+ const ret = wasm.context_group_series(this.__wbg_ptr, path_header_pairs);
460
+ if (ret[2]) {
461
+ throw takeFromExternrefTable0(ret[1]);
462
+ }
463
+ return takeFromExternrefTable0(ret[0]);
464
+ }
465
+ /**
466
+ * @param {any} header
467
+ * @returns {any}
468
+ */
469
+ get_fw_meta(header) {
470
+ const ret = wasm.context_get_fw_meta(this.__wbg_ptr, header);
471
+ if (ret[2]) {
472
+ throw takeFromExternrefTable0(ret[1]);
473
+ }
474
+ return takeFromExternrefTable0(ret[0]);
475
+ }
476
+ /**
477
+ * @param {Uint8Array} bytes
478
+ * @returns {Uint8Array}
479
+ */
480
+ deid_header(bytes) {
481
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
482
+ const len0 = WASM_VECTOR_LEN;
483
+ const ret = wasm.context_deid_header(this.__wbg_ptr, ptr0, len0);
484
+ if (ret[3]) {
485
+ throw takeFromExternrefTable0(ret[2]);
486
+ }
487
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
488
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
489
+ return v2;
490
+ }
491
+ }
492
+ if (Symbol.dispose) Context.prototype[Symbol.dispose] = Context.prototype.free;
493
+
494
+ const DeidProfileFinalization = (typeof FinalizationRegistry === 'undefined')
495
+ ? { register: () => {}, unregister: () => {} }
496
+ : new FinalizationRegistry(ptr => wasm.__wbg_deidprofile_free(ptr >>> 0, 1));
497
+
498
+ export class DeidProfile {
499
+
500
+ static __wrap(ptr) {
501
+ ptr = ptr >>> 0;
502
+ const obj = Object.create(DeidProfile.prototype);
503
+ obj.__wbg_ptr = ptr;
504
+ DeidProfileFinalization.register(obj, obj.__wbg_ptr, obj);
505
+ return obj;
506
+ }
507
+
508
+ __destroy_into_raw() {
509
+ const ptr = this.__wbg_ptr;
510
+ this.__wbg_ptr = 0;
511
+ DeidProfileFinalization.unregister(this);
512
+ return ptr;
513
+ }
514
+
515
+ free() {
516
+ const ptr = this.__destroy_into_raw();
517
+ wasm.__wbg_deidprofile_free(ptr, 0);
518
+ }
519
+ /**
520
+ * @param {string} yaml
521
+ * @returns {DeidProfile}
522
+ */
523
+ static from_yaml(yaml) {
524
+ const ptr0 = passStringToWasm0(yaml, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
525
+ const len0 = WASM_VECTOR_LEN;
526
+ const ret = wasm.deidprofile_from_yaml(ptr0, len0);
527
+ if (ret[2]) {
528
+ throw takeFromExternrefTable0(ret[1]);
529
+ }
530
+ return DeidProfile.__wrap(ret[0]);
531
+ }
532
+ /**
533
+ * @param {Uint8Array} dcm_bytes
534
+ * @returns {Uint8Array}
535
+ */
536
+ deid_dcm(dcm_bytes) {
537
+ const ptr0 = passArray8ToWasm0(dcm_bytes, wasm.__wbindgen_malloc);
538
+ const len0 = WASM_VECTOR_LEN;
539
+ const ret = wasm.deidprofile_deid_dcm(this.__wbg_ptr, ptr0, len0);
540
+ if (ret[3]) {
541
+ throw takeFromExternrefTable0(ret[2]);
542
+ }
543
+ var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
544
+ wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
545
+ return v2;
546
+ }
547
+ }
548
+ if (Symbol.dispose) DeidProfile.prototype[Symbol.dispose] = DeidProfile.prototype.free;
549
+
550
+ const WasmDCMGroupFinalization = (typeof FinalizationRegistry === 'undefined')
551
+ ? { register: () => {}, unregister: () => {} }
552
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmdcmgroup_free(ptr >>> 0, 1));
553
+
554
+ export class WasmDCMGroup {
555
+
556
+ __destroy_into_raw() {
557
+ const ptr = this.__wbg_ptr;
558
+ this.__wbg_ptr = 0;
559
+ WasmDCMGroupFinalization.unregister(this);
560
+ return ptr;
561
+ }
562
+
563
+ free() {
564
+ const ptr = this.__destroy_into_raw();
565
+ wasm.__wbg_wasmdcmgroup_free(ptr, 0);
566
+ }
567
+ }
568
+ if (Symbol.dispose) WasmDCMGroup.prototype[Symbol.dispose] = WasmDCMGroup.prototype.free;
569
+
570
+ const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
571
+
572
+ async function __wbg_load(module, imports) {
573
+ if (typeof Response === 'function' && module instanceof Response) {
574
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
575
+ try {
576
+ return await WebAssembly.instantiateStreaming(module, imports);
577
+
578
+ } catch (e) {
579
+ const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
580
+
581
+ if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
582
+ 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);
583
+
584
+ } else {
585
+ throw e;
586
+ }
587
+ }
588
+ }
589
+
590
+ const bytes = await module.arrayBuffer();
591
+ return await WebAssembly.instantiate(bytes, imports);
592
+
593
+ } else {
594
+ const instance = await WebAssembly.instantiate(module, imports);
595
+
596
+ if (instance instanceof WebAssembly.Instance) {
597
+ return { instance, module };
598
+
599
+ } else {
600
+ return instance;
601
+ }
602
+ }
603
+ }
604
+
605
+ function __wbg_get_imports() {
606
+ const imports = {};
607
+ imports.wbg = {};
608
+ imports.wbg.__wbg_Error_e17e777aac105295 = function(arg0, arg1) {
609
+ const ret = Error(getStringFromWasm0(arg0, arg1));
610
+ return ret;
611
+ };
612
+ imports.wbg.__wbg_Number_998bea33bd87c3e0 = function(arg0) {
613
+ const ret = Number(arg0);
614
+ return ret;
615
+ };
616
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
617
+ const ret = String(arg1);
618
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
619
+ const len1 = WASM_VECTOR_LEN;
620
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
621
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
622
+ };
623
+ imports.wbg.__wbg_arrayBuffer_2c907ed8e8ef4e35 = function(arg0) {
624
+ const ret = arg0.arrayBuffer();
625
+ return ret;
626
+ };
627
+ imports.wbg.__wbg_call_13410aac570ffff7 = function() { return handleError(function (arg0, arg1) {
628
+ const ret = arg0.call(arg1);
629
+ return ret;
630
+ }, arguments) };
631
+ imports.wbg.__wbg_call_a5400b25a865cfd8 = function() { return handleError(function (arg0, arg1, arg2) {
632
+ const ret = arg0.call(arg1, arg2);
633
+ return ret;
634
+ }, arguments) };
635
+ imports.wbg.__wbg_done_75ed0ee6dd243d9d = function(arg0) {
636
+ const ret = arg0.done;
637
+ return ret;
638
+ };
639
+ imports.wbg.__wbg_entries_2be2f15bd5554996 = function(arg0) {
640
+ const ret = Object.entries(arg0);
641
+ return ret;
642
+ };
643
+ imports.wbg.__wbg_getRandomValues_3c9c0d586e575a16 = function() { return handleError(function (arg0, arg1) {
644
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
645
+ }, arguments) };
646
+ imports.wbg.__wbg_get_0da715ceaecea5c8 = function(arg0, arg1) {
647
+ const ret = arg0[arg1 >>> 0];
648
+ return ret;
649
+ };
650
+ imports.wbg.__wbg_get_458e874b43b18b25 = function() { return handleError(function (arg0, arg1) {
651
+ const ret = Reflect.get(arg0, arg1);
652
+ return ret;
653
+ }, arguments) };
654
+ imports.wbg.__wbg_instanceof_ArrayBuffer_67f3012529f6a2dd = function(arg0) {
655
+ let result;
656
+ try {
657
+ result = arg0 instanceof ArrayBuffer;
658
+ } catch (_) {
659
+ result = false;
660
+ }
661
+ const ret = result;
662
+ return ret;
663
+ };
664
+ imports.wbg.__wbg_instanceof_Map_ebb01a5b6b5ffd0b = function(arg0) {
665
+ let result;
666
+ try {
667
+ result = arg0 instanceof Map;
668
+ } catch (_) {
669
+ result = false;
670
+ }
671
+ const ret = result;
672
+ return ret;
673
+ };
674
+ imports.wbg.__wbg_instanceof_Uint8Array_9a8378d955933db7 = function(arg0) {
675
+ let result;
676
+ try {
677
+ result = arg0 instanceof Uint8Array;
678
+ } catch (_) {
679
+ result = false;
680
+ }
681
+ const ret = result;
682
+ return ret;
683
+ };
684
+ imports.wbg.__wbg_isArray_030cce220591fb41 = function(arg0) {
685
+ const ret = Array.isArray(arg0);
686
+ return ret;
687
+ };
688
+ imports.wbg.__wbg_isSafeInteger_1c0d1af5542e102a = function(arg0) {
689
+ const ret = Number.isSafeInteger(arg0);
690
+ return ret;
691
+ };
692
+ imports.wbg.__wbg_iterator_f370b34483c71a1c = function() {
693
+ const ret = Symbol.iterator;
694
+ return ret;
695
+ };
696
+ imports.wbg.__wbg_length_186546c51cd61acd = function(arg0) {
697
+ const ret = arg0.length;
698
+ return ret;
699
+ };
700
+ imports.wbg.__wbg_length_6bb7e81f9d7713e4 = function(arg0) {
701
+ const ret = arg0.length;
702
+ return ret;
703
+ };
704
+ imports.wbg.__wbg_new_19c25a3f2fa63a02 = function() {
705
+ const ret = new Object();
706
+ return ret;
707
+ };
708
+ imports.wbg.__wbg_new_1f3a344cf3123716 = function() {
709
+ const ret = new Array();
710
+ return ret;
711
+ };
712
+ imports.wbg.__wbg_new_2e3c58a15f39f5f9 = function(arg0, arg1) {
713
+ try {
714
+ var state0 = {a: arg0, b: arg1};
715
+ var cb0 = (arg0, arg1) => {
716
+ const a = state0.a;
717
+ state0.a = 0;
718
+ try {
719
+ return __wbg_adapter_94(a, state0.b, arg0, arg1);
720
+ } finally {
721
+ state0.a = a;
722
+ }
723
+ };
724
+ const ret = new Promise(cb0);
725
+ return ret;
726
+ } finally {
727
+ state0.a = state0.b = 0;
728
+ }
729
+ };
730
+ imports.wbg.__wbg_new_2ff1f68f3676ea53 = function() {
731
+ const ret = new Map();
732
+ return ret;
733
+ };
734
+ imports.wbg.__wbg_new_638ebfaedbf32a5e = function(arg0) {
735
+ const ret = new Uint8Array(arg0);
736
+ return ret;
737
+ };
738
+ imports.wbg.__wbg_newfromslice_074c56947bd43469 = function(arg0, arg1) {
739
+ const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
740
+ return ret;
741
+ };
742
+ imports.wbg.__wbg_newnoargs_254190557c45b4ec = function(arg0, arg1) {
743
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
744
+ return ret;
745
+ };
746
+ imports.wbg.__wbg_newwithlength_a167dcc7aaa3ba77 = function(arg0) {
747
+ const ret = new Uint8Array(arg0 >>> 0);
748
+ return ret;
749
+ };
750
+ imports.wbg.__wbg_next_5b3530e612fde77d = function(arg0) {
751
+ const ret = arg0.next;
752
+ return ret;
753
+ };
754
+ imports.wbg.__wbg_next_692e82279131b03c = function() { return handleError(function (arg0) {
755
+ const ret = arg0.next();
756
+ return ret;
757
+ }, arguments) };
758
+ imports.wbg.__wbg_prototypesetcall_3d4a26c1ed734349 = function(arg0, arg1, arg2) {
759
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
760
+ };
761
+ imports.wbg.__wbg_queueMicrotask_25d0739ac89e8c88 = function(arg0) {
762
+ queueMicrotask(arg0);
763
+ };
764
+ imports.wbg.__wbg_queueMicrotask_4488407636f5bf24 = function(arg0) {
765
+ const ret = arg0.queueMicrotask;
766
+ return ret;
767
+ };
768
+ imports.wbg.__wbg_resolve_4055c623acdd6a1b = function(arg0) {
769
+ const ret = Promise.resolve(arg0);
770
+ return ret;
771
+ };
772
+ imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
773
+ arg0[arg1] = arg2;
774
+ };
775
+ imports.wbg.__wbg_set_90f6c0f7bd8c0415 = function(arg0, arg1, arg2) {
776
+ arg0[arg1 >>> 0] = arg2;
777
+ };
778
+ imports.wbg.__wbg_set_b7f1cf4fae26fe2a = function(arg0, arg1, arg2) {
779
+ const ret = arg0.set(arg1, arg2);
780
+ return ret;
781
+ };
782
+ imports.wbg.__wbg_size_8f84e7768fba0589 = function(arg0) {
783
+ const ret = arg0.size;
784
+ return ret;
785
+ };
786
+ imports.wbg.__wbg_slice_36c55c8c1a260c46 = function() { return handleError(function (arg0, arg1, arg2) {
787
+ const ret = arg0.slice(arg1, arg2);
788
+ return ret;
789
+ }, arguments) };
790
+ imports.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12 = function() {
791
+ const ret = typeof global === 'undefined' ? null : global;
792
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
793
+ };
794
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184 = function() {
795
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
796
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
797
+ };
798
+ imports.wbg.__wbg_static_accessor_SELF_995b214ae681ff99 = function() {
799
+ const ret = typeof self === 'undefined' ? null : self;
800
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
801
+ };
802
+ imports.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea = function() {
803
+ const ret = typeof window === 'undefined' ? null : window;
804
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
805
+ };
806
+ imports.wbg.__wbg_then_b33a773d723afa3e = function(arg0, arg1, arg2) {
807
+ const ret = arg0.then(arg1, arg2);
808
+ return ret;
809
+ };
810
+ imports.wbg.__wbg_then_e22500defe16819f = function(arg0, arg1) {
811
+ const ret = arg0.then(arg1);
812
+ return ret;
813
+ };
814
+ imports.wbg.__wbg_value_dd9372230531eade = function(arg0) {
815
+ const ret = arg0.value;
816
+ return ret;
817
+ };
818
+ imports.wbg.__wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1 = function(arg0, arg1) {
819
+ const v = arg1;
820
+ const ret = typeof(v) === 'bigint' ? v : undefined;
821
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
822
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
823
+ };
824
+ imports.wbg.__wbg_wbindgenbooleanget_3fe6f642c7d97746 = function(arg0) {
825
+ const v = arg0;
826
+ const ret = typeof(v) === 'boolean' ? v : undefined;
827
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
828
+ };
829
+ imports.wbg.__wbg_wbindgencbdrop_eb10308566512b88 = function(arg0) {
830
+ const obj = arg0.original;
831
+ if (obj.cnt-- == 1) {
832
+ obj.a = 0;
833
+ return true;
834
+ }
835
+ const ret = false;
836
+ return ret;
837
+ };
838
+ imports.wbg.__wbg_wbindgendebugstring_99ef257a3ddda34d = function(arg0, arg1) {
839
+ const ret = debugString(arg1);
840
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
841
+ const len1 = WASM_VECTOR_LEN;
842
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
843
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
844
+ };
845
+ imports.wbg.__wbg_wbindgenin_d7a1ee10933d2d55 = function(arg0, arg1) {
846
+ const ret = arg0 in arg1;
847
+ return ret;
848
+ };
849
+ imports.wbg.__wbg_wbindgenisbigint_ecb90cc08a5a9154 = function(arg0) {
850
+ const ret = typeof(arg0) === 'bigint';
851
+ return ret;
852
+ };
853
+ imports.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74 = function(arg0) {
854
+ const ret = typeof(arg0) === 'function';
855
+ return ret;
856
+ };
857
+ imports.wbg.__wbg_wbindgenisnull_f3037694abe4d97a = function(arg0) {
858
+ const ret = arg0 === null;
859
+ return ret;
860
+ };
861
+ imports.wbg.__wbg_wbindgenisobject_307a53c6bd97fbf8 = function(arg0) {
862
+ const val = arg0;
863
+ const ret = typeof(val) === 'object' && val !== null;
864
+ return ret;
865
+ };
866
+ imports.wbg.__wbg_wbindgenisstring_d4fa939789f003b0 = function(arg0) {
867
+ const ret = typeof(arg0) === 'string';
868
+ return ret;
869
+ };
870
+ imports.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5 = function(arg0) {
871
+ const ret = arg0 === undefined;
872
+ return ret;
873
+ };
874
+ imports.wbg.__wbg_wbindgenjsvaleq_e6f2ad59ccae1b58 = function(arg0, arg1) {
875
+ const ret = arg0 === arg1;
876
+ return ret;
877
+ };
878
+ imports.wbg.__wbg_wbindgenjsvallooseeq_9bec8c9be826bed1 = function(arg0, arg1) {
879
+ const ret = arg0 == arg1;
880
+ return ret;
881
+ };
882
+ imports.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb = function(arg0, arg1) {
883
+ const obj = arg1;
884
+ const ret = typeof(obj) === 'number' ? obj : undefined;
885
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
886
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
887
+ };
888
+ imports.wbg.__wbg_wbindgenstringget_0f16a6ddddef376f = function(arg0, arg1) {
889
+ const obj = arg1;
890
+ const ret = typeof(obj) === 'string' ? obj : undefined;
891
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
892
+ var len1 = WASM_VECTOR_LEN;
893
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
894
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
895
+ };
896
+ imports.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6 = function(arg0, arg1) {
897
+ throw new Error(getStringFromWasm0(arg0, arg1));
898
+ };
899
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
900
+ // Cast intrinsic for `Ref(String) -> Externref`.
901
+ const ret = getStringFromWasm0(arg0, arg1);
902
+ return ret;
903
+ };
904
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
905
+ // Cast intrinsic for `U64 -> Externref`.
906
+ const ret = BigInt.asUintN(64, arg0);
907
+ return ret;
908
+ };
909
+ imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
910
+ // Cast intrinsic for `I64 -> Externref`.
911
+ const ret = arg0;
912
+ return ret;
913
+ };
914
+ imports.wbg.__wbindgen_cast_d2d0cc24b1b6ed59 = function(arg0, arg1) {
915
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 42, function: Function { arguments: [Externref], shim_idx: 43, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
916
+ const ret = makeMutClosure(arg0, arg1, 42, __wbg_adapter_14);
917
+ return ret;
918
+ };
919
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
920
+ // Cast intrinsic for `F64 -> Externref`.
921
+ const ret = arg0;
922
+ return ret;
923
+ };
924
+ imports.wbg.__wbindgen_init_externref_table = function() {
925
+ const table = wasm.__wbindgen_export_4;
926
+ const offset = table.grow(4);
927
+ table.set(0, undefined);
928
+ table.set(offset + 0, undefined);
929
+ table.set(offset + 1, null);
930
+ table.set(offset + 2, true);
931
+ table.set(offset + 3, false);
932
+ ;
933
+ };
934
+
935
+ return imports;
936
+ }
937
+
938
+ function __wbg_init_memory(imports, memory) {
939
+
940
+ }
941
+
942
+ function __wbg_finalize_init(instance, module) {
943
+ wasm = instance.exports;
944
+ __wbg_init.__wbindgen_wasm_module = module;
945
+ cachedDataViewMemory0 = null;
946
+ cachedUint8ArrayMemory0 = null;
947
+
948
+
949
+ wasm.__wbindgen_start();
950
+ return wasm;
951
+ }
952
+
953
+ function initSync(module) {
954
+ if (wasm !== undefined) return wasm;
955
+
956
+
957
+ if (typeof module !== 'undefined') {
958
+ if (Object.getPrototypeOf(module) === Object.prototype) {
959
+ ({module} = module)
960
+ } else {
961
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
962
+ }
963
+ }
964
+
965
+ const imports = __wbg_get_imports();
966
+
967
+ __wbg_init_memory(imports);
968
+
969
+ if (!(module instanceof WebAssembly.Module)) {
970
+ module = new WebAssembly.Module(module);
971
+ }
972
+
973
+ const instance = new WebAssembly.Instance(module, imports);
974
+
975
+ return __wbg_finalize_init(instance, module);
976
+ }
977
+
978
+ async function __wbg_init(module_or_path) {
979
+ if (wasm !== undefined) return wasm;
980
+
981
+
982
+ if (typeof module_or_path !== 'undefined') {
983
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
984
+ ({module_or_path} = module_or_path)
985
+ } else {
986
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
987
+ }
988
+ }
989
+
990
+ if (typeof module_or_path === 'undefined') {
991
+ module_or_path = new URL('dcm_js_bg.wasm', import.meta.url);
992
+ }
993
+ const imports = __wbg_get_imports();
994
+
995
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
996
+ module_or_path = fetch(module_or_path);
997
+ }
998
+
999
+ __wbg_init_memory(imports);
1000
+
1001
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
1002
+
1003
+ return __wbg_finalize_init(instance, module);
1004
+ }
1005
+
1006
+ export { initSync };
1007
+ export default __wbg_init;
Binary file
@@ -0,0 +1,38 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const __wbg_context_free: (a: number, b: number) => void;
5
+ export const context_default: () => number;
6
+ export const context_stop_at_tags: (a: number, b: any) => [number, number, number];
7
+ export const context_max_size: (a: number, b: number) => number;
8
+ export const context_include_tags: (a: number, b: any) => [number, number, number];
9
+ export const context_group_by_tags: (a: number, b: any) => [number, number, number];
10
+ export const context_split_localizer: (a: number, b: number) => number;
11
+ export const context_mappings: (a: number, b: any) => [number, number, number];
12
+ export const context_deid_profile: (a: number, b: number, c: number) => [number, number, number];
13
+ export const context_read_until_pixels: (a: number, b: any) => any;
14
+ export const context_parse_header: (a: number, b: number, c: number) => [number, number, number];
15
+ export const context_group_series: (a: number, b: any) => [number, number, number];
16
+ export const context_get_fw_meta: (a: number, b: any) => [number, number, number];
17
+ export const context_deid_header: (a: number, b: number, c: number) => [number, number, number, number];
18
+ export const context_new: () => number;
19
+ export const get_fw_meta: (a: any, b: any) => [number, number, number];
20
+ export const parse_header: (a: number, b: number, c: number, d: number) => [number, number, number];
21
+ export const read_until_pixels: (a: any, b: any, c: number) => any;
22
+ export const create_dcm_as_bytes: (a: any) => [number, number, number, number];
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
+ export const __wbg_wasmdcmgroup_free: (a: number, b: number) => void;
27
+ export const group_series: (a: any, b: any, c: number) => any;
28
+ export const __wbindgen_malloc: (a: number, b: number) => number;
29
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
30
+ export const __wbindgen_exn_store: (a: number) => void;
31
+ export const __externref_table_alloc: () => number;
32
+ export const __wbindgen_export_4: WebAssembly.Table;
33
+ export const __wbindgen_export_5: WebAssembly.Table;
34
+ export const __externref_table_dealloc: (a: number) => void;
35
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
36
+ export const closure43_externref_shim: (a: number, b: number, c: any) => void;
37
+ export const closure1173_externref_shim: (a: number, b: number, c: any, d: any) => void;
38
+ export const __wbindgen_start: () => void;
package/dcm/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./dcm.js";
2
+ export { default } from "./dcm.js";
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Flywheel <support@flywheel.io>"
6
6
  ],
7
7
  "description": "JavaScript/WebAssembly bindings for fw-file rust crate",
8
- "version": "0.3.1",
8
+ "version": "0.3.2",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",