|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jj2000.j2k.image.ImgDataAdapter | +--jj2000.j2k.image.invcomptransf.InvCompTransf
This class apply inverse component transformations to the tiles depending on specification read from the codestream header. These transformations can be used to improve compression efficiency but are not related to colour transforms used to map colour values for display purposes. JPEG 2000 part I defines 2 component transformations: RCT (Reversible Component Transformation) and ICT (Irreversible Component Transformation).
ModuleSpec
Field Summary | |
private DataBlk |
block0
Block used to request component 0 |
private DataBlk |
block1
Block used to request component 1 |
private DataBlk |
block2
Block used to request component 2 |
private CompTransfSpec |
cts
The component transformations specifications |
private DataBlkInt |
dbi
Data block used only to store coordinates and progressiveness of the buffered blocks |
static int |
INV_ICT
Identifier for the Inverse Irreversible Component Transformation (INV_ICT). |
static int |
INV_RCT
Identifier for the Inverse Reversible Component Transformation (INV_RCT). |
private boolean |
noCompTransf
Flag indicating whether the decoder should skip the component transform |
static int |
NONE
Identifier for no component transformation. |
static char |
OPT_PREFIX
The prefix for inverse component transformation options: 'M' |
private int[][] |
outdata
Buffer for each component of output data |
private static java.lang.String[][] |
pinfo
The list of parameters that is accepted by the inverse component transformation module. |
private BlkImgDataSrc |
src
The source of image data |
private int |
transfType
The type of the current component transformation JPEG 2000 part I only support NONE, FORW_RCT and FORW_ICT types |
private int[] |
utdepth
The bit-depths of un-transformed components |
private SynWTFilterSpec |
wfs
The wavelet filter specifications |
Fields inherited from class jj2000.j2k.image.ImgDataAdapter |
imgdatasrc, tIdx |
Constructor Summary | |
InvCompTransf(BlkImgDataSrc imgSrc,
DecoderSpecs decSpec,
int[] utdepth,
ParameterList pl)
Constructs a new ForwCompTransf object that operates on the specified source of image data. |
Method Summary | |
static int[] |
calcMixedBitDepths(int[] utdepth,
int ttype,
int[] tdepth)
Calculates the bitdepths of the transformed components, given the bitdepth of the un-transformed components and the component tranformation type. |
DataBlk |
getCompData(DataBlk blk,
int c)
Apply inverse component transformation associated with the current tile. |
int |
getFixedPoint(int c)
Returns the position of the fixed point in the specified component. |
DataBlk |
getInternCompData(DataBlk blk,
int c)
Apply the inverse component transformation associated with the current tile. |
int |
getNomRangeBits(int c)
Returns the number of bits, referred to as the "range bits", corresponding to the nominal range of the data in the specified component. |
static java.lang.String[][] |
getParameterInfo()
Returns the parameters that are used in this class and implementing classes. |
private DataBlk |
invICT(DataBlk blk,
int c)
Apply inverse irreversible component transformation to obtain requested component from specified block of data. |
private DataBlk |
invRCT(DataBlk blk,
int c)
Apply inverse component transformation to obtain requested component from specified block of data. |
boolean |
isReversible()
Returns true if this transform is reversible in current tile. |
void |
nextTile()
Advances to the next tile, in standard scan-line order (by rows then columns). |
void |
setTile(int x,
int y)
Changes the current tile, given the new indexes. |
java.lang.String |
toString()
Returns a string with a descriptive text of which inverse component transformation is used. |
Methods inherited from class jj2000.j2k.image.ImgDataAdapter |
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface jj2000.j2k.image.ImgData |
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth |
Field Detail |
public static final int NONE
public static final char OPT_PREFIX
private static final java.lang.String[][] pinfo
public static final int INV_RCT
public static final int INV_ICT
private BlkImgDataSrc src
private CompTransfSpec cts
private SynWTFilterSpec wfs
private int transfType
private int[][] outdata
private DataBlk block0
private DataBlk block1
private DataBlk block2
private DataBlkInt dbi
private int[] utdepth
private boolean noCompTransf
Constructor Detail |
public InvCompTransf(BlkImgDataSrc imgSrc, DecoderSpecs decSpec, int[] utdepth, ParameterList pl)
imgSrc
- The source from where to get the data to be
transformeddecSpec
- The decoder specificationsutdepth
- The bit depth of the un-transformed componentspl
- The command line optinons of the decoderBlkImgDataSrc
Method Detail |
public static java.lang.String[][] getParameterInfo()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isReversible()
public int getFixedPoint(int c)
This default implementation assumes that the number of fractional bits is not modified by the component mixer.
getFixedPoint
in interface BlkImgDataSrc
c
- The index of the component.
public static int[] calcMixedBitDepths(int[] utdepth, int ttype, int[] tdepth)
utdepth
- The bitdepth of each un-transformed componentttype
- The type ID of the inverse component tranformationtdepth
- If not null the results are stored in this
array, otherwise a new array is allocated and returned.
public int getNomRangeBits(int c)
getNomRangeBits
in interface ImgData
getNomRangeBits
in class ImgDataAdapter
c
- The index of the component.
public DataBlk getCompData(DataBlk blk, int c)
This method calls the getInternCompData() method, but respects the definitions of the getCompData() method defined in the BlkImgDataSrc interface.
getCompData
in interface BlkImgDataSrc
blk
- Determines the rectangular area to return, and the
data is returned in this object.c
- Index of the output component.
BlkImgDataSrc.getCompData(jj2000.j2k.image.DataBlk, int)
public DataBlk getInternCompData(DataBlk blk, int c)
getInternCompData
in interface BlkImgDataSrc
blk
- Determines the rectangular area to return.c
- Index of the output component.
invRCT(jj2000.j2k.image.DataBlk, int)
,
invICT(jj2000.j2k.image.DataBlk, int)
private DataBlk invRCT(DataBlk blk, int c)
blk
- Determine the rectangular area to returnc
- The index of the requested component
private DataBlk invICT(DataBlk blk, int c)
blk
- Determine the rectangular area to returnc
- The index of the requested component
public void setTile(int x, int y)
This default implementation changes the tile in the source and re-initializes properly component transformation variables..
setTile
in interface ImgData
setTile
in class ImgDataAdapter
x
- The horizontal index of the tile.y
- The vertical index of the new tile.public void nextTile()
This default implementation just advances to the next tile in the source and re-initializes properly component transformation variables.
nextTile
in interface ImgData
nextTile
in class ImgDataAdapter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |