loci.formats.codec

## Class JPEG2000CodecOptions

- java.lang.Object
- - loci.formats.codec.CodecOptions
  - - loci.formats.codec.JPEG2000CodecOptions

-     public class JPEG2000CodecOptions
      extends CodecOptions

  Options for compressing and decompressing JPEG-2000 data.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int[]` | `codeBlockSize` The maximum code-block size to use per tile-component as it would be provided to: `J2KImageWriteParam.setCodeBlockSize(int[])` (WRITE).
    `java.lang.Integer` | `numDecompositionLevels` The number of decomposition levels as would be provided to: `J2KImageWriteParam.setNumDecompositionLevels(int)` (WRITE).
    `java.lang.Integer` | `resolution` The resolution level as would be provided to: `J2KImageReadParam.setResolution(int)` (READ).
    `boolean` | `writeBox` Whether or not to write a boxed stream, i.e.

    - ### Fields inherited from class loci.formats.codec.CodecOptions

      `bitsPerSample, channels, colorModel, disableChromaSubsampling, height, interleaved, littleEndian, lossless, maxBytes, previousImage, quality, signed, tileGridXOffset, tileGridYOffset, tileHeight, tileWidth, width, ycbcr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JPEG2000CodecOptions()` Creates a new instance.
    `JPEG2000CodecOptions(CodecOptions options)` Creates a new instance with options.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JPEG2000CodecOptions` | `getDefaultOptions()` Return JPEG2000CodecOptions with reasonable default values.
    `static JPEG2000CodecOptions` | `getDefaultOptions(CodecOptions options)` Return JPEG2000CodecOptions using the given CodecOptions as the default.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### codeBlockSize

          public int[] codeBlockSize

      The maximum code-block size to use per tile-component as it would be provided to: `J2KImageWriteParam.setCodeBlockSize(int[])` (WRITE).

    - #### numDecompositionLevels

          public java.lang.Integer numDecompositionLevels

      The number of decomposition levels as would be provided to: `J2KImageWriteParam.setNumDecompositionLevels(int)` (WRITE). Leaving this value `null` signifies that when a JPEG 2000 parameter set is created for the purposes of compression the number of decomposition levels will be left as the default.

    - #### resolution

          public java.lang.Integer resolution

      The resolution level as would be provided to: `J2KImageReadParam.setResolution(int)` (READ). Leaving this value `null` signifies that when a JPEG 2000 parameter set is created for the purposes of compression the number of decomposition levels will be left as the default.

    - #### writeBox

          public boolean writeBox

      Whether or not to write a boxed stream, i.e. with SOC and SIZ markers. By default, a raw code stream is written.

  - ### Constructor Detail

    - #### JPEG2000CodecOptions

          public JPEG2000CodecOptions()

      Creates a new instance.

    - #### JPEG2000CodecOptions

          public JPEG2000CodecOptions(CodecOptions options)

      Creates a new instance with options.
      Parameters:
        `options` - The option to set.

  - ### Method Detail

    - #### getDefaultOptions

          public static JPEG2000CodecOptions getDefaultOptions()

      Return JPEG2000CodecOptions with reasonable default values.

    - #### getDefaultOptions

          public static JPEG2000CodecOptions getDefaultOptions(CodecOptions options)

      Return JPEG2000CodecOptions using the given CodecOptions as the default.
      Parameters:
        `options` - The specified options.

Copyright © 2026 Open Microscopy Environment