[]
This class implements the ImgData interface and allows to obtain data from different sources. Here, one source is represented by an ImgData and a component index. The typical use of this class is when the encoder needs different components (Red, Green, Blue, alpha, ...) from different input files (i.e. from different ImgReader objects).
<p>All input ImgData must not be tiled (i.e. must have only 1 tile) and the
image origin must be the canvas origin. The different inputs can have
different dimensions though (this will lead to different subsampling
factors for each component).</p><p>The input ImgData and component index list must be defined when
constructing this class and can not be modified later.</p>
public class ImgDataJoiner : BlkImgDataSrc, ImgData
Name | Description |
---|---|
ImgDataJoiner(BlkImgDataSrc[], int[]) |
Name | Description |
---|---|
ImgHeight | Returns the overall height of the image in pixels. This is the image's height without accounting for any component subsampling or tiling. |
ImgULX | Returns the horizontal coordinate of the image origin, the top-left corner, in the canvas system, on the reference grid. |
ImgULY | Returns the vertical coordinate of the image origin, the top-left corner, in the canvas system, on the reference grid. |
ImgWidth | Returns the overall width of the image in pixels. This is the image's width without accounting for any component subsampling or tiling. |
NomTileHeight | Returns the nominal tiles height |
NomTileWidth | Returns the nominal tiles width |
NumComps | Returns the number of components in the image. |
TileHeight | Returns the overall height of the current tile in pixels. This is the tile's height without accounting for any component subsampling. |
TileIdx | Returns the index of the current tile, relative to a standard scan-line order. This default implementations assumes no tiling, so 0 is always returned. |
TilePartULX | Returns the horizontal tile partition offset in the reference grid |
TilePartULY | Returns the vertical tile partition offset in the reference grid |
TileWidth | Returns the overall width of the current tile in pixels. This is the tile's width without accounting for any component subsampling. |
Name | Description |
---|---|
ToString() | Returns a string of information about the object, more than 1 line long. The information string includes information from the several input ImgData (their toString() method are called one after the other). |
getCompData(DataBlk, int) | |
getCompImgHeight(int) | Returns the height in pixels of the specified component in the overall image. |
getCompImgWidth(int) | Returns the width in pixels of the specified component in the overall image. |
getCompSubsX(int) | Returns the component subsampling factor in the horizontal direction, for the specified component. This is, approximately, the ratio of dimensions between the reference grid and the component itself, see the 'ImgData' interface desription for details. |
getCompSubsY(int) | Returns the component subsampling factor in the vertical direction, for the specified component. This is, approximately, the ratio of dimensions between the reference grid and the component itself, see the 'ImgData' interface desription for details. |
getCompULX(int) | Returns the horizontal coordinate of the upper-left corner of the specified component in the current tile. |
getCompULY(int) | Returns the vertical coordinate of the upper-left corner of the specified component in the current tile. |
getFixedPoint(int) | Returns the position of the fixed point in the specified component. This is the position of the least significant integral (i.e. non-fractional) bit, which is equivalent to the number of fractional bits. For instance, for fixed-point values with 2 fractional bits, 2 is returned. For floating-point data this value does not apply and 0 should be returned. Position 0 is the position of the least significant bit in the data. |
getInternCompData(DataBlk, int) | |
getNomRangeBits(int) | |
getNumTiles() | Returns the total number of tiles in the image. This default implementation assumes no tiling, so 1 is always returned. |
getNumTiles(Coord) | Returns the number of tiles in the horizontal and vertical directions. This default implementation assumes no tiling, so (1,1) is always returned. |
getTile(Coord) | Returns the coordinates of the current tile. This default implementation assumes no-tiling, so (0,0) is returned. |
getTileCompHeight(int, int) | Returns the height in pixels of the specified tile-component. |
getTileCompWidth(int, int) | Returns the width in pixels of the specified tile-component |
nextTile() | Advances to the next tile, in standard scan-line order (by rows then columns). A NoNextElementException is thrown if the current tile is the last one (i.e. there is no next tile). This default implementation assumes no tiling, so NoNextElementException() is always thrown. |
setTile(int, int) | Changes the current tile, given the new coordinates. An IllegalArgumentException is thrown if the coordinates do not correspond to a valid tile. |