public abstract class EntropyCoder extends ImgDataAdapter implements CodedCBlkDataSrcEnc, StdEntropyCoderOptions
The source of data for objects of this class are 'CBlkQuantDataSrcEnc' objects.
For more details on the sign magnitude representation used see the Quantizer class.
This class provides default implemenations for most of the methods (wherever it makes sense), under the assumption that the image and component dimensions, and the tiles, are not modifed by the entropy coder. If that is not the case for a particular implementation then the methods should be overriden.
Quantizer
,
CBlkQuantDataSrcEnc
Modifier and Type | Field and Description |
---|---|
static char |
OPT_PREFIX
The prefix for entropy coder options: 'C'
|
private static String[][] |
pinfo
The list of parameters that is accepted for entropy coding.
|
protected CBlkQuantDataSrcEnc |
src
The source of quantized wavelet coefficients
|
imgdatasrc, tIdx
FIRST_BYPASS_PASS_IDX, MAX_CB_AREA, MAX_CB_DIM, MIN_CB_DIM, NUM_EMPTY_PASSES_IN_MS_BP, NUM_NON_BYPASS_MS_BP, NUM_PASSES, OPT_BYPASS, OPT_PRED_TERM, OPT_RESET_MQ, OPT_SEG_SYMBOLS, OPT_TERM_PASS, OPT_VERT_STR_CAUSAL, STRIPE_HEIGHT
Constructor and Description |
---|
EntropyCoder(CBlkQuantDataSrcEnc src)
Initializes the source of quantized wavelet coefficients.
|
Modifier and Type | Method and Description |
---|---|
static EntropyCoder |
createInstance(CBlkQuantDataSrcEnc src,
J2KImageWriteParamJava wp,
CBlkSizeSpec cblks,
PrecinctSizeSpec pss,
StringSpec bms,
StringSpec mqrs,
StringSpec rts,
StringSpec css,
StringSpec sss,
StringSpec lcs,
StringSpec tts)
Creates a EntropyCoder object for the appropriate entropy coding
parameters in the parameter list 'pl', and having 'src' as the source
of quantized data.
|
SubbandAn |
getAnSubbandTree(int t,
int c)
Returns a reference to the root of subband tree structure representing
the subband decomposition for the specified tile-component.
|
abstract int |
getCBlkHeight(int t,
int c)
Returns the code-block height for the specified tile and component.
|
abstract int |
getCBlkWidth(int t,
int c)
Returns the code-block width for the specified tile and component.
|
int |
getCbULX()
Returns the horizontal offset of the code-block partition.
|
int |
getCbULY()
Returns the vertical offset of the code-block partition.
|
static String[][] |
getParameterInfo()
Returns the parameters that are used in this class and
implementing classes.
|
boolean |
isReversible(int t,
int c)
Returns the reversibility of the tile-component data that is provided
by the object.
|
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomRangeBits, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth, nextTile, setTile
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNextCodeBlock, getPPX, getPPY, precinctPartitionUsed
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomRangeBits, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth, nextTile, setTile
public static final char OPT_PREFIX
private static final String[][] pinfo
protected CBlkQuantDataSrcEnc src
public EntropyCoder(CBlkQuantDataSrcEnc src)
src
- The source of quantized wavelet coefficients.public abstract int getCBlkWidth(int t, int c)
t
- The tile indexc
- the component indexpublic abstract int getCBlkHeight(int t, int c)
t
- The tile indexc
- the component indexpublic boolean isReversible(int t, int c)
Since entropy coders themselves are always reversible, it returns the reversibility of the data that comes from the 'CBlkQuantDataSrcEnc' source object (i.e. ROIScaler).
isReversible
in interface ForwWTDataProps
t
- Tile indexc
- Component indexROIScaler
public SubbandAn getAnSubbandTree(int t, int c)
getAnSubbandTree
in interface ForwWTDataProps
t
- The index of the tile.c
- The index of the component.SubbandAn
,
Subband
public int getCbULX()
getCbULX
in interface ForwWTDataProps
public int getCbULY()
getCbULY
in interface ForwWTDataProps
public static String[][] getParameterInfo()
public static EntropyCoder createInstance(CBlkQuantDataSrcEnc src, J2KImageWriteParamJava wp, CBlkSizeSpec cblks, PrecinctSizeSpec pss, StringSpec bms, StringSpec mqrs, StringSpec rts, StringSpec css, StringSpec sss, StringSpec lcs, StringSpec tts)
src
- The source of data to be entropy codedwp
- The parameter list (or options).cblks
- Code-block size specificationspss
- Precinct partition specificationsbms
- By-pass mode specificationsmqrs
- MQ-reset specificationsrts
- Regular termination specificationscss
- Causal stripes specificationssss
- Error resolution segment symbol use specificationslcs
- Length computation specificationstts
- Termination type specificationsIllegalArgumentException
- If an error occurs while parsing
the options in 'pl'Copyright © 2017 Open Microscopy Environment