Releases: ThalesMMS/DICOM-Decoder
DICOM-Decoder 1.3.1
Changes since 1.2.1.
Compare: 1.2.1...1.3.1
This release includes the 1.3.0 feature work plus the 1.3.1 public package cleanup. Compared with 1.2.1, it covers codec runtime diagnostics, transfer syntax support matrices, color conversion reporting, stricter sequence parsing, SR validation, DIMSE/DICOMweb/TLS helpers, SwiftUI example updates, and package-readiness changes for downstream public repositories.
Codec runtime and transfer syntax diagnostics
- Added
DicomCodecRuntimePreflightfor optional CharLS and OpenJPEG runtime checks, including default library search paths, environment-variable overrides, symbol validation, and stable diagnostic statuses for missing libraries, invalid paths, and missing symbols. - Updated JPEG-LS and JPEG 2000 codec loading to use runtime preflight results and throw explicit unsupported-transfer diagnostics instead of relying on late missing-symbol failures.
- Added compressed pixel support and writer support matrices in
DicomTransferSyntaxRegistry, with explicit classifications for decoded, delegated, streamed-only, unsupported, and out-of-scope transfer syntaxes. - Expanded writer support reporting for native datasets, deflated datasets, encapsulated pass-through, referenced datasets, and unsupported writing paths.
Color and pixel decoding
- Added a color display conversion matrix covering supported and unsupported photometric interpretation paths.
- Extended color conversion diagnostics with
DicomColorConversionContext, including photometric interpretation, samples per pixel, planar configuration, bit depth, and transfer syntax. - Added explicit handling and diagnostics for additional YBR variants such as
YBR_PARTIAL_420,YBR_RCT, andYBR_ICT. - Tightened compressed-pixel diagnostics for multi-component JPEG-LS, JPEG Lossless, and JPEG 2000 paths, especially where bit depth or color layout is not currently supported.
Dataset parsing, writing, export, and SR validation
- Hardened undefined-length sequence and item parsing with stricter delimiter validation, nested sequence handling, and clearer error cases for malformed SQ data.
- Added
DicomExportSupportMatrixto document and query support for image export, Secondary Capture, print management, waveforms, video, metadata preservation, transfer syntaxes, and unsupported export cases. - Added semantic validation support for structured reports through
DicomStructuredReportValidation, including support matrices and stable validation errors for unsupported SOP classes, templates, value types, coding schemes, relationships, numeric units, graphic data, and evidence references. - Expanded dataset writer behavior and tests around native pixel data, deflated datasets, encapsulated pass-through, referenced-pixel metadata, and unsupported write paths.
DIMSE, DICOMweb, and TLS helpers
- Added
DicomTLSOptionsand TLS profile/material support for client and server configuration, including trust anchors, local identity handling on Apple platforms, and profile-derived TLS minimums. - Expanded DIMSE SCU support with C-STORE request construction from Part 10 payloads, requested transfer syntax handling, operation cancellation, C-CANCEL support, association pooling primitives, and additional transport diagnostics.
- Added DICOMweb client helpers for WADO-RS frame retrieval and BulkDataURI retrieval.
- Expanded the in-memory DICOMweb server with a conformance matrix, stable error-code headers, deterministic QIDO pagination, and explicit unsupported-route responses for UPS, frame, and rendered-frame paths that are not implemented.
SwiftUI example and package readiness
- Updated the SwiftUI series navigator with thumbnail-backed slice shortcuts and clearer unavailable states.
- Updated the SwiftUI example package target to process app assets/resources and exclude app metadata/docs from compilation.
- Updated documentation to describe optional codec runtime preflight, transfer syntax support, color conversion support, export support, DICOMweb conformance, DIMSE helpers, and related public repositories.
- Removed tracked sibling-checkout path references from docs, scripts, and tests so public consumers can resolve downstream packages from remote tags instead of local repository paths.
Tests and fixtures
- Added DCMTK parity fixtures and expanded clinical parity and documentation reconciliation checks.
- Added coverage for codec runtime preflight, compressed codec support matrices, color conversion diagnostics, sequence parsing, SR validation, export support, DICOMweb client/server behavior, DIMSE SCU behavior, TLS material handling, SwiftUI preview/navigation behavior, and runtime trap hardening.
Notes
- CharLS and OpenJPEG remain optional native runtimes. The package now reports their availability and failure modes more explicitly, but it does not bundle those libraries.
- The DICOMweb server remains an in-memory helper/test server, with unsupported production routes returning stable diagnostics.
- DIMSE helpers provide package-level workflow support and testable transport behavior; they are not a managed PACS service.
DICOM-Decoder 1.2.1
Changes since 1.2.0.
Compare: 1.2.0...1.2.1
This is a focused follow-up release covering 7 changed files.
Changes
- Added
DicomSliceRescaleParametersandDicomSeriesVolume.sliceRescaleParametersso a loaded series can retain rescale slope/intercept values per sorted slice. - Updated
DicomSeriesLoaderto collect per-slice rescale metadata during volume assembly. - Updated
DicomDecodedSeriesmodality voxel conversion to apply per-slice rescale parameters when they match the assembled volume depth, with the volume-level rescale values kept as the fallback. - Adjusted Window Center / Window Width selection to prefer decoder-provided values when available, then a preferred paired multi-value component, then the first valid paired component without mixing center and width from different alternatives.
- Extended
DicomWebQuerywith accession number, study date, study description, referring physician name, and institution name filters. - Changed DICOMweb study search serialization to send modality as
ModalitiesInStudy. - Updated the in-memory DICOMweb server query matching to support the added study filters and to match
ModalitiesInStudywith aModalityfallback.
Tests
- Added coverage for per-slice rescale application after slice sorting.
- Updated multi-value WC/WW coverage for the preferred paired component behavior.
- Expanded DICOMweb client query tests to verify the added query parameters and
ModalitiesInStudyserialization.
DICOM-Decoder 1.2.0
Changes since 1.1.4.
Compare: 1.1.4...1.2.0
This release covers 139 changed files, with 44 new DicomCore source files, 44 new DicomCoreTests files, and an opt-in interop smoke-test harness. The range includes the 1.1.5 license change plus the 1.2.0 DicomCore expansion.
Licensing and packaging
- Switched the project license from MIT to Apache License 2.0.
- Updated the README license badge, license section, and Homebrew formula metadata to use
Apache-2.0. - Linked the
DicomCoretarget against systemzlibfor Deflated Explicit VR Little Endian dataset support.
Decoder and metadata model
- Added
DicomDataSet,DicomDataElement, typed DICOM value helpers, typed person/date/time/date-time parsing, sequence item parsing, andDicomDataSetWriterfor controlled Part 10 dataset output. - Added Deflated Explicit VR Little Endian read/write support through
DicomDeflatedDataSetCodec. - Added
DicomSpecificCharacterSetand character-set-aware text decoding for header and lazy metadata paths, includingSpecificCharacterSetTagHandler. - Expanded
DicomTagand the bundled dictionary resources for additional image, clinical object, waveform, presentation, private, network, and quantitative tags. - Preserved private data as typed dataset elements and added private-data helpers for known Siemens CSA-style metadata.
- Added
DicomDirectory/DicomDirectoryReaderplusStudyDataServicemethods for loading DICOMDIR media hierarchies. - Added
DicomMediaCatalogBuilderfor files, directories, DICOMDIR media, and ZIP media catalogs, with special-object classification for SEG, RT, SR/KOS, documents, waveforms, and video.
Pixel data, transfer syntaxes, and color handling
- Added
DicomPixelDataDescriptorand frame-addressable native pixel access throughDCMDecoder.pixelDataDescriptor,getFrame(_:),getFrames(_:), andgetAllFrames(). - Added
DicomEncapsulatedPixelDataParser, encapsulated pixel data descriptors, Basic Offset Table / Extended Offset Table parsing, fragment indexing, and compressed frame extraction throughgetEncapsulatedFrame(_:). - Added Enhanced Multi-frame Functional Group parsing for shared and per-frame geometry through
enhancedMultiframeFunctionalGroupsandenhancedFrameGeometry(at:). - Added native RLE Lossless decoding for supported 8-bit/16-bit grayscale and 8-bit RGB payloads.
- Added JPEG-LS lossless and near-lossless runtime bridging through CharLS when the runtime library is available.
- Added JPEG 2000 runtime bridging through OpenJPEG for supported grayscale/color frames and JPEG 2000 Part 2 multi-component volume documents.
- Added
DicomJP3DVolumeDocumentfor JPEG 2000 Part 2 multi-component volume decoding intoDicomSeriesVolumebuffers. - Added JPIP referenced pixel data models and
DicomJPIPClientprogressive volume update streams with caller-supplied transport. - Added a transfer syntax registry and conservative transcode planning diagnostics through
DicomTransferSyntaxRegistryandDicomTranscodePlan. - Reworked compressed-pixel backend selection to use explicit backend decisions and diagnostics instead of silent ImageIO fallback for unsupported precision or syntax combinations.
- Added display-ready RGB conversion support for MONOCHROME, RGB, PALETTE COLOR, YBR_FULL, and YBR_FULL_422 data, including palette descriptors and ICC profile metadata.
Display, quantitative values, and export
- Added
DicomDisplayTransformProfilefor modality LUT, rescale, VOI LUT, window selection, presentation LUT shape, MONOCHROME1 inversion, and preset suggestions. - Added stored, modality-transformed, and quantitative pixel-value accessors on
DCMDecoder. - Added Real World Value Mapping and PET SUV support through
DicomQuantitativeValueProfile,DicomRealWorldValueMap,DicomSUVMetadata, and related value/diagnostic types. - Added percentile window calculation for uncompressed native pixel data.
- Added
DicomImagePreprocessorfor UI-independent frame rendering, resizing, and explicit annotation overlays. - Added
DicomImageExportertoDicomCore, supporting PNG, JPEG, TIFF, unsigned 16-bit TIFF output, per-frame export, all-frame export, overwrite handling, and optional non-PHI JSON metadata sidecars. - Moved
dicomtoolextract and batch extraction onto the new DicomCore exporter. - Extended
dicomtool extractanddicomtool batch --operation extractwith--format jpeg,--jpeg-quality,--frame,--all-frames,--preserve-16-bit, and--metadata. - Kept
--processing-modeas a compatibility option indicomtool extract; export now uses the DicomCore frame exporter. - Removed the old executable-local
Sources/dicomtool/Utilities/ImageExporter.swift.
Series loading and decoded-series output
- Extended
DicomSeriesVolumeandDicomDecodedSerieswith study description, quantitative value profile, loaded image-instance references, and Key Object Selection documents. - Added
DicomSeriesImageInstanceto retain SOP Class UID, SOP Instance UID, study/series UID, slice index, and instance number for loaded slices. - Updated
DicomSeriesLoaderto skip non-image clinical objects such as SR, KOS, encapsulated documents, waveforms, and video when assembling image volumes. - Updated decoded-series construction so image instance metadata and KOS documents can travel with the loaded volume.
Clinical object models and builders
- Added DICOM Segmentation parsing and dataset building for binary and fractional segmentations, including segment metadata, frame references, geometry, and labelmap extraction.
- Added RT Structure Set, RT Dose, and RT Plan models for contour, dose grid, beam, and control-point inspection.
- Added Parametric Map parsing for integer, Float Pixel Data, and Double Float Pixel Data scalar layers with units, quantity definitions, Real World Value Mapping, geometry, and source references.
- Added Structured Report and Key Object Selection parsing/building for content trees, measurements, ROI/source image references, CAD findings, and key object references.
- Added Secondary Capture snapshot building/parsing with patient, study, series, image, source-reference, and device metadata.
- Added Grayscale Softcopy Presentation State models/builders for referenced images, graphic layers, annotations, displayed areas, shutters, spatial transforms, and display transforms.
- Added Encapsulated PDF, CDA, and STL document models/builders with MIME type, document title, concept name, payload, and source-instance metadata.
- Added ECG and related waveform object models/builders with channel definitions, temporal samples, sampling frequency, units, and waveform source references.
- Added video object models/builders for Endoscopic, Microscopic, and Photographic video objects, preserving MPEG-2, H.264, and H.265 encoded streams and timing metadata for caller/player handoff.
- Added external inference builders for SR findings, SEG masks, GSPS graphic annotations, and derived images, with source references and tracking identifiers.
- Added print-management models for film session, film box, image box, print jobs, and print queue state.
- Added Modality Worklist and MPPS request/result models for workflow metadata.
Networking and interoperability
- Added DIMSE association, PDU, presentation-context, command-set, and TCP transport primitives.
- Added
DicomDIMSEServiceSCUoperations for C-ECHO, C-FIND, Modality Worklist C-FIND, C-MOVE, C-GET, C-STORE, MPPS create/update, and print-job submission. - Added Storage SCP support with file-backed storage, association handling, storage commitment tracking, store-and-forward queueing, and a basic listener wrapper.
- Added DICOMweb client support for QIDO-RS study search, WADO-RS metadata/object/frame retrieval, WADO-URI retrieval, and STOW-RS storage.
- Added an in-memory DICOMweb server/transport for local tests and embedded integration flows.
- Added network resilience helpers for TLS configuration metadata, user identity negotiation models, retry policy, circuit breaker state, audit events, and bandwidth-limited transports.
- Added opt-in Orthanc/dcm4chee interop smoke tests under
Scripts/interop/; normal unit tests skip these unlessDICOM_INTEROP_SMOKE=1.
Documentation and tests
- Expanded README coverage for export formats, frame selection, metadata sidecars, supported transfer syntaxes, runtime codec limits, quantitative values, clinical objects, and known limitations.
- Expanded DocC landing, conformance, architecture, and performance documentation for the new APIs and runtime codec model.
- Added clinical performance budget documentation and test support for budget warning/failure thresholds, environment metadata, and peak resident memory reporting where available.
- Added public API documentation policy/gate tests.
- Added unit coverage for the new dataset, writer, DICOMDIR, frame access, encapsulated pixel data, enhanced multiframe, display transform, color conversion, export, preprocessing, compression, quantitative, clinical object, networking, DICOMweb, interop, and performance-budget surfaces.
Operational notes
- CharLS and OpenJPEG are loaded dynamically when present; related JPEG-LS and JPEG 2000 paths report diagnostics or return unsupported-path errors when the runtime backend is unavailable.
- JPIP support models referenced pixel data and progressive update delivery, but the application supplies the actual transport.
- Video objects expose encoded streams and timing metadata; they are not decoded into rendered video frames by DicomCore.
- Waveform objects expose temporal samples and metadata; they are not converted into image-volume slices by
DicomSeriesLoader. - The interop smoke harness starts external archive containers and is intentionally opt-in.
DICOM-Decoder 1.1.4
Changes since 1.1.3.
Compare: 1.1.3...1.1.4
- Added
patientNametoDicomSeriesVolume, preserving the DICOM Patient Name value on loaded series volumes. - Added
patientNametoDicomDecodedSeries, with an empty-string default for cases where no patient name is available. - Propagated
patientNamewhen converting aDicomSeriesVolumeinto a decoded series. - Updated
DicomSeriesLoaderto read.patientNamefrom decoder metadata and pass it through both volume construction paths.
The tag contains only focused DicomCore source changes; there are no package manifest, benchmark, documentation, or test fixture changes in this release.
DICOM-Decoder 1.1.3
Changes since 1.1.2.
Compare: 1.1.2...1.1.3
- Updated documented build requirement to Xcode 15.
- Clarified benchmark documentation: checked-in results are reference data, and benchmark gating depends on the configured local/CI workflow.
- Clarified migration guide wording around planned v2.0.0 removals.
- Updated thread-safety notes to reflect synchronized public
DCMDecoderaccess and isolated decoders for concurrent batch work.
No library implementation or package API changes.
DICOM-Decoder 1.1.2
DICOM-Decoder 1.1.2
These notes cover the changes since the last previously published release, 1.0.1. The short-lived 1.1.1 release object was removed after discovering a volume geometry regression. Tag 1.1.2 is the intended replacement release.
Compare: 1.0.1...1.1.2
Summary
This release expands DICOM-Decoder from a single-file/image decoder into a broader Swift DICOM toolkit. It adds directory and ZIP series loading, volume assembly, DICOM geometry handling, async and batch APIs, a SwiftUI component module, a command-line tool, broader documentation, benchmarking infrastructure, and substantially expanded tests.
The final patch in this release fixes the release-blocking geometry issue: when the real slice center-to-center distance derived from ImagePositionPatient differs from tag-derived Z spacing, volume reconstruction now uses the IPP deltas. SliceThickness is nominal and can differ from the physical distance between adjacent slice centers.
DICOM geometry and series loading
- Added
DicomDecodedSeriesandDicomSeriesLoaderAPIs for loading a DICOM directory, ZIP archive, or individual DICOM source into a contiguous decoded series. - Added ZIP source handling through ZIPFoundation, with temporary extraction and cleanup coverage.
- Added slice ordering by projecting
ImagePositionPatientonto the normal derived fromImageOrientationPatient, with fallback behavior for series where positional metadata is absent. - Added geometry extraction for
ImageOrientationPatient,ImagePositionPatient,PixelSpacing, slice spacing/thickness, origin, row/column direction vectors, and dimensions. Added volume assembly for single-channel 16-bit series, preserving signed and unsigned data paths and producing raw and modality-adjusted buffers where appropriate. - Added progress and warning reporting for decoded series loads.
- Added validation for inconsistent series geometry, unsupported pixel formats, missing DICOM files, empty sources, and unsafe ZIP input.
- Fixed Z spacing selection for volume reconstruction: reliable IPP-derived spacing now overrides nominal tag-derived spacing when both are present. Tag-derived spacing remains the fallback when IPP deltas cannot be computed.
- Added regression coverage for the case where tag-derived Z spacing is
2.0but IPP slice centers are spaced at1.0.
Decoder API modernization
- Split the decoder implementation into focused files for loading, metadata, pixels, range pixels, validation, async access, V2 value APIs, DICOM tag APIs, and legacy compatibility.
- Added throwing initializers and static factory methods for clearer error handling.
- Added async/await loading paths and async initializers for non-blocking use in applications.
- Added batch loading APIs and protocol-oriented service interfaces.
- Added type-safe metadata access through
DicomTagwhile preserving raw-tag access for custom and private tags. - Added structured value types such as window settings, pixel spacing, rescale parameters, geometry values, and related Codable support.
- Added richer DICOM error cases and validation status reporting.
- Added patient/study/series model helpers and metadata grouping utilities.
- Renamed the Swift package to
DICOMDecoderwhile keeping the publicDicomCoreproduct.
Pixel access, transfer syntaxes, and memory behavior
- Kept native JPEG Lossless support and refactored the implementation into marker parsing, prediction, pixel decoding, Huffman, bitstream, and shared type components.
- Expanded JPEG Lossless tests for prediction selection values, marker parsing, byte stuffing, truncated data, invalid tables, and conformance fixture hooks.
- Added best-effort compressed pixel support paths around existing decoder capabilities.
- Added range-based pixel access for 8-bit, 16-bit, and 24-bit data so callers can process regions without always materializing full images.
- Added memory-mapped data streaming behavior for large inputs.
- Added downsampling helpers for preview and thumbnail workflows.
- Added explicit handling and tests for endian conversion, signed pixel normalization, MONOCHROME1 inversion, and RGB access paths.
- Added buffer pooling and memory-pressure handling utilities to reduce repeated large allocations in series and pixel workloads.
Windowing and image processing
- Expanded
DCMWindowingProcessorwith batch processing, statistics, named presets, preset suggestions, and enhancement helpers. - Added vDSP-based CPU windowing as the baseline path.
- Added Metal-backed windowing support with fallback behavior when Metal is not available.
- Added benchmark tooling for comparing vDSP and Metal windowing.
- Added Hounsfield conversion helpers, automatic window suggestions, quality metrics, histogram equalization helpers, and noise-reduction helpers.
- Split DICOM dictionary resources into core, imaging, and RT/specialized dictionaries.
SwiftUI module and example app
- Added the
DicomSwiftUIproduct with image display, metadata display, series navigation, and windowing controls. - Added view models for image display, series navigation, windowing, and preview data.
- Added rendering utilities for converting decoded DICOM pixels into displayable images.
- Added preview helpers and mock decoder support for SwiftUI previews and tests.
- Added a runnable
DicomSwiftUIExampletarget with document picking, study browsing, metadata, image, series, and windowing examples.
Command-line tool
- Added the
dicomtoolexecutable. - Added commands for inspection, validation, extraction, and batch workflows.
- Added CLI output formatting, image export utilities, validation issue classification, and smoke/integration tests.
Documentation and developer tooling
- Expanded the README, getting started guide, usage examples, glossary, and troubleshooting documentation.
- Added DocC articles, tutorials, and sample code for core decoding, series loading, migration, performance, and window/level workflows.
- Added benchmark documentation and scripts for repeatable performance reports.
- Added release process documentation and VS Code launch configuration.
- Updated CI scheme detection and package workflow handling during the development cycle.
Testing
- Added extensive unit, integration, performance, protocol, SwiftUI, CLI, series loading, JPEG Lossless, metadata, windowing, and memory-pool coverage.
- Validation used for this release:
swift test- Result: 1698 tests executed, 9 skipped, 0 failures.
Compatibility notes
- Products in this release:
DicomCoreDicomSwiftUIdicomtoolDicomSwiftUIExample
- Supported package platforms remain iOS 13+ and macOS 12+.
- The decoder remains a research/prototype toolkit and is not clinical validation or regulatory clearance.
- Some optional JPEG Lossless conformance tests skip unless external compressed DICOM fixtures are supplied.
DICOM-Decoder 1.0.1
1.0.1 - DICOM Streaming & Security Enhancements
New Features
-
Add range-based pixel access methods to enable efficient streaming of DICOM image data without loading entire files into memory
-
Implement JPEG Lossless decoder with full specification support including Huffman table decoding, first-order predictor, and bit unpacking
-
Introduce DicomDecoderProtocol and dependency injection patterns for improved testability and modularity across FileImportService, StudyDataService, and DicomSeriesLoader
Improvements
-
Refactor DICOM decoder with modular reader architecture and async support for better separation of concerns
-
Optimize range-based reading for memory-mapped file access to improve performance with large DICOM datasets
-
Replace print statements with logger.debug for consistent diagnostic output in DCMDictionary
Bug Fixes
-
Add comprehensive security validation including bounds checking, sequence depth tracking, pixel buffer allocation validation, and malicious length detection to prevent stack overflow and buffer overflow attacks
-
Guard reference decoder test on macOS to handle platform-specific compatibility issues
Swift DICOM Decoder 1.0.0
What's new
- Swift-only DICOM decoding core extracted from the legacy viewer
- Metadata accessors, study/patient helpers, and window/level utilities
- Bundled DICOM tag dictionary resources for runtime lookups
- Distributed as a SwiftPM library with initial XCTest coverage