Enum Class TiffCompression

java.lang.Object
java.lang.Enum<TiffCompression>
loci.formats.tiff.TiffCompression
All Implemented Interfaces:
Serializable, Comparable<TiffCompression>, java.lang.constant.Constable, loci.common.enumeration.CodedEnum

public enum TiffCompression extends Enum<TiffCompression> implements loci.common.enumeration.CodedEnum
Utility class for performing compression operations with a TIFF file.
Author:
Curtis Rueden ctrueden at wisc.edu, Eric Kjellman egkjellman at wisc.edu, Melissa Linkert melissa at glencoesoftware.com, Chris Allan callan at blackcat.ca
  • Enum Constant Details

  • Method Details

    • values

      public static TiffCompression[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TiffCompression valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public static TiffCompression get(int code)
      Retrieves a TIFF compression instance by code.
      Parameters:
      code - Integer "code" for the TIFF compression type.
      Returns:
      See above.
    • getCode

      public int getCode()
      Specified by:
      getCode in interface loci.common.enumeration.CodedEnum
    • getCodecName

      public String getCodecName()
      Retrieves the name of the TIFF compression codec.
      Returns:
      See above.
    • getCodec

      public loci.formats.codec.Codec getCodec()
      Returns:
      the codec instance for this TIFF compression.
    • decompress

      public byte[] decompress(byte[] input, loci.formats.codec.CodecOptions options) throws loci.formats.FormatException, IOException
      Decodes a strip of data.
      Throws:
      loci.formats.FormatException
      IOException
    • undifference

      public static void undifference(byte[] input, IFD ifd) throws loci.formats.FormatException
      Undoes in-place differencing according to the given predictor value.
      Throws:
      loci.formats.FormatException
    • getCompressionCodecOptions

      public loci.formats.codec.CodecOptions getCompressionCodecOptions(IFD ifd) throws loci.formats.FormatException
      Creates a set of codec options for compression.
      Parameters:
      ifd - The IFD to create codec options for.
      Returns:
      A new codec options instance populated using metadata from ifd.
      Throws:
      loci.formats.FormatException
    • getCompressionCodecOptions

      public loci.formats.codec.CodecOptions getCompressionCodecOptions(IFD ifd, loci.formats.codec.CodecOptions opt) throws loci.formats.FormatException
      Creates a set of codec options for compression.
      Parameters:
      ifd - The IFD to create codec options for.
      opt - The codec options to copy.
      Returns:
      A new codec options instance populated using metadata from ifd.
      Throws:
      loci.formats.FormatException
    • compress

      public byte[] compress(byte[] input, loci.formats.codec.CodecOptions options) throws loci.formats.FormatException, IOException
      Encodes a strip of data.
      Throws:
      loci.formats.FormatException
      IOException
    • difference

      public static void difference(byte[] input, IFD ifd) throws loci.formats.FormatException
      Performs in-place differencing according to the given predictor value.
      Throws:
      loci.formats.FormatException