@ubercode/dcmtk 0.11.1 → 0.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dicom.cjs +6 -1
- package/dist/dicom.cjs.map +1 -1
- package/dist/dicom.js +6 -1
- package/dist/dicom.js.map +1 -1
- package/dist/{index--dDQfutR.d.ts → index-B5FQoIqM.d.ts} +47 -5
- package/dist/{index-CVDMaxd8.d.cts → index-DV8HaHEX.d.cts} +47 -5
- package/dist/index.cjs +97 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +97 -15
- package/dist/index.js.map +1 -1
- package/dist/servers.cjs +97 -15
- package/dist/servers.cjs.map +1 -1
- package/dist/servers.d.cts +1 -1
- package/dist/servers.d.ts +1 -1
- package/dist/servers.js +97 -15
- package/dist/servers.js.map +1 -1
- package/dist/tools.cjs +6 -1
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.js +6 -1
- package/dist/tools.js.map +1 -1
- package/package.json +1 -1
package/dist/servers.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AssociationAcknowledgedData, a as AssociationCompleteData, b as AssociationContext, c as AssociationReceivedData, d as AssociationSummary, e as AssociationTracker, C as CStoreRequestData, f as CannotStartListenerData, g as ConfigErrorData, D as DCMPRSCP_FATAL_EVENTS, h as DCMPRSCP_PATTERNS, i as DCMPSRCV_FATAL_EVENTS, j as DCMPSRCV_PATTERNS, k as DCMQRSCP_FATAL_EVENTS, l as DCMQRSCP_PATTERNS, m as DCMRECV_FATAL_EVENTS, n as DCMRECV_PATTERNS, o as DatabaseReadyData, p as DcmQRSCP, q as DcmQRSCPEventMap, r as DcmQRSCPOptions, s as DcmprsCP, t as DcmprsCPEventMap, u as DcmprsCPOptions, v as DcmprscpEvent, w as DcmprscpEventValue, x as Dcmpsrcv, y as DcmpsrcvEvent, z as DcmpsrcvEventMap, B as DcmpsrcvEventValue, E as DcmpsrcvOptions, F as DcmqrscpEvent, G as DcmqrscpEventValue, H as Dcmrecv, I as DcmrecvEvent, J as DcmrecvEventMap, K as DcmrecvEventValue, L as DcmrecvOptions, M as DcmtkProcess, N as DcmtkProcessConfig, O as DcmtkProcessEventMap, P as DicomReceiver, Q as DicomReceiverEventMap, R as DicomReceiverOptions, S as EventPattern, T as FileDeletedData, U as FileReceivedData, V as FilenameMode, W as FilenameModeValue, X as LineParser, Y as LineParserEventMap, Z as MultiLineConfig, a2 as PoolStatus, a3 as PreferredTransferSyntax, a4 as PreferredTransferSyntaxValue, a5 as PrintAssociationAcknowledgedData, a6 as PrintAssociationReceivedData, a7 as PrintCannotStartListenerData, a8 as ProcessState, a9 as ProcessStateValue, aa as QRAssociationAcknowledgedData, ab as QRAssociationReceivedData, ac as QRCFindRequestData, ad as QRCGetRequestData, ae as QRCMoveRequestData, af as QRCStoreRequestData, ag as QRCannotStartListenerData, ah as QRListeningData, ai as ReceiverAssociationAcknowledgedData, aj as ReceiverAssociationData, ak as
|
|
1
|
+
export { A as AssociationAcknowledgedData, a as AssociationCompleteData, b as AssociationContext, c as AssociationReceivedData, d as AssociationSummary, e as AssociationTracker, C as CStoreRequestData, f as CannotStartListenerData, g as ConfigErrorData, D as DCMPRSCP_FATAL_EVENTS, h as DCMPRSCP_PATTERNS, i as DCMPSRCV_FATAL_EVENTS, j as DCMPSRCV_PATTERNS, k as DCMQRSCP_FATAL_EVENTS, l as DCMQRSCP_PATTERNS, m as DCMRECV_FATAL_EVENTS, n as DCMRECV_PATTERNS, o as DatabaseReadyData, p as DcmQRSCP, q as DcmQRSCPEventMap, r as DcmQRSCPOptions, s as DcmprsCP, t as DcmprsCPEventMap, u as DcmprsCPOptions, v as DcmprscpEvent, w as DcmprscpEventValue, x as Dcmpsrcv, y as DcmpsrcvEvent, z as DcmpsrcvEventMap, B as DcmpsrcvEventValue, E as DcmpsrcvOptions, F as DcmqrscpEvent, G as DcmqrscpEventValue, H as Dcmrecv, I as DcmrecvEvent, J as DcmrecvEventMap, K as DcmrecvEventValue, L as DcmrecvOptions, M as DcmtkProcess, N as DcmtkProcessConfig, O as DcmtkProcessEventMap, P as DicomReceiver, Q as DicomReceiverEventMap, R as DicomReceiverOptions, S as EventPattern, T as FileDeletedData, U as FileReceivedData, V as FilenameMode, W as FilenameModeValue, X as LineParser, Y as LineParserEventMap, Z as MultiLineConfig, a2 as PoolStatus, a3 as PreferredTransferSyntax, a4 as PreferredTransferSyntaxValue, a5 as PrintAssociationAcknowledgedData, a6 as PrintAssociationReceivedData, a7 as PrintCannotStartListenerData, a8 as ProcessState, a9 as ProcessStateValue, aa as QRAssociationAcknowledgedData, ab as QRAssociationReceivedData, ac as QRCFindRequestData, ad as QRCGetRequestData, ae as QRCMoveRequestData, af as QRCStoreRequestData, ag as QRCannotStartListenerData, ah as QRListeningData, ai as ReceiverAssociationAcknowledgedData, aj as ReceiverAssociationData, ak as ReceiverAssociationFinalizedData, al as ReceiverAssociationReceivedData, am as ReceiverCStoreRequestData, an as ReceiverCannotStartListenerData, ao as ReceiverConfigErrorData, ap as ReceiverDatabaseReadyData, aq as ReceiverEchoRequestData, ar as ReceiverErrorData, as as ReceiverFileData, at as ReceiverFileReceivedData, au as ReceiverFileStoredData, av as ReceiverInstanceData, aw as ReceiverInstanceErrorData, ax as ReceiverListeningData, ay as RefusingAssociationData, az as STORESCP_FATAL_EVENTS, aA as STORESCP_PATTERNS, aB as StorageMode, aC as StorageModeValue, aD as StoreSCP, aE as StoreSCPEventMap, aF as StoreSCPOptions, aG as StoreSCPPreset, aH as StoreSCPPresetName, aI as StoredFileData, aJ as StorescpEvent, aK as StorescpEventValue, aL as StoringFileData, aM as SubdirectoryCreatedData, aN as SubdirectoryMode, aO as SubdirectoryModeValue, aP as TrackedFile, aQ as WLMSCPFS_FATAL_EVENTS, aR as WLMSCPFS_PATTERNS, aS as WlmAssociationAcknowledgedData, aT as WlmAssociationReceivedData, aU as WlmCFindRequestData, aV as WlmCannotStartListenerData, aW as WlmListeningData, aX as Wlmscpfs, aY as WlmscpfsEvent, aZ as WlmscpfsEventMap, a_ as WlmscpfsEventValue, a$ as WlmscpfsOptions } from './index-DV8HaHEX.cjs';
|
|
2
2
|
import './types-Cgumy1N4.cjs';
|
|
3
3
|
import 'node:events';
|
|
4
4
|
import 'node:net';
|
package/dist/servers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AssociationAcknowledgedData, a as AssociationCompleteData, b as AssociationContext, c as AssociationReceivedData, d as AssociationSummary, e as AssociationTracker, C as CStoreRequestData, f as CannotStartListenerData, g as ConfigErrorData, D as DCMPRSCP_FATAL_EVENTS, h as DCMPRSCP_PATTERNS, i as DCMPSRCV_FATAL_EVENTS, j as DCMPSRCV_PATTERNS, k as DCMQRSCP_FATAL_EVENTS, l as DCMQRSCP_PATTERNS, m as DCMRECV_FATAL_EVENTS, n as DCMRECV_PATTERNS, o as DatabaseReadyData, p as DcmQRSCP, q as DcmQRSCPEventMap, r as DcmQRSCPOptions, s as DcmprsCP, t as DcmprsCPEventMap, u as DcmprsCPOptions, v as DcmprscpEvent, w as DcmprscpEventValue, x as Dcmpsrcv, y as DcmpsrcvEvent, z as DcmpsrcvEventMap, B as DcmpsrcvEventValue, E as DcmpsrcvOptions, F as DcmqrscpEvent, G as DcmqrscpEventValue, H as Dcmrecv, I as DcmrecvEvent, J as DcmrecvEventMap, K as DcmrecvEventValue, L as DcmrecvOptions, M as DcmtkProcess, N as DcmtkProcessConfig, O as DcmtkProcessEventMap, P as DicomReceiver, Q as DicomReceiverEventMap, R as DicomReceiverOptions, S as EventPattern, T as FileDeletedData, U as FileReceivedData, V as FilenameMode, W as FilenameModeValue, X as LineParser, Y as LineParserEventMap, Z as MultiLineConfig, a2 as PoolStatus, a3 as PreferredTransferSyntax, a4 as PreferredTransferSyntaxValue, a5 as PrintAssociationAcknowledgedData, a6 as PrintAssociationReceivedData, a7 as PrintCannotStartListenerData, a8 as ProcessState, a9 as ProcessStateValue, aa as QRAssociationAcknowledgedData, ab as QRAssociationReceivedData, ac as QRCFindRequestData, ad as QRCGetRequestData, ae as QRCMoveRequestData, af as QRCStoreRequestData, ag as QRCannotStartListenerData, ah as QRListeningData, ai as ReceiverAssociationAcknowledgedData, aj as ReceiverAssociationData, ak as
|
|
1
|
+
export { A as AssociationAcknowledgedData, a as AssociationCompleteData, b as AssociationContext, c as AssociationReceivedData, d as AssociationSummary, e as AssociationTracker, C as CStoreRequestData, f as CannotStartListenerData, g as ConfigErrorData, D as DCMPRSCP_FATAL_EVENTS, h as DCMPRSCP_PATTERNS, i as DCMPSRCV_FATAL_EVENTS, j as DCMPSRCV_PATTERNS, k as DCMQRSCP_FATAL_EVENTS, l as DCMQRSCP_PATTERNS, m as DCMRECV_FATAL_EVENTS, n as DCMRECV_PATTERNS, o as DatabaseReadyData, p as DcmQRSCP, q as DcmQRSCPEventMap, r as DcmQRSCPOptions, s as DcmprsCP, t as DcmprsCPEventMap, u as DcmprsCPOptions, v as DcmprscpEvent, w as DcmprscpEventValue, x as Dcmpsrcv, y as DcmpsrcvEvent, z as DcmpsrcvEventMap, B as DcmpsrcvEventValue, E as DcmpsrcvOptions, F as DcmqrscpEvent, G as DcmqrscpEventValue, H as Dcmrecv, I as DcmrecvEvent, J as DcmrecvEventMap, K as DcmrecvEventValue, L as DcmrecvOptions, M as DcmtkProcess, N as DcmtkProcessConfig, O as DcmtkProcessEventMap, P as DicomReceiver, Q as DicomReceiverEventMap, R as DicomReceiverOptions, S as EventPattern, T as FileDeletedData, U as FileReceivedData, V as FilenameMode, W as FilenameModeValue, X as LineParser, Y as LineParserEventMap, Z as MultiLineConfig, a2 as PoolStatus, a3 as PreferredTransferSyntax, a4 as PreferredTransferSyntaxValue, a5 as PrintAssociationAcknowledgedData, a6 as PrintAssociationReceivedData, a7 as PrintCannotStartListenerData, a8 as ProcessState, a9 as ProcessStateValue, aa as QRAssociationAcknowledgedData, ab as QRAssociationReceivedData, ac as QRCFindRequestData, ad as QRCGetRequestData, ae as QRCMoveRequestData, af as QRCStoreRequestData, ag as QRCannotStartListenerData, ah as QRListeningData, ai as ReceiverAssociationAcknowledgedData, aj as ReceiverAssociationData, ak as ReceiverAssociationFinalizedData, al as ReceiverAssociationReceivedData, am as ReceiverCStoreRequestData, an as ReceiverCannotStartListenerData, ao as ReceiverConfigErrorData, ap as ReceiverDatabaseReadyData, aq as ReceiverEchoRequestData, ar as ReceiverErrorData, as as ReceiverFileData, at as ReceiverFileReceivedData, au as ReceiverFileStoredData, av as ReceiverInstanceData, aw as ReceiverInstanceErrorData, ax as ReceiverListeningData, ay as RefusingAssociationData, az as STORESCP_FATAL_EVENTS, aA as STORESCP_PATTERNS, aB as StorageMode, aC as StorageModeValue, aD as StoreSCP, aE as StoreSCPEventMap, aF as StoreSCPOptions, aG as StoreSCPPreset, aH as StoreSCPPresetName, aI as StoredFileData, aJ as StorescpEvent, aK as StorescpEventValue, aL as StoringFileData, aM as SubdirectoryCreatedData, aN as SubdirectoryMode, aO as SubdirectoryModeValue, aP as TrackedFile, aQ as WLMSCPFS_FATAL_EVENTS, aR as WLMSCPFS_PATTERNS, aS as WlmAssociationAcknowledgedData, aT as WlmAssociationReceivedData, aU as WlmCFindRequestData, aV as WlmCannotStartListenerData, aW as WlmListeningData, aX as Wlmscpfs, aY as WlmscpfsEvent, aZ as WlmscpfsEventMap, a_ as WlmscpfsEventValue, a$ as WlmscpfsOptions } from './index-B5FQoIqM.js';
|
|
2
2
|
import './types-Cgumy1N4.js';
|
|
3
3
|
import 'node:events';
|
|
4
4
|
import 'node:net';
|
package/dist/servers.js
CHANGED
|
@@ -2221,7 +2221,12 @@ var parser = new XMLParser({
|
|
|
2221
2221
|
ignoreAttributes: false,
|
|
2222
2222
|
attributeNamePrefix: "@_",
|
|
2223
2223
|
parseTagValue: false,
|
|
2224
|
-
isArray: (name) => ARRAY_TAG_NAMES.has(name)
|
|
2224
|
+
isArray: (name) => ARRAY_TAG_NAMES.has(name),
|
|
2225
|
+
// DICOM XML does not use XML entities. Disable entity processing to avoid
|
|
2226
|
+
// the default expansion limit (1000) which rejects files with >1000 tags.
|
|
2227
|
+
// Without this, large studies fall through to dcm2json which hangs on
|
|
2228
|
+
// compressed pixel data (DCMTK bug).
|
|
2229
|
+
processEntities: false
|
|
2225
2230
|
});
|
|
2226
2231
|
function xmlToJson(xml) {
|
|
2227
2232
|
try {
|
|
@@ -2830,6 +2835,9 @@ var Worker = class {
|
|
|
2830
2835
|
__publicField(this, "_state", "idle");
|
|
2831
2836
|
__publicField(this, "_context");
|
|
2832
2837
|
__publicField(this, "_pending", /* @__PURE__ */ new Set());
|
|
2838
|
+
__publicField(this, "_instancePending", /* @__PURE__ */ new Set());
|
|
2839
|
+
__publicField(this, "_instancesReceived", 0);
|
|
2840
|
+
__publicField(this, "_instanceErrors", 0);
|
|
2833
2841
|
__publicField(this, "_files", []);
|
|
2834
2842
|
__publicField(this, "_fileSizes", []);
|
|
2835
2843
|
__publicField(this, "_outputLines", []);
|
|
@@ -2867,6 +2875,9 @@ var Worker = class {
|
|
|
2867
2875
|
this._fileSizes.length = 0;
|
|
2868
2876
|
this._outputLines.length = 0;
|
|
2869
2877
|
this._pending.clear();
|
|
2878
|
+
this._instancePending.clear();
|
|
2879
|
+
this._instancesReceived = 0;
|
|
2880
|
+
this._instanceErrors = 0;
|
|
2870
2881
|
}
|
|
2871
2882
|
/** Returns the worker to idle and clears all association state. */
|
|
2872
2883
|
endAssociation() {
|
|
@@ -2876,6 +2887,9 @@ var Worker = class {
|
|
|
2876
2887
|
this._fileSizes.length = 0;
|
|
2877
2888
|
this._outputLines.length = 0;
|
|
2878
2889
|
this._pending.clear();
|
|
2890
|
+
this._instancePending.clear();
|
|
2891
|
+
this._instancesReceived = 0;
|
|
2892
|
+
this._instanceErrors = 0;
|
|
2879
2893
|
this._remoteSocket = void 0;
|
|
2880
2894
|
this._workerSocket = void 0;
|
|
2881
2895
|
}
|
|
@@ -2886,6 +2900,35 @@ var Worker = class {
|
|
|
2886
2900
|
this._pending.delete(promise);
|
|
2887
2901
|
});
|
|
2888
2902
|
}
|
|
2903
|
+
/** Tracks an in-flight instance parsing promise; auto-removes on completion. */
|
|
2904
|
+
trackInstance(promise) {
|
|
2905
|
+
this._instancePending.add(promise);
|
|
2906
|
+
void promise.finally(() => {
|
|
2907
|
+
this._instancePending.delete(promise);
|
|
2908
|
+
});
|
|
2909
|
+
}
|
|
2910
|
+
/** Records a successful instance parse. */
|
|
2911
|
+
recordInstanceSuccess() {
|
|
2912
|
+
this._instancesReceived++;
|
|
2913
|
+
}
|
|
2914
|
+
/** Records a failed instance parse. */
|
|
2915
|
+
recordInstanceError() {
|
|
2916
|
+
this._instanceErrors++;
|
|
2917
|
+
}
|
|
2918
|
+
/** Awaits all in-flight instance parsing promises. */
|
|
2919
|
+
async drainInstancePending() {
|
|
2920
|
+
if (this._instancePending.size > 0) {
|
|
2921
|
+
await Promise.all(this._instancePending);
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
/** Number of successfully parsed instances in this association. */
|
|
2925
|
+
get instancesReceived() {
|
|
2926
|
+
return this._instancesReceived;
|
|
2927
|
+
}
|
|
2928
|
+
/** Number of failed instance parses in this association. */
|
|
2929
|
+
get instanceErrors() {
|
|
2930
|
+
return this._instanceErrors;
|
|
2931
|
+
}
|
|
2889
2932
|
/** Records a successfully received file path and its size. */
|
|
2890
2933
|
recordFile(filePath, size) {
|
|
2891
2934
|
this._files.push(filePath);
|
|
@@ -3057,7 +3100,16 @@ var DicomReceiver = class _DicomReceiver extends EventEmitter {
|
|
|
3057
3100
|
return this.on("INSTANCE_RECEIVED", listener);
|
|
3058
3101
|
}
|
|
3059
3102
|
/**
|
|
3060
|
-
* Registers a listener for
|
|
3103
|
+
* Registers a listener for DicomInstance.open failures.
|
|
3104
|
+
*
|
|
3105
|
+
* @param listener - Callback receiving instance error data
|
|
3106
|
+
* @returns this for chaining
|
|
3107
|
+
*/
|
|
3108
|
+
onInstanceError(listener) {
|
|
3109
|
+
return this.on("INSTANCE_ERROR", listener);
|
|
3110
|
+
}
|
|
3111
|
+
/**
|
|
3112
|
+
* Registers a listener for completed associations (file moves done).
|
|
3061
3113
|
*
|
|
3062
3114
|
* @param listener - Callback receiving association data
|
|
3063
3115
|
* @returns this for chaining
|
|
@@ -3065,6 +3117,15 @@ var DicomReceiver = class _DicomReceiver extends EventEmitter {
|
|
|
3065
3117
|
onAssociationComplete(listener) {
|
|
3066
3118
|
return this.on("ASSOCIATION_COMPLETE", listener);
|
|
3067
3119
|
}
|
|
3120
|
+
/**
|
|
3121
|
+
* Registers a listener for fully finalized associations (all parsing done).
|
|
3122
|
+
*
|
|
3123
|
+
* @param listener - Callback receiving finalized data with instance counts
|
|
3124
|
+
* @returns this for chaining
|
|
3125
|
+
*/
|
|
3126
|
+
onAssociationFinalized(listener) {
|
|
3127
|
+
return this.on("ASSOCIATION_FINALIZED", listener);
|
|
3128
|
+
}
|
|
3068
3129
|
/**
|
|
3069
3130
|
* Registers a listener for new associations (bubbled from workers).
|
|
3070
3131
|
*
|
|
@@ -3394,28 +3455,33 @@ var DicomReceiver = class _DicomReceiver extends EventEmitter {
|
|
|
3394
3455
|
calledAE: data.calledAE,
|
|
3395
3456
|
source: data.source
|
|
3396
3457
|
});
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
emitInstanceReceived(filePath, fileSize, data, ctx) {
|
|
3401
|
-
const errorCtx = {
|
|
3402
|
-
filePath,
|
|
3458
|
+
const instanceCtx = {
|
|
3459
|
+
filePath: finalPath,
|
|
3460
|
+
fileSize,
|
|
3403
3461
|
associationId: ctx.associationId,
|
|
3404
3462
|
associationDir: ctx.associationDir,
|
|
3405
3463
|
callingAE: data.callingAE,
|
|
3406
3464
|
calledAE: data.calledAE,
|
|
3407
3465
|
source: data.source
|
|
3408
3466
|
};
|
|
3409
|
-
|
|
3467
|
+
worker.trackInstance(this.parseAndEmitInstance(worker, instanceCtx));
|
|
3468
|
+
}
|
|
3469
|
+
/** Parses a DICOM file and emits INSTANCE_RECEIVED or INSTANCE_ERROR. */
|
|
3470
|
+
async parseAndEmitInstance(worker, ctx) {
|
|
3471
|
+
try {
|
|
3472
|
+
const openResult = await DicomInstance.open(ctx.filePath);
|
|
3410
3473
|
if (!openResult.ok) {
|
|
3411
|
-
|
|
3474
|
+
worker.recordInstanceError();
|
|
3475
|
+
this.emit("INSTANCE_ERROR", { error: openResult.error, thrown: false, ...ctx });
|
|
3412
3476
|
return;
|
|
3413
3477
|
}
|
|
3414
|
-
|
|
3415
|
-
|
|
3478
|
+
worker.recordInstanceSuccess();
|
|
3479
|
+
this.emit("INSTANCE_RECEIVED", { ...ctx, instance: openResult.value });
|
|
3480
|
+
} catch (thrown) {
|
|
3416
3481
|
const error = thrown instanceof Error ? thrown : new Error(String(thrown));
|
|
3417
|
-
|
|
3418
|
-
|
|
3482
|
+
worker.recordInstanceError();
|
|
3483
|
+
this.emit("INSTANCE_ERROR", { error, thrown: true, ...ctx });
|
|
3484
|
+
}
|
|
3419
3485
|
}
|
|
3420
3486
|
/** Returns worker to idle pool on association complete, emits summary. */
|
|
3421
3487
|
wireAssociationComplete(worker) {
|
|
@@ -3423,10 +3489,12 @@ var DicomReceiver = class _DicomReceiver extends EventEmitter {
|
|
|
3423
3489
|
void this.finalizeAssociation(worker, data);
|
|
3424
3490
|
});
|
|
3425
3491
|
}
|
|
3426
|
-
/** Awaits
|
|
3492
|
+
/** Awaits file ops, emits ASSOCIATION_COMPLETE, awaits parsing, emits ASSOCIATION_FINALIZED. */
|
|
3427
3493
|
async finalizeAssociation(worker, data) {
|
|
3428
3494
|
await worker.drainPendingFiles();
|
|
3429
3495
|
this.emitAssociationComplete(worker, data);
|
|
3496
|
+
await worker.drainInstancePending();
|
|
3497
|
+
this.emitAssociationFinalized(worker, data);
|
|
3430
3498
|
worker.endAssociation();
|
|
3431
3499
|
void this.scaleDown();
|
|
3432
3500
|
}
|
|
@@ -3458,6 +3526,20 @@ var DicomReceiver = class _DicomReceiver extends EventEmitter {
|
|
|
3458
3526
|
output
|
|
3459
3527
|
});
|
|
3460
3528
|
}
|
|
3529
|
+
/** Emits ASSOCIATION_FINALIZED after all instance parsing is done. */
|
|
3530
|
+
emitAssociationFinalized(worker, data) {
|
|
3531
|
+
const ctx = worker.context;
|
|
3532
|
+
this.emit("ASSOCIATION_FINALIZED", {
|
|
3533
|
+
associationId: ctx?.associationId ?? data.associationId,
|
|
3534
|
+
associationDir: ctx?.associationDir ?? "",
|
|
3535
|
+
callingAE: data.callingAE,
|
|
3536
|
+
calledAE: data.calledAE,
|
|
3537
|
+
source: data.source,
|
|
3538
|
+
files: [...worker.files],
|
|
3539
|
+
instancesReceived: worker.instancesReceived,
|
|
3540
|
+
instanceErrors: worker.instanceErrors
|
|
3541
|
+
});
|
|
3542
|
+
}
|
|
3461
3543
|
/** Bubbles ASSOCIATION_RECEIVED from dcmrecv worker. */
|
|
3462
3544
|
wireAssociationReceived(worker) {
|
|
3463
3545
|
worker.dcmrecv.onEvent("ASSOCIATION_RECEIVED", (data) => {
|