public class GenericRegion extends Object implements Region
| Constructor and Description |
|---|
GenericRegion() |
GenericRegion(SubInputStream subInputStream) |
| Modifier and Type | Method and Description |
|---|---|
protected short[] |
getGbAtX() |
protected short[] |
getGbAtY() |
protected byte |
getGbTemplate() |
Bitmap |
getRegionBitmap()
The procedure is described in 6.2.5.7, page 17.
|
RegionSegmentInformation |
getRegionInfo()
Simply returns the
RegionSegmentInformation. |
void |
init(SegmentHeader header,
SubInputStream sis)
Parse the stream and read information of header.
|
protected boolean |
isMMREncoded() |
protected boolean |
isTPGDon() |
protected void |
resetBitmap()
Simply sets the memory-critical bitmap of this region to
null. |
protected void |
setParameters(boolean isMMREncoded,
byte sdTemplate,
boolean isTPGDon,
boolean useSkip,
short[] sdATX,
short[] sdATY,
int symWidth,
int hcHeight,
CX cx,
ArithmeticDecoder arithmeticDecoder) |
protected void |
setParameters(boolean isMMREncoded,
long dataOffset,
long dataLength,
int gbh,
int gbw)
Used by
SymbolDictionary. |
protected void |
setParameters(boolean isMMREncoded,
long dataOffset,
long dataLength,
int gbh,
int gbw,
byte gbTemplate,
boolean isTPGDon,
boolean useSkip,
short[] gbAtX,
short[] gbAtY)
Used by
PatternDictionary and HalftoneRegion. |
protected boolean |
useExtTemplates() |
public GenericRegion()
public GenericRegion(SubInputStream subInputStream)
public Bitmap getRegionBitmap() throws IOException
getRegionBitmap in interface RegionBitmap of this region.IOException - if an underlying IO operation failsprotected void setParameters(boolean isMMREncoded,
long dataOffset,
long dataLength,
int gbh,
int gbw)
SymbolDictionary.isMMREncoded - the data is MMR encodeddataOffset - the offsetdataLength - the length of the datagbh - bitmap heightgbw - bitmap widthprotected void setParameters(boolean isMMREncoded,
byte sdTemplate,
boolean isTPGDon,
boolean useSkip,
short[] sdATX,
short[] sdATY,
int symWidth,
int hcHeight,
CX cx,
ArithmeticDecoder arithmeticDecoder)
isMMREncoded - the data is MMR encodedsdTemplate - sd templateisTPGDon - is TPGDonuseSkip - use skipsdATX - x values gbA pixelssdATY - y values gbA pixelssymWidth - bitmap widthhcHeight - bitmap heightcx - context for the arithmetic decoderarithmeticDecoder - the arithmetic decode to be used
Used by SymbolDictionary.protected void setParameters(boolean isMMREncoded,
long dataOffset,
long dataLength,
int gbh,
int gbw,
byte gbTemplate,
boolean isTPGDon,
boolean useSkip,
short[] gbAtX,
short[] gbAtY)
PatternDictionary and HalftoneRegion.isMMREncoded - the data is MMR encodeddataOffset - the offsetdataLength - the length of the datagbh - bitmap heightgbw - bitmap widthgbTemplate - gb templateisTPGDon - is TPGDonuseSkip - use skipgbAtX - x values of gbA pixelsgbAtY - y values of gbA pixelsprotected void resetBitmap()
null.public void init(SegmentHeader header, SubInputStream sis) throws InvalidHeaderValueException, IOException
SegmentDatainit in interface SegmentDataheader - - The segments' header (to make referred-to segments available in data part).sis - - Wrapped ImageInputStream into SubInputStream.InvalidHeaderValueException - if the segment header value is invalidIOException - if an underlying IO operation failspublic RegionSegmentInformation getRegionInfo()
RegionRegionSegmentInformation.getRegionInfo in interface RegionRegionSegmentInformation.protected boolean useExtTemplates()
protected boolean isTPGDon()
protected byte getGbTemplate()
protected boolean isMMREncoded()
protected short[] getGbAtX()
protected short[] getGbAtY()
Copyright © 2019 The Apache Software Foundation. All rights reserved.