Pixel operations

JPEG2000 compression

Compress pixel data with JPEG 2000 Lossless, HTJ2K Lossless or lossy JPEG 2000.

Browser: available nowmacOS app: 1.4.0 or newer

Make a series smaller without changing a single pixel value, in the JPEG 2000 family. High-Throughput JPEG 2000 (HTJ2K) encodes and decodes faster than classic JPEG 2000.

Steps

  1. Open a series with uncompressed pixel data (⌘O).
  2. Open the command palette (⌘K / Ctrl+K) and run Compress series to JPEG 2000 Lossless or Compress series to HTJ2K Lossless.
  3. Wait for the loading indicator to clear. Every instance of the active series is re-encoded.
  4. In Edit mode, the Transfer Syntax UID (0002,0010) reads 1.2.840.10008.1.2.4.90 (JPEG 2000) or 1.2.840.10008.1.2.4.201 (HTJ2K).
  5. Save or export the files. Undo (⌘Z) returns the series to its previous encoding.

JPEG 2000 (lossy)

Run Compress series to JPEG 2000 (lossy)… where exact values do not matter. A confirmation dialog warns that pixel values change for good and asks for a target compression ratio from 2:1 to 50:1 (default 10:1). Cancel leaves the series as it was. After you confirm, the Transfer Syntax UID reads 1.2.840.10008.1.2.4.91, and each instance is marked lossy (0028,2110 to 0028,2114), set to Image Type DERIVED and given a new SOP Instance UID. Colour coded with the irreversible colour transform is labelled YBR_ICT.

Limits

  • Bits Allocated must be 8 or 16, and colour data must be 8-bit RGB. Signed data is accepted, except that JPEG 2000 (lossless and lossy) refuses signed data with 8 or fewer bits stored. HTJ2K accepts it.
  • 16-bit samples with 8 or fewer bits stored are written at the stored precision. Bits Allocated stays 16.
  • When JPEG 2000 applies its reversible colour transform to RGB data, Photometric Interpretation becomes YBR_RCT, as the DICOM standard requires.
  • Each lossless frame is decoded again after encoding and compared with the source, byte for byte. Each lossy frame is decoded again and must reach a PSNR of 30 dB or more against the source. If any frame fails, nothing is changed and a notice says why.
  • Lossy JPEG 2000 refuses palette colour and images smaller than 8 × 8.

Result

The active series uses JPEG 2000 Lossless, HTJ2K Lossless or lossy JPEG 2000, one fragment per frame. The lossless syntaxes decode to the original stored pixel values; lossy JPEG 2000 decodes to values within the 30 dB PSNR bound.