itkwasm_htj2k.encode_async¶

Module Contents¶

Functions¶

encode_async

Encode an ITK Image into a High Throughput JPEG2000 codestream

API¶

async itkwasm_htj2k.encode_async.encode_async(image: itkwasm.Image, decompositions: int = 5, not_reversible: bool = False, quantization_step: float = 1, progression_order: int = 2, tile_size: Optional[List[int]] = None, tile_offset: Optional[List[int]] = None, block_dimensions: Optional[List[int]] = None) bytes¶

Encode an ITK Image into a High Throughput JPEG2000 codestream

Parameters:
  • image (Image) – Input image

  • decompositions (int) – Number of wavelet decompositions

  • not_reversible (bool) – Lossy and not reversible, i.e. not lossless, encoding

  • quantization_step (float) – Quantization step size for lossy compression. Ignored unless not reversible is enabled.

  • progression_order (int) – Progression order. 0 = LRCP, 1 = RLCP, 2 = RPCL, 3 = PCRL, 4 = CPRL

  • tile_size (int) – Tile size

  • tile_offset (int) – Tile offset

  • block_dimensions (int) – Block dimensions

Returns:

Output binary HTJ2K codestream

Return type:

bytes