Expand description
This crate contains the DICOM transfer syntax registry.
The transfer syntax registry maps a DICOM UID of a transfer syntax (TS) into the respective transfer syntax specifier. This specifier defines:
- how to read and write DICOM data sets;
- how to decode and encode pixel data.
Support may be partial, in which case the data set can be retrieved
but the pixel data may not be decoded through this crate. To include
support for some transfer syntaxes with encapsulated pixel data,
add the native Cargo feature
or one of the other image encoding features available.
All registered TSes are readily available
through the TransferSyntaxRegistry type.
This registry is intended to be used in the development of higher level APIs, which should learn to negotiate and resolve the expected transfer syntax automatically.
§Transfer Syntaxes
This crate encompasses basic DICOM level of conformance, plus support for some transfer syntaxes with compressed pixel data. Implicit VR Little Endian, Explicit VR Little Endian, and Explicit VR Big Endian are fully supported. Support may vary for transfer syntaxes which rely on encapsulated pixel data.
| transfer syntax | decoding support | encoding support |
|---|---|---|
| Deflated Explicit VR Little Endian | Cargo feature deflate | ✓ |
| JPEG Baseline (Process 1) | Cargo feature jpeg | ✓ |
| JPEG Extended (Process 2 & 4) | Cargo feature jpeg | x |
| JPEG Lossless, Non-Hierarchical (Process 14) | Cargo feature jpeg | x |
| JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]) | Cargo feature jpeg | x |
| JPEG-LS Lossless | not supported here; see src/dicom_io/jpeg_ls.rs | - |
| JPEG-LS Lossy (Near-Lossless) | not supported here; see src/dicom_io/jpeg_ls.rs | - |
| JPEG 2000 (Lossless Only) | Cargo feature jpeg2000 (OpenJPEG) | x |
| JPEG 2000 | Cargo feature jpeg2000 (OpenJPEG) | x |
| JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only) | Cargo feature jpeg2000 (OpenJPEG) | x |
| JPEG 2000 Part 2 Multi-component Image Compression | Cargo feature jpeg2000 (OpenJPEG) | x |
| JPIP Referenced Deflate | Cargo feature deflate | ✓ |
| High-Throughput JPEG 2000 (Lossless Only) | Cargo feature jpeg2000 (OpenHTJ2K) | x (dcmnorm encodes it directly) |
| High-Throughput JPEG 2000 with RPCL Options (Lossless Only) | Cargo feature jpeg2000 (OpenHTJ2K) | x |
| High-Throughput JPEG 2000 | Cargo feature jpeg2000 (OpenHTJ2K) | x (dcmnorm encodes it directly) |
| JPIP HTJ2K Referenced Deflate | Cargo feature deflate | ✓ |
| JPEG XL (Lossless/Recompression/general) | Cargo feature jpeg-xl-codec on the top-level dcmnorm crate; see src/dicom_io/jpeg_xl.rs | x |
| RLE Lossless | Cargo feature rle | x |
| Deflated Image Frame | Cargo feature deflate | ✓ |
Cargo features behind native (jpeg, rle, deflate)
provide implementations that are written in pure Rust (JPEG decoding via
the in-house dcmnorm-jpeg, encoding via jpeg-encoder) and are likely
available on all supported platforms without issues.
Additional codecs are opt-in by enabling Cargo features,
for scenarios where a native implementation is not available,
or alternative implementations are available.
jpeg2000provides JPEG 2000 decoding through thedcmnorm-jpeg2000crate: OpenJPEG (C, statically linked) for classic JPEG 2000 and the vendored OpenHTJ2K (C++) for High-Throughput JPEG 2000. Neither can be used in WebAssembly.
JPEG-LS and JPEG XL are not supported via this registry - see entries.rs
for the reasoning. Transfer syntaxes which are not supported,
either due to being unable to read the data set
or decode encapsulated pixel data,
are listed as stubs for partial support.
The full list is available in the entries module.
Modules§
- entries
- A list of compiled transfer syntax specifiers.
Structs§
- Transfer
Syntax - A DICOM transfer syntax specifier.
- Transfer
Syntax Registry - Zero-sized representative of the main transfer syntax registry.
- Transfer
Syntax Registry Impl - Main implementation of a registry of DICOM transfer syntaxes.
Traits§
- Transfer
Syntax Index - Trait for a container/repository of transfer syntax specifiers.
Functions§
- default
- Retrieve the default transfer syntax.