public class ForwCompTransf extends ImgDataAdapter implements BlkImgDataSrc
ModuleSpec
Modifier and Type | Field and Description |
---|---|
private DataBlkInt |
block0
Block used to request component with index 0
|
private DataBlkInt |
block1
Block used to request component with index 1
|
private DataBlkInt |
block2
Block used to request component with index 2
|
private CompTransfSpec |
cts
The component transformations specifications
|
static int |
FORW_ICT
Identifier for the Forward Irreversible Component
Transformation (FORW_ICT).
|
static int |
FORW_RCT
Identifier for the Forward Reversible Component Transformation
(FORW_RCT).
|
static int |
NONE
Identifier for no component transformation.
|
static char |
OPT_PREFIX
The prefix for component transformation type: 'M'
|
private DataBlk |
outBlk
Output block used instead of the one provided as an argument
if the later is DataBlkFloat.
|
private static String[][] |
pinfo
The list of parameters that is accepted by the forward
component transformation module.
|
private BlkImgDataSrc |
src
The source of image data
|
private int[] |
tdepth
The bit-depths of transformed components
|
private int |
transfType
The type of the current component transformation JPEG 2000
part I only support NONE, FORW_RCT and FORW_ICT types
|
private AnWTFilterSpec |
wfs
The wavelet filter specifications
|
imgdatasrc, tIdx
Constructor and Description |
---|
ForwCompTransf(BlkImgDataSrc imgSrc,
J2KImageWriteParamJava wp)
Constructs a new ForwCompTransf object that operates on the
specified source of image data.
|
Modifier and Type | Method and Description |
---|---|
static int[] |
calcMixedBitDepths(int[] ntdepth,
int ttype,
int[] tdepth)
Calculates the bitdepths of the transformed components, given the
bitdepth of the un-transformed components and the component
tranformation type.
|
private DataBlk |
forwICT(DataBlk blk,
int c)
Apply forward irreversible component transformation to obtain requested
component from specified block of data.
|
private DataBlk |
forwRCT(DataBlk blk,
int c)
Apply forward component transformation to obtain requested component
from specified block of data.
|
DataBlk |
getCompData(DataBlk blk,
int c)
Apply forward 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 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 and in the current tile.
|
static String[][] |
getParameterInfo()
Returns the parameters that are used in this class and implementing
classes.
|
private void |
initForwICT()
Initialize some variables used with ICT.
|
private void |
initForwRCT()
Initialize some variables used with RCT.
|
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.
|
String |
toString()
Returns a string with a descriptive text of which forward component
transformation is used.
|
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCompImgHeight, getCompImgWidth, getCompSubsX, getCompSubsY, getCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileCompHeight, getTileCompWidth, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth
public static final int NONE
public static final int FORW_RCT
public static final int FORW_ICT
private BlkImgDataSrc src
private CompTransfSpec cts
private AnWTFilterSpec wfs
private int transfType
private int[] tdepth
private DataBlk outBlk
private DataBlkInt block0
private DataBlkInt block1
private DataBlkInt block2
public static final char OPT_PREFIX
private static final String[][] pinfo
public ForwCompTransf(BlkImgDataSrc imgSrc, J2KImageWriteParamJava wp)
imgSrc
- The source from where to get the data to be
transformedwp
- The encoder specificationsBlkImgDataSrc
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 String[][] getParameterInfo()
public static int[] calcMixedBitDepths(int[] ntdepth, int ttype, int[] tdepth)
ntdepth
- The bitdepth of each non-transformed components.ttype
- The type ID of the component transformation.tdepth
- If not null the results are stored in this
array, otherwise a new array is allocated and returned.private void initForwRCT()
private void initForwICT()
public String toString()
public int getNomRangeBits(int c)
getNomRangeBits
in interface ImgData
getNomRangeBits
in class ImgDataAdapter
c
- The index of the component.public boolean isReversible()
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.forwRCT(jj2000.j2k.image.DataBlk, int)
,
forwICT(jj2000.j2k.image.DataBlk, int)
private DataBlk forwRCT(DataBlk blk, int c)
blk
- Determine the rectangular area to returnc
- The index of the requested componentprivate DataBlk forwICT(DataBlk blk, int c)
blk
- Determine the rectangular area to returnc
- The index of the requested componentpublic 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
Copyright © 2017 Open Microscopy Environment