Class GenericRefinementRegion
java.lang.Object
org.apache.pdfbox.jbig2.segments.GenericRefinementRegion
- All Implemented Interfaces:
Region, SegmentData
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGenericRefinementRegion(SubInputStream subInputStream) GenericRefinementRegion(SubInputStream subInputStream, SegmentHeader segmentHeader) -
Method Summary
Modifier and TypeMethodDescriptionDecode using a template and arithmetic coding, as described in 6.3.5.6Simply returns theRegionSegmentInformation.voidinit(SegmentHeader header, SubInputStream sis) Parse the stream and read information of header.protected voidsetParameters(CX cx, ArithmeticDecoder arithmeticDecoder, short grTemplate, int regionWidth, int regionHeight, Bitmap grReference, int grReferenceDX, int grReferenceDY, boolean isTPGRon, short[] grAtX, short[] grAtY)
-
Constructor Details
-
GenericRefinementRegion
public GenericRefinementRegion() -
GenericRefinementRegion
-
GenericRefinementRegion
-
-
Method Details
-
getRegionBitmap
public Bitmap getRegionBitmap() throws IOException, IntegerMaxValueException, InvalidHeaderValueExceptionDecode using a template and arithmetic coding, as described in 6.3.5.6- Specified by:
getRegionBitmapin interfaceRegion- Returns:
- The decoded region as
Bitmap. - Throws:
IOException- if an underlying IO operation failsInvalidHeaderValueException- if a segment header value is invalidIntegerMaxValueException- if the maximum value limit of an integer is exceeded
-
init
Description copied from interface:SegmentDataParse the stream and read information of header.- Specified by:
initin interfaceSegmentData- Parameters:
header- - The segments' header (to make referred-to segments available in data part).sis- - WrappedImageInputStreamintoSubInputStream.- Throws:
IOException- if an underlying IO operation fails
-
setParameters
protected void setParameters(CX cx, ArithmeticDecoder arithmeticDecoder, short grTemplate, int regionWidth, int regionHeight, Bitmap grReference, int grReferenceDX, int grReferenceDY, boolean isTPGRon, short[] grAtX, short[] grAtY) -
getRegionInfo
Description copied from interface:RegionSimply returns theRegionSegmentInformation.- Specified by:
getRegionInfoin interfaceRegion- Returns:
- The
RegionSegmentInformation.
-