Class TextRegion

  • All Implemented Interfaces:
    Region, SegmentData

    public class TextRegion
    extends java.lang.Object
    implements Region
    This class represented the segment type "Text region", 7.4.3, page 56.
    • Field Detail

      • sbrTemplate

        private short sbrTemplate
        Text region segment flags, 7.4.3.1.1
      • sbdsOffset

        private short sbdsOffset
      • defaultPixel

        private short defaultPixel
      • isTransposed

        private short isTransposed
      • referenceCorner

        private short referenceCorner
      • logSBStrips

        private short logSBStrips
      • useRefinement

        private boolean useRefinement
      • isHuffmanEncoded

        private boolean isHuffmanEncoded
      • sbHuffRSize

        private short sbHuffRSize
        Text region segment Huffman flags, 7.4.3.1.2
      • sbHuffRDY

        private short sbHuffRDY
      • sbHuffRDX

        private short sbHuffRDX
      • sbHuffRDHeight

        private short sbHuffRDHeight
      • sbHuffRDWidth

        private short sbHuffRDWidth
      • sbHuffDT

        private short sbHuffDT
      • sbHuffDS

        private short sbHuffDS
      • sbHuffFS

        private short sbHuffFS
      • sbrATX

        private short[] sbrATX
        Text region refinement AT flags, 7.4.3.1.3
      • sbrATY

        private short[] sbrATY
      • amountOfSymbolInstances

        private long amountOfSymbolInstances
        Number of symbol instances, 7.4.3.1.4
      • currentS

        private long currentS
        Further parameters
      • sbStrips

        private int sbStrips
      • amountOfSymbols

        private int amountOfSymbols
      • regionBitmap

        private Bitmap regionBitmap
      • symbols

        private java.util.ArrayList<Bitmap> symbols
      • cxIADT

        private CX cxIADT
      • cxIAFS

        private CX cxIAFS
      • cxIADS

        private CX cxIADS
      • cxIAIT

        private CX cxIAIT
      • cxIARI

        private CX cxIARI
      • cxIARDW

        private CX cxIARDW
      • cxIARDH

        private CX cxIARDH
      • cxIAID

        private CX cxIAID
      • cxIARDX

        private CX cxIARDX
      • cxIARDY

        private CX cxIARDY
      • cx

        private CX cx
      • symbolCodeLength

        private int symbolCodeLength
        codeTable including a code to each symbol used in that region
      • fsTable

        private HuffmanTable fsTable
        User-supplied tables *
    • Method Detail

      • readRegionFlags

        private void readRegionFlags()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • readHuffmanFlags

        private void readHuffmanFlags()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readUseRefinement

        private void readUseRefinement()
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • readAmountOfSymbolInstances

        private void readAmountOfSymbolInstances()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • computeSymbolCodeLength

        private void computeSymbolCodeLength()
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • setCodingStatistics

        private void setCodingStatistics()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • createRegionBitmap

        private void createRegionBitmap()
      • decodeStripT

        private long decodeStripT()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeSymbolInstances

        private void decodeSymbolInstances()
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeDT

        private long decodeDT()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeDfS

        private long decodeDfS()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeIdS

        private long decodeIdS()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeCurrentT

        private long decodeCurrentT()
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeID

        private long decodeID()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeRI

        private long decodeRI()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeIb

        private Bitmap decodeIb​(long r,
                                long id)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeRdw

        private long decodeRdw()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeRdh

        private long decodeRdh()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeRdx

        private long decodeRdx()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeRdy

        private long decodeRdy()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • decodeSymInRefSize

        private long decodeSymInRefSize()
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • blit

        private void blit​(Bitmap ib,
                          long t)
      • getUserTable

        private HuffmanTable getUserTable​(int tablePosition)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • symbolIDCodeLengths

        private void symbolIDCodeLengths()
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • setContexts

        protected void setContexts​(CX cx,
                                   CX cxIADT,
                                   CX cxIAFS,
                                   CX cxIADS,
                                   CX cxIAIT,
                                   CX cxIAID,
                                   CX cxIARDW,
                                   CX cxIARDH,
                                   CX cxIARDX,
                                   CX cxIARDY)
      • setParameters

        protected void setParameters​(ArithmeticDecoder arithmeticDecoder,
                                     ArithmeticIntegerDecoder iDecoder,
                                     boolean isHuffmanEncoded,
                                     boolean sbRefine,
                                     int sbw,
                                     int sbh,
                                     long sbNumInstances,
                                     int sbStrips,
                                     int sbNumSyms,
                                     short sbDefaultPixel,
                                     short sbCombinationOperator,
                                     short transposed,
                                     short refCorner,
                                     short sbdsOffset,
                                     short sbHuffFS,
                                     short sbHuffDS,
                                     short sbHuffDT,
                                     short sbHuffRDWidth,
                                     short sbHuffRDHeight,
                                     short sbHuffRDX,
                                     short sbHuffRDY,
                                     short sbHuffRSize,
                                     short sbrTemplate,
                                     short[] sbrATX,
                                     short[] sbrATY,
                                     java.util.ArrayList<Bitmap> sbSyms,
                                     int sbSymCodeLen)