@ubercode/dcmtk 0.13.0 → 0.13.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/{index-B1eynCVv.d.cts → index-Bve4fMIh.d.cts} +3 -0
- package/dist/{index-DM0yFtPO.d.ts → index-CZiFWENk.d.ts} +3 -0
- package/dist/index.cjs +15 -10
- 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 +15 -10
- package/dist/index.js.map +1 -1
- package/dist/servers.cjs +15 -10
- 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 +15 -10
- package/dist/servers.js.map +1 -1
- package/package.json +1 -1
package/dist/servers.cjs
CHANGED
|
@@ -2863,6 +2863,7 @@ var DicomReceiverOptionsSchema = zod.z.object({
|
|
|
2863
2863
|
charsetAssume: zod.z.string().min(1).optional(),
|
|
2864
2864
|
charsetFallback: zod.z.string().min(1).optional()
|
|
2865
2865
|
}).strict().optional(),
|
|
2866
|
+
parseInstances: zod.z.boolean().optional(),
|
|
2866
2867
|
signal: zod.z.instanceof(AbortSignal).optional()
|
|
2867
2868
|
}).strict().refine((data) => (data.minPoolSize ?? DEFAULT_MIN_POOL_SIZE) <= (data.maxPoolSize ?? DEFAULT_MAX_POOL_SIZE), {
|
|
2868
2869
|
message: "minPoolSize must be <= maxPoolSize"
|
|
@@ -3033,6 +3034,7 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
|
|
|
3033
3034
|
__publicField(this, "maxPoolSize");
|
|
3034
3035
|
__publicField(this, "connectionTimeoutMs");
|
|
3035
3036
|
__publicField(this, "resolvedInstanceOpenOptions");
|
|
3037
|
+
__publicField(this, "parseInstances");
|
|
3036
3038
|
__publicField(this, "workers", /* @__PURE__ */ new Map());
|
|
3037
3039
|
__publicField(this, "tcpServer");
|
|
3038
3040
|
__publicField(this, "associationCounter", 0);
|
|
@@ -3045,6 +3047,7 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
|
|
|
3045
3047
|
this.maxPoolSize = options.maxPoolSize ?? DEFAULT_MAX_POOL_SIZE;
|
|
3046
3048
|
this.connectionTimeoutMs = options.connectionTimeoutMs ?? DEFAULT_CONNECTION_TIMEOUT_MS;
|
|
3047
3049
|
this.resolvedInstanceOpenOptions = { charsetFallback: "Latin1", ...options.instanceOpenOptions };
|
|
3050
|
+
this.parseInstances = options.parseInstances ?? true;
|
|
3048
3051
|
}
|
|
3049
3052
|
// -----------------------------------------------------------------------
|
|
3050
3053
|
// Public API
|
|
@@ -3497,16 +3500,18 @@ var DicomReceiver = class _DicomReceiver extends events.EventEmitter {
|
|
|
3497
3500
|
calledAE: data.calledAE,
|
|
3498
3501
|
source: data.source
|
|
3499
3502
|
});
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3503
|
+
if (this.parseInstances) {
|
|
3504
|
+
const instanceCtx = {
|
|
3505
|
+
filePath: finalPath,
|
|
3506
|
+
fileSize,
|
|
3507
|
+
associationId: ctx.associationId,
|
|
3508
|
+
associationDir: ctx.associationDir,
|
|
3509
|
+
callingAE: data.callingAE,
|
|
3510
|
+
calledAE: data.calledAE,
|
|
3511
|
+
source: data.source
|
|
3512
|
+
};
|
|
3513
|
+
worker.trackInstance(this.parseAndEmitInstance(worker, instanceCtx));
|
|
3514
|
+
}
|
|
3510
3515
|
}
|
|
3511
3516
|
/** Parses a DICOM file and emits INSTANCE_RECEIVED or INSTANCE_ERROR. */
|
|
3512
3517
|
async parseAndEmitInstance(worker, ctx) {
|