Skip to content

Releases: Raster-Lab/DICOMKit

DICOMKit v2.2.0 — CLI Parity Harness & JPEG XL Lossy/Recompression

Choose a tag to compare

@SureshKViswanathan SureshKViswanathan released this 04 Jul 12:49

Highlights

This release merges the feature/cli-parity-harness branch into main: a large batch of shared-core CLI/App parity work, new codec support, and a round-trip regression suite.

CLI ↔ App Parity (shared core, no more drift)

  • Hoisted every remaining hand-duplicated console block and directory walk into shared DICOMKit/DICOMNetwork/DICOMWeb types used by both the CLI binaries and the DICOMStudio Workshop: AnonConsole, PixelEditConsole, ImageConsole, ExportConsole, UIDConsole, UPSConsole, ConvertConsole, TagEditConsole, QRSessionState, DataExchangeWorkflow, FileGatherer, CompressionConsole, DICOMConverter, DICOMDIRDumpFormatter, DICOMDIRWorkflow, EncapsulatedDocumentWorkflow, NetworkConsoleFormatter, WADORetrieveConsoleFormatter, STOWResultFormatter, UPSResultFormatter.
  • Full network + DICOMweb CLI parity harness: QR, Retrieve, WADO (RS/URI), MWL, MPPS, and UPS-RS (full operation matrix + global subscribe).
  • Fixed real drift found while hoisting: pixedit double-print, anon verbose/exit-code divergence, UPS response wording, dicom-merge sort order, dicom-mpps N-CREATE status guard, HL7 ORM^O01 field placement, WADO-URI endpoint resolution.
  • Implemented previously inert flags: dicom-merge --format enhanced-ct/mr/xa, dicom-script run --parallel, dicom-compress --backend, dicom-image --use-exif with --split-pages, dicom-dcmdir update, dicom-query --referring-physician.
  • Removed declared no-ops: dicom-json --format standard|dicomweb and --stream.

New Codec Support

  • JPEG XL lossy encode (…4.112) in dicom-compress via JXLSwift VarDCT.
  • JPEG XL JPEG recompression (…4.111) in dicom-convert — byte-identical JPEG reconstruction.
  • J2KSwift v3.2.0 integration; JLISwift/JXLSwift promoted to full registry codecs.

Fixes

  • DICOMWriter no longer drops encapsulated (compressed) pixel data on transcode.
  • DICOMFile.pixelData() no longer relabels YBR as RGB.
  • JPEG-LS NEAR parameter overflow fixed for 16-bit sources.
  • PixelEditor now decodes encapsulated sources before editing (handles multi-frame).
  • dicom-pixedit --invert no longer renders solid white (VOI window now inverted correctly).

Testing

  • New DICOMRoundTripTest oracle-based regression suite (393 tests) covering all local dicom-* tools against a real anonymized corpus.
  • New DICOMKitTests parity/regression suite; Network CLI & DICOMweb test coverage expanded.

Also Included

  • Network Utility panel with live-streaming terminal output.
  • DICOM Standard Edition update.

See CHANGELOG.md for the full itemized history.

v2.1.0 — DICOMStudio enhancements

Choose a tag to compare

@SureshKViswanathan SureshKViswanathan released this 22 May 00:39

DICOMStudio enhancements.

J2K Test Bench (new)

A first-class System ▸ J2K Test Bench destination, replacing the old J2KSwift testing sheet. A corpus-driven codec workflow across four tabs — Setup · Results · Performance · History:

  • Build a fixture corpus, then run a transfer-syntax × codec matrix.
  • Every cell is scored with real pass/fail criteria — bit-exact reconstruction for lossless syntaxes, a PSNR threshold for lossy.
  • Results: a decoded-image gallery with a full-resolution lightbox (amplified difference view), a Speed Winner scoreboard, and SwiftUI charts of decode speed, scaling, and compression.
  • Runs persist with regression deltas against a chosen baseline and the published CROSS_HOST numbers; export to CSV / Markdown.

Responsive layout

The window is freely resizable and ~31 hardcoded size constraints across the UI were relaxed, so panels and sheets adapt to any display.

Imaging-first navigation

The flat 16-item sidebar is grouped into collapsible Imaging / Network / Data & Tools / System categories.


Built against J2KSwift 10.9.3.

DICOMKit v2.0.0

Choose a tag to compare

@SureshKViswanathan SureshKViswanathan released this 21 May 11:41

DICOMKit v2.0.0

Adopts the J2KSwift v10.x line via a standard SwiftPM URL dependency.

⚠️ Breaking changes

  • Minimum iOS raised to 18 (was 17). Apps still targeting iOS 17 cannot adopt this release. macOS 15 / visionOS 1 minimums are unchanged. The bump is required by J2KSwift v10.x.

Changed

  • J2KSwift dependency: 5.21.010.9.3, consumed via .package(url:). DICOMKit was previously pinned to the J2KSwift 5.x line because J2KSwift v8.0–v10.9.2 carried a .package(path: "../CompressionFamily") in their manifest that broke SwiftPM URL resolution (Raster-Lab/J2KSwift#438). J2KSwift v10.9.3 resolves CompressionFamily from its public Git URL, so DICOMKit can now consume the v10.x line — with its HTJ2K / JP3D / Metal-accelerated decode improvements — through a normal URL dependency. No local sibling checkout or path override required.

Verification

  • swift build -c release — clean.
  • The full J2K codec surface is verified: J2KSwiftCodecTests, HTJ2KTests, HTJ2KOpenJPHComparisonTests, J2KSwiftCodecBenchmarkTests, J2KvsHTJ2KCompressionReportTests, JP3DCodecTests, KakaduJ2KSwiftSampleStudiesTests, DICOMStudioPanelSubstituteTests all pass.

Known issue

  • #186 — the full swift test run hangs in DICOMStudio's FileOperationsServiceTests, a non-J2K test suite. It reproduces both parallel and serialized; the J2K codec surface is unaffected (all codec suites pass standalone). Tracked in #186 and slated for a focused fix.

🤖 Generated with Claude Code

DICOMKit v1.1.0

Choose a tag to compare

@SureshKViswanathan SureshKViswanathan released this 21 May 05:06

DICOMKit v1.1.0

J2K Compare panel (DICOMStudio)

  • Encode + decode mode pickers — exercise J2KSwift's CPU decode vs decodeGPU vs decodeWithGPUHT (and CPU encode vs encodeGPU) on a chosen transfer syntax, with median-of-7-after-2-warmups timing matching J2KSwift's published cross-host benchmark methodology.
  • Kakadu / Grok CLI codec adapters — decode-only cross-checks against locally-installed kdu_expand / grk_decompress (macOS). Surface as extra rows in the comparison table when the binaries are present.
  • New Encode column and per-row route badges; image-viewer metadata overlay now shows the reviewed file's path.

Bug fixes

JPEG-LS codec (JPEGLSCodec)

  • encodeRunLength emitted nothing for a zero-length run, desyncing the bitstream from the first flat pixel — every run-mode image decoded to garbage. Now always emits the terminating bit per ITU-T T.87 A.7.1.2.
  • The Golomb-Rice escape path was inconsistent between encoder and decoder (threshold, terminator, field width). Rewritten with the limited-length Golomb structure. All 24 JPEG-LS tests pass.

HTJ2K — the HTJ2K-lossy 16-bit path no longer throws; the obsolete xfail test was rewritten to verify the round-trip.

Test-runner crash#expect on an optional existential metatype crashed the Swift runtime's metadata cache (SIGSEGV); reworked so the full suite runs to completion.

DICOMweb

  • gzip/deflate round-trips were broken — COMPRESSION_ZLIB produces raw DEFLATE, but the code treated it as zlib-wrapped (bad byte stripping, a bogus prepended header, and an undersized decode buffer). Fixed.
  • DICOM-XML encoder dropped SQ sequence elements entirely (empty valueData heuristic).
  • UPS Workitem JSON round-trip lost Input/Output Information — the reader looked for SOP UIDs at the wrong nesting level (PS3.3 Table 10-3a).

Other — DICOM-XML PersonName now trims trailing empty components; private-tag block-number expectation corrected to DICOM PS3.5 §7.8.1.

Notes

  • Full regression suite: 6507 tests / 632 suites green.
  • NativeJPEG2000Codec (Apple ImageIO) remains deprecated — its 12-bit grayscale limitation is tracked as a known issue; use J2KSwiftCodec / HTJ2KCodec.

🤖 Generated with Claude Code