Class JPEGXRServiceImpl

java.lang.Object
loci.common.services.AbstractService
loci.formats.services.JPEGXRServiceImpl
All Implemented Interfaces:
loci.common.services.Service, JPEGXRService

public class JPEGXRServiceImpl extends loci.common.services.AbstractService implements JPEGXRService
Interface defining methods for working with JPEG-XR data
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final short
     
    private static final short
     
    private static final short
     
    private static final org.slf4j.Logger
     
    private static final short
     
    private static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    decompress(byte[] compressed)
    Decompress the given JPEG-XR compressed byte array and return as a byte array.
    private int
    getBGRComponents(short[] format)
     
    private short[]
    getPixelFormat(byte[] stream)
     
    private boolean
    isBGR(short[] format)
     

    Methods inherited from class loci.common.services.AbstractService

    checkClassDependency

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • JPEGXRServiceImpl

      public JPEGXRServiceImpl()
  • Method Details

    • decompress

      public byte[] decompress(byte[] compressed) throws FormatException
      Description copied from interface: JPEGXRService
      Decompress the given JPEG-XR compressed byte array and return as a byte array. Opening and closing of decoders and streams is handled internally.
      Specified by:
      decompress in interface JPEGXRService
      Parameters:
      compressed - the complete JPEG-XR compressed data
      Returns:
      raw decompressed bytes
      Throws:
      FormatException - if an error occurs during decompression
      See Also:
    • getPixelFormat

      private short[] getPixelFormat(byte[] stream) throws FormatException, IOException
      Throws:
      FormatException
      IOException
    • isBGR

      private boolean isBGR(short[] format)
    • getBGRComponents

      private int getBGRComponents(short[] format)