@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.
Files changed (41) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +18 -15
  3. package/dist/DicomInstance-By9zd7GM.d.cts +625 -0
  4. package/dist/DicomInstance-CQEIuF_x.d.ts +625 -0
  5. package/dist/{dcmodify-CTXBWKU9.d.cts → dcmodify-B-_uUIKB.d.ts} +4 -2
  6. package/dist/{dcmodify-Daeafqrm.d.ts → dcmodify-Gds9u5Vj.d.cts} +4 -2
  7. package/dist/dicom.cjs +329 -51
  8. package/dist/dicom.cjs.map +1 -1
  9. package/dist/dicom.d.cts +368 -3
  10. package/dist/dicom.d.ts +368 -3
  11. package/dist/dicom.js +329 -51
  12. package/dist/dicom.js.map +1 -1
  13. package/dist/index.cjs +1460 -419
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +8 -7
  16. package/dist/index.d.ts +8 -7
  17. package/dist/index.js +1432 -413
  18. package/dist/index.js.map +1 -1
  19. package/dist/servers.cjs +2379 -196
  20. package/dist/servers.cjs.map +1 -1
  21. package/dist/servers.d.cts +1654 -3
  22. package/dist/servers.d.ts +1654 -3
  23. package/dist/servers.js +2305 -145
  24. package/dist/servers.js.map +1 -1
  25. package/dist/tools.cjs +97 -50
  26. package/dist/tools.cjs.map +1 -1
  27. package/dist/tools.d.cts +21 -4
  28. package/dist/tools.d.ts +21 -4
  29. package/dist/tools.js +97 -51
  30. package/dist/tools.js.map +1 -1
  31. package/dist/{types-zHhxS7d2.d.cts → types-Cgumy1N4.d.cts} +1 -24
  32. package/dist/{types-zHhxS7d2.d.ts → types-Cgumy1N4.d.ts} +1 -24
  33. package/dist/utils.cjs.map +1 -1
  34. package/dist/utils.d.cts +1 -1
  35. package/dist/utils.d.ts +1 -1
  36. package/dist/utils.js.map +1 -1
  37. package/package.json +8 -8
  38. package/dist/index-BZxi4104.d.ts +0 -826
  39. package/dist/index-CapkWqxy.d.ts +0 -1295
  40. package/dist/index-DX4C3zbo.d.cts +0 -826
  41. 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 RELEASE** — This library has not been thoroughly tested by humans. Use in production at your own risk.
3
+ > **ALPHA PREVIEW** — API may have breaking changes before 1.0. Use in production at your own risk.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@ubercode/dcmtk.svg)](https://www.npmjs.com/package/@ubercode/dcmtk)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/@ubercode/dcmtk.svg)](https://www.npmjs.com/package/@ubercode/dcmtk)
@@ -9,14 +9,14 @@
9
9
  [![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-green.svg)](https://nodejs.org/)
10
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](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 and 6 long-lived server processes with a modern async/await API, branded types, and the Result pattern for safe error handling.
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 and graceful shutdown
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 `DicomFile` I/O
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, DicomFile |
103
- | [Servers](docs/servers.md) | 6 long-lived server classes with typed events |
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 | Binary | Description | Docs |
123
- | ---------- | -------- | ------------------------------------------ | -------------------------------------- |
124
- | `Dcmrecv` | dcmrecv | DICOM receiver (C-STORE SCP) | [servers.md](docs/servers.md#dcmrecv) |
125
- | `StoreSCP` | storescp | Storage SCP with advanced options | [servers.md](docs/servers.md#storescp) |
126
- | `DcmQRSCP` | dcmqrscp | Query/Retrieve SCP (C-FIND, C-MOVE, C-GET) | [servers.md](docs/servers.md#dcmqrscp) |
127
- | `Wlmscpfs` | wlmscpfs | Worklist Management SCP | [servers.md](docs/servers.md#wlmscpfs) |
128
- | `DcmprsCP` | dcmprscp | Print Management SCP | [servers.md](docs/servers.md#dcmprscp) |
129
- | `Dcmpsrcv` | dcmpsrcv | Viewer network receiver | [servers.md](docs/servers.md#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