@fnndsc/cumin 3.30.4 → 3.30.5
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.
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
10
|
import { Result } from "../utils/result.js";
|
|
11
|
+
/**
|
|
12
|
+
* How long a PACS file's bytes may take to arrive, whole. CUBE serves a PACS
|
|
13
|
+
* file only whole (the client has no stream for one), and the client's own
|
|
14
|
+
* 30 s default failed every X-ray over about 9 MB on a CUBE that sends at
|
|
15
|
+
* 0.3 MB/s. Ten minutes holds a 180 MB file at that rate.
|
|
16
|
+
*/
|
|
17
|
+
export declare const PACS_FILE_FETCH_MS: number;
|
|
11
18
|
/**
|
|
12
19
|
* Downloads a PACS file (DICOM) by file ID and returns the raw binary content.
|
|
13
20
|
*
|
|
@@ -9,11 +9,19 @@
|
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PACS_FILE_FETCH_MS = void 0;
|
|
12
13
|
exports.pacsFile_getBlob = pacsFile_getBlob;
|
|
13
14
|
exports.pacsFile_getText = pacsFile_getText;
|
|
14
15
|
const chrisConnection_js_1 = require("../connect/chrisConnection.js");
|
|
15
16
|
const errorStack_js_1 = require("../error/errorStack.js");
|
|
16
17
|
const result_js_1 = require("../utils/result.js");
|
|
18
|
+
/**
|
|
19
|
+
* How long a PACS file's bytes may take to arrive, whole. CUBE serves a PACS
|
|
20
|
+
* file only whole (the client has no stream for one), and the client's own
|
|
21
|
+
* 30 s default failed every X-ray over about 9 MB on a CUBE that sends at
|
|
22
|
+
* 0.3 MB/s. Ten minutes holds a 180 MB file at that rate.
|
|
23
|
+
*/
|
|
24
|
+
exports.PACS_FILE_FETCH_MS = 10 * 60 * 1000;
|
|
17
25
|
/**
|
|
18
26
|
* Downloads a PACS file (DICOM) by file ID and returns the raw binary content.
|
|
19
27
|
*
|
|
@@ -46,7 +54,7 @@ async function pacsFile_getBlob(fileId) {
|
|
|
46
54
|
return (0, result_js_1.Err)();
|
|
47
55
|
}
|
|
48
56
|
// Download the file blob using the PACS-specific method
|
|
49
|
-
const blob = await pacsFile.getFileBlob();
|
|
57
|
+
const blob = await pacsFile.getFileBlob(exports.PACS_FILE_FETCH_MS);
|
|
50
58
|
if (!blob) {
|
|
51
59
|
errorStack_js_1.errorStack.stack_push("error", `PACS file ID ${fileId} exists but returned no content/blob.`);
|
|
52
60
|
return (0, result_js_1.Err)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrisPACS.js","sourceRoot":"","sources":["../../src/filebrowser/chrisPACS.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG
|
|
1
|
+
{"version":3,"file":"chrisPACS.js","sourceRoot":"","sources":["../../src/filebrowser/chrisPACS.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAkCH,4CAgDC;AAcD,4CASC;AAtGD,sEAAgE;AAChE,0DAAoD;AACpD,kDAAqD;AAErD;;;;;GAKG;AACU,QAAA,kBAAkB,GAAW,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEzD;;;;;;;;;;;;;;;;;;GAkBG;AACI,KAAK,UAAU,gBAAgB,CAAC,MAAc;IACnD,MAAM,MAAM,GAAkB,MAAM,oCAAe,CAAC,UAAU,EAAE,CAAC;IACjE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,0BAAU,CAAC,UAAU,CAAC,OAAO,EAAE,iDAAiD,CAAC,CAAC;QAClF,OAAO,IAAA,eAAG,GAAE,CAAC;IACf,CAAC;IAED,IAAI,CAAC;QACH,MAAM,QAAQ,GAAoB,MAAM,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAEnE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,0BAAU,CAAC,UAAU,CAAC,OAAO,EAAE,+CAA+C,MAAM,EAAE,CAAC,CAAC;YACxF,OAA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