Class JBIG2Bitmap

java.lang.Object
org.jpedal.jbig2.image.JBIG2Bitmap

public final class JBIG2Bitmap extends Object

JBIG2Bitmap class.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    org.jpedal.jbig2.image.JBIG2Bitmap.FastBitSet
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    JBIG2Bitmap(int width, int height, ArithmeticDecoder arithmeticDecoder, HuffmanDecoder huffmanDecoder, MMRDecoder mmrDecoder)
    Constructor for JBIG2Bitmap.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    clear(int defPixel)
    clear.
    void
    combine(JBIG2Bitmap bitmap, int x, int y, long combOp)
    combine.
    void
    expand(int newHeight, int defaultPixel)
    expand.
    getBufferedImage.
    byte[]
    getData(boolean switchPixelColor)
    Getter for the field data.
    int
    getPixel(int col, int row)
    getPixel.
    getSlice(int x, int y, int width, int height)
    getSlice.
    void
    readBitmap(boolean useMMR, int template, boolean typicalPredictionGenericDecodingOn, boolean useSkip, JBIG2Bitmap skipBitmap, short[] adaptiveTemplateX, short[] adaptiveTemplateY, int mmrDataLength)
    readBitmap.
    void
    readGenericRefinementRegion(int template, boolean typicalPredictionGenericRefinementOn, JBIG2Bitmap referredToBitmap, int referenceDX, int referenceDY, short[] adaptiveTemplateX, short[] adaptiveTemplateY)
    readGenericRefinementRegion.
    void
    readTextRegion(boolean huffman, boolean symbolRefine, int noOfSymbolInstances, int logStrips, int noOfSymbols, int[][] symbolCodeTable, int symbolCodeLength, JBIG2Bitmap[] symbols, int defaultPixel, int combinationOperator, boolean transposed, int referenceCorner, int sOffset, int[][] huffmanFSTable, int[][] huffmanDSTable, int[][] huffmanDTTable, int[][] huffmanRDWTable, int[][] huffmanRDHTable, int[][] huffmanRDXTable, int[][] huffmanRDYTable, int[][] huffmanRSizeTable, int template, short[] symbolRegionAdaptiveTemplateX, short[] symbolRegionAdaptiveTemplateY, JBIG2StreamDecoder decoder)
    readTextRegion.
    void
    setPixel(int col, int row, int value)
    setPixel.

    Methods inherited from class java.lang.Object

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

    • data

      public org.jpedal.jbig2.image.JBIG2Bitmap.FastBitSet data
  • Constructor Details

  • Method Details

    • readBitmap

      public void readBitmap(boolean useMMR, int template, boolean typicalPredictionGenericDecodingOn, boolean useSkip, JBIG2Bitmap skipBitmap, short[] adaptiveTemplateX, short[] adaptiveTemplateY, int mmrDataLength) throws IOException, JBIG2Exception

      readBitmap.

      Parameters:
      useMMR - a boolean.
      template - a Integer object.
      typicalPredictionGenericDecodingOn - a boolean.
      useSkip - a boolean.
      skipBitmap - a JBIG2Bitmap object.
      adaptiveTemplateX - an array of
      invalid reference
      short
      objects.
      adaptiveTemplateY - an array of
      invalid reference
      short
      objects.
      mmrDataLength - a Integer object.
      Throws:
      IOException - if any.
      JBIG2Exception - if any.
    • readGenericRefinementRegion

      public void readGenericRefinementRegion(int template, boolean typicalPredictionGenericRefinementOn, JBIG2Bitmap referredToBitmap, int referenceDX, int referenceDY, short[] adaptiveTemplateX, short[] adaptiveTemplateY) throws IOException, JBIG2Exception

      readGenericRefinementRegion.

      Parameters:
      template - a Integer object.
      typicalPredictionGenericRefinementOn - a boolean.
      referredToBitmap - a JBIG2Bitmap object.
      referenceDX - a Integer object.
      referenceDY - a Integer object.
      adaptiveTemplateX - an array of
      invalid reference
      short
      objects.
      adaptiveTemplateY - an array of
      invalid reference
      short
      objects.
      Throws:
      IOException - if any.
      JBIG2Exception - if any.
    • readTextRegion

      public void readTextRegion(boolean huffman, boolean symbolRefine, int noOfSymbolInstances, int logStrips, int noOfSymbols, int[][] symbolCodeTable, int symbolCodeLength, JBIG2Bitmap[] symbols, int defaultPixel, int combinationOperator, boolean transposed, int referenceCorner, int sOffset, int[][] huffmanFSTable, int[][] huffmanDSTable, int[][] huffmanDTTable, int[][] huffmanRDWTable, int[][] huffmanRDHTable, int[][] huffmanRDXTable, int[][] huffmanRDYTable, int[][] huffmanRSizeTable, int template, short[] symbolRegionAdaptiveTemplateX, short[] symbolRegionAdaptiveTemplateY, JBIG2StreamDecoder decoder) throws JBIG2Exception, IOException

      readTextRegion.

      Parameters:
      huffman - a boolean.
      symbolRefine - a boolean.
      noOfSymbolInstances - a Integer object.
      logStrips - a Integer object.
      noOfSymbols - a Integer object.
      symbolCodeTable - an array of
      invalid reference
      int
      objects.
      symbolCodeLength - a Integer object.
      symbols - an array of JBIG2Bitmap objects.
      defaultPixel - a Integer object.
      combinationOperator - a Integer object.
      transposed - a boolean.
      referenceCorner - a Integer object.
      sOffset - a Integer object.
      huffmanFSTable - an array of
      invalid reference
      int
      objects.
      huffmanDSTable - an array of
      invalid reference
      int
      objects.
      huffmanDTTable - an array of
      invalid reference
      int
      objects.
      huffmanRDWTable - an array of
      invalid reference
      int
      objects.
      huffmanRDHTable - an array of
      invalid reference
      int
      objects.
      huffmanRDXTable - an array of
      invalid reference
      int
      objects.
      huffmanRDYTable - an array of
      invalid reference
      int
      objects.
      huffmanRSizeTable - an array of
      invalid reference
      int
      objects.
      template - a Integer object.
      symbolRegionAdaptiveTemplateX - an array of
      invalid reference
      short
      objects.
      symbolRegionAdaptiveTemplateY - an array of
      invalid reference
      short
      objects.
      decoder - a JBIG2StreamDecoder object.
      Throws:
      JBIG2Exception - if any.
      IOException - if any.
    • clear

      public void clear(int defPixel)

      clear.

      Parameters:
      defPixel - a Integer object.
    • combine

      public void combine(JBIG2Bitmap bitmap, int x, int y, long combOp)

      combine.

      Parameters:
      bitmap - a JBIG2Bitmap object.
      x - a Integer object.
      y - a Integer object.
      combOp - a long.
    • getData

      public byte[] getData(boolean switchPixelColor)

      Getter for the field data.

      Parameters:
      switchPixelColor - a boolean.
      Returns:
      an array of
      invalid reference
      byte
      objects.
    • getSlice

      public JBIG2Bitmap getSlice(int x, int y, int width, int height)

      getSlice.

      Parameters:
      x - a Integer object.
      y - a Integer object.
      width - a Integer object.
      height - a Integer object.
      Returns:
      a JBIG2Bitmap object.
    • setPixel

      public void setPixel(int col, int row, int value)

      setPixel.

      Parameters:
      col - a Integer object.
      row - a Integer object.
      value - a Integer object.
    • getPixel

      public int getPixel(int col, int row)

      getPixel.

      Parameters:
      col - a Integer object.
      row - a Integer object.
      Returns:
      a Integer object.
    • expand

      public void expand(int newHeight, int defaultPixel)

      expand.

      Parameters:
      newHeight - a Integer object.
      defaultPixel - a Integer object.
    • getBufferedImage

      public BufferedImage getBufferedImage()

      getBufferedImage.

      Returns:
      a BufferedImage object.