@ubercode/dcmtk 0.16.1 → 1.0.0-rc.2

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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # @ubercode/dcmtk
2
2
 
3
- > **ALPHA PREVIEW** — API may have breaking changes before 1.0. Use in production at your own risk.
3
+ > **RELEASE CANDIDATE** — the public API is frozen for 1.0. In production use. Breaking changes before
4
+ > 1.0 final would require a compelling reason and will be called out in the [changelog](CHANGELOG.md).
4
5
 
5
6
  [![npm version](https://img.shields.io/npm/v/@ubercode/dcmtk.svg)](https://www.npmjs.com/package/@ubercode/dcmtk)
6
7
  [![npm downloads](https://img.shields.io/npm/dm/@ubercode/dcmtk.svg)](https://www.npmjs.com/package/@ubercode/dcmtk)
@@ -460,10 +460,16 @@ interface FileIOOptions {
460
460
  }
461
461
  /** Options for opening a DICOM file. Extends FileIOOptions with read-specific settings. */
462
462
  interface DicomOpenOptions extends FileIOOptions {
463
- /** Assume the specified character set when SpecificCharacterSet (0008,0005) is absent. Maps to dcm2xml `+Ca`. */
463
+ /** Assume the specified character set when SpecificCharacterSet (0008,0005) is absent. Accepts DICOM defined terms ('ISO_IR 100') or DCMTK-style aliases ('latin-1'). */
464
464
  readonly charsetAssume?: string | undefined;
465
- /** Fallback charset to retry with when UTF-8 conversion fails due to illegal byte sequences. Maps to dcm2xml `+Ca`. When set, a charset conversion failure triggers an automatic retry with this charset assumed. `'Latin1'` is recommended — it maps every byte 0x00-0xFF to a valid character, so conversion never fails. */
465
+ /** Fallback charset to decode with when the file's character set is unsupported or conversion fails. `'latin-1'` is recommended — it maps every byte 0x00-0xFF to a valid character, so decoding never fails. */
466
466
  readonly charsetFallback?: string | undefined;
467
+ /**
468
+ * Parse engine. `'js'` (default) parses in-process via {@link dicom2json}
469
+ * and automatically falls back to the DCMTK binaries when the JS parser
470
+ * fails; `'dcmtk'` uses the deprecated dcm2json binary path exclusively.
471
+ */
472
+ readonly engine?: 'js' | 'dcmtk' | undefined;
467
473
  }
468
474
 
469
475
  /**
@@ -460,10 +460,16 @@ interface FileIOOptions {
460
460
  }
461
461
  /** Options for opening a DICOM file. Extends FileIOOptions with read-specific settings. */
462
462
  interface DicomOpenOptions extends FileIOOptions {
463
- /** Assume the specified character set when SpecificCharacterSet (0008,0005) is absent. Maps to dcm2xml `+Ca`. */
463
+ /** Assume the specified character set when SpecificCharacterSet (0008,0005) is absent. Accepts DICOM defined terms ('ISO_IR 100') or DCMTK-style aliases ('latin-1'). */
464
464
  readonly charsetAssume?: string | undefined;
465
- /** Fallback charset to retry with when UTF-8 conversion fails due to illegal byte sequences. Maps to dcm2xml `+Ca`. When set, a charset conversion failure triggers an automatic retry with this charset assumed. `'Latin1'` is recommended — it maps every byte 0x00-0xFF to a valid character, so conversion never fails. */
465
+ /** Fallback charset to decode with when the file's character set is unsupported or conversion fails. `'latin-1'` is recommended — it maps every byte 0x00-0xFF to a valid character, so decoding never fails. */
466
466
  readonly charsetFallback?: string | undefined;
467
+ /**
468
+ * Parse engine. `'js'` (default) parses in-process via {@link dicom2json}
469
+ * and automatically falls back to the DCMTK binaries when the JS parser
470
+ * fails; `'dcmtk'` uses the deprecated dcm2json binary path exclusively.
471
+ */
472
+ readonly engine?: 'js' | 'dcmtk' | undefined;
467
473
  }
468
474
 
469
475
  /**