@ubercode/dcmtk 0.1.1 → 0.2.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/LICENSE +21 -21
- package/README.md +18 -15
- package/dist/DicomInstance-By9zd7GM.d.cts +625 -0
- package/dist/DicomInstance-CQEIuF_x.d.ts +625 -0
- package/dist/{dcmodify-CTXBWKU9.d.cts → dcmodify-B-_uUIKB.d.ts} +4 -2
- package/dist/{dcmodify-Daeafqrm.d.ts → dcmodify-Gds9u5Vj.d.cts} +4 -2
- package/dist/dicom.cjs +329 -51
- package/dist/dicom.cjs.map +1 -1
- package/dist/dicom.d.cts +368 -3
- package/dist/dicom.d.ts +368 -3
- package/dist/dicom.js +329 -51
- package/dist/dicom.js.map +1 -1
- package/dist/index.cjs +1460 -419
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +8 -7
- package/dist/index.js +1432 -413
- package/dist/index.js.map +1 -1
- package/dist/servers.cjs +2379 -196
- package/dist/servers.cjs.map +1 -1
- package/dist/servers.d.cts +1654 -3
- package/dist/servers.d.ts +1654 -3
- package/dist/servers.js +2305 -145
- package/dist/servers.js.map +1 -1
- package/dist/tools.cjs +97 -50
- package/dist/tools.cjs.map +1 -1
- package/dist/tools.d.cts +21 -4
- package/dist/tools.d.ts +21 -4
- package/dist/tools.js +97 -51
- package/dist/tools.js.map +1 -1
- package/dist/{types-zHhxS7d2.d.cts → types-Cgumy1N4.d.cts} +1 -24
- package/dist/{types-zHhxS7d2.d.ts → types-Cgumy1N4.d.ts} +1 -24
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +8 -8
- package/dist/index-BZxi4104.d.ts +0 -826
- package/dist/index-CapkWqxy.d.ts +0 -1295
- package/dist/index-DX4C3zbo.d.cts +0 -826
- package/dist/index-r7AvpkCE.d.cts +0 -1295
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2021-2026 Michael Hobbs
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-2026 Michael Hobbs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @ubercode/dcmtk
|
|
2
2
|
|
|
3
|
-
> **ALPHA PREVIEW
|
|
3
|
+
> **ALPHA PREVIEW** — API may have breaking changes before 1.0. Use in production at your own risk.
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@ubercode/dcmtk)
|
|
6
6
|
[](https://www.npmjs.com/package/@ubercode/dcmtk)
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
[](https://nodejs.org/)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
|
|
12
|
-
Type-safe Node.js bindings for the [DCMTK](https://dicom.offis.de/dcmtk.php.en) (DICOM Toolkit) command-line utilities. Wraps 51 DCMTK binaries
|
|
12
|
+
Type-safe Node.js bindings for the [DCMTK](https://dicom.offis.de/dcmtk.php.en) (DICOM Toolkit) command-line utilities. Wraps 51 DCMTK binaries, 6 long-lived server processes, and a pooled DicomReceiver with auto-scaling workers, all with a modern async/await API, branded types, and the Result pattern for safe error handling.
|
|
13
13
|
|
|
14
14
|
## Features
|
|
15
15
|
|
|
16
16
|
- **51 tool wrappers** — async functions for every DCMTK command-line binary (data conversion, network, image processing, structured reports, presentation state)
|
|
17
|
-
- **6 server classes** — long-lived DICOM listeners with typed EventEmitter APIs
|
|
17
|
+
- **6 server classes + DicomReceiver** — long-lived DICOM listeners with typed EventEmitter APIs, plus a pooled receiver with auto-scaling workers
|
|
18
18
|
- **PacsClient** — high-level PACS client with Echo, Query, Retrieve, and Store operations
|
|
19
|
-
- **DICOM data layer** — immutable `DicomDataset`, explicit `ChangeSet` builder, and `
|
|
19
|
+
- **DICOM data layer** — immutable `DicomDataset`, explicit `ChangeSet` builder, and `DicomInstance` unified file I/O
|
|
20
20
|
- **Result pattern** — all fallible operations return `Result<T>` instead of throwing
|
|
21
21
|
- **Branded types** — `DicomTag`, `AETitle`, `Port`, and more prevent primitive-type mix-ups at compile time
|
|
22
22
|
- **Full TypeScript** — strict mode, dual CJS/ESM build, complete `.d.ts` declarations
|
|
@@ -26,7 +26,7 @@ Type-safe Node.js bindings for the [DCMTK](https://dicom.offis.de/dcmtk.php.en)
|
|
|
26
26
|
## Prerequisites
|
|
27
27
|
|
|
28
28
|
- **Node.js** >= 20
|
|
29
|
-
- **DCMTK** installed on the system — set the `DCMTK_PATH` environment variable or install to a standard location (`/usr/bin`, `/usr/local/bin`, `C:\Program Files\DCMTK`)
|
|
29
|
+
- **DCMTK** installed on the system — set the `DCMTK_PATH` environment variable or install to a standard location (`/usr/bin`, `/usr/local/bin`, `C:\Program Files\DCMTK`). Pre-built Docker images with Node.js + DCMTK are available: [`michaelleehobbs/nodejs-dcmtk`](https://hub.docker.com/r/michaelleehobbs/nodejs-dcmtk)
|
|
30
30
|
|
|
31
31
|
## Installation
|
|
32
32
|
|
|
@@ -92,6 +92,8 @@ if (result.ok) {
|
|
|
92
92
|
}
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
+
> For production workloads with concurrent connections, use [`DicomReceiver`](docs/servers.md#dicomreceiver) — a pooled receiver that manages multiple `Dcmrecv` workers behind a TCP proxy with auto-scaling.
|
|
96
|
+
|
|
95
97
|
## Documentation
|
|
96
98
|
|
|
97
99
|
| Guide | Description |
|
|
@@ -99,8 +101,8 @@ if (result.ok) {
|
|
|
99
101
|
| [Getting Started](docs/GETTING_STARTED.md) | Installation, DICOM glossary, tutorials, troubleshooting |
|
|
100
102
|
| [Core Concepts](docs/core-concepts.md) | Result pattern, branded types, timeouts, AbortSignal |
|
|
101
103
|
| [PACS Client](docs/pacs-client.md) | High-level Echo, Query, Retrieve, Store API |
|
|
102
|
-
| [DICOM Data Layer](docs/dicom-data-layer.md) | DicomDataset, ChangeSet,
|
|
103
|
-
| [Servers](docs/servers.md) | 6
|
|
104
|
+
| [DICOM Data Layer](docs/dicom-data-layer.md) | DicomDataset, ChangeSet, DicomInstance |
|
|
105
|
+
| [Servers](docs/servers.md) | 6 server classes + DicomReceiver pooled receiver |
|
|
104
106
|
| [Utilities](docs/utilities.md) | batch processing, retry with backoff |
|
|
105
107
|
|
|
106
108
|
## Tool Reference
|
|
@@ -119,14 +121,15 @@ if (result.ok) {
|
|
|
119
121
|
|
|
120
122
|
## Server Reference
|
|
121
123
|
|
|
122
|
-
| Class
|
|
123
|
-
|
|
|
124
|
-
| `Dcmrecv`
|
|
125
|
-
| `StoreSCP`
|
|
126
|
-
| `DcmQRSCP`
|
|
127
|
-
| `Wlmscpfs`
|
|
128
|
-
| `DcmprsCP`
|
|
129
|
-
| `Dcmpsrcv`
|
|
124
|
+
| Class | Binary | Description | Docs |
|
|
125
|
+
| --------------- | -------------- | ------------------------------------------ | ------------------------------------------- |
|
|
126
|
+
| `Dcmrecv` | dcmrecv | DICOM receiver (C-STORE SCP) | [servers.md](docs/servers.md#dcmrecv) |
|
|
127
|
+
| `StoreSCP` | storescp | Storage SCP with advanced options | [servers.md](docs/servers.md#storescp) |
|
|
128
|
+
| `DcmQRSCP` | dcmqrscp | Query/Retrieve SCP (C-FIND, C-MOVE, C-GET) | [servers.md](docs/servers.md#dcmqrscp) |
|
|
129
|
+
| `Wlmscpfs` | wlmscpfs | Worklist Management SCP | [servers.md](docs/servers.md#wlmscpfs) |
|
|
130
|
+
| `DcmprsCP` | dcmprscp | Print Management SCP | [servers.md](docs/servers.md#dcmprscp) |
|
|
131
|
+
| `Dcmpsrcv` | dcmpsrcv | Viewer network receiver | [servers.md](docs/servers.md#dcmpsrcv) |
|
|
132
|
+
| `DicomReceiver` | dcmrecv (pool) | Pooled receiver with auto-scaling workers | [servers.md](docs/servers.md#dicomreceiver) |
|
|
130
133
|
|
|
131
134
|
## License
|
|
132
135
|
|