public class Resampler extends ColorSpaceMapper
jj2000.j2k.colorspace.ColorSpaceColorSpaceMapper.ComputedComponentscomputed, csMap, dataFloat, dataInt, eol, fixedPtBitsArray, inFloat, inInt, maxValueArray, ncomps, OPT_PREFIX, pl, shiftValueArray, src, srcBlk, workDataFloat, workDataInt, workFloat, workIntimgdatasrc, tIdx| Modifier | Constructor and Description |
|---|---|
protected |
Resampler(BlkImgDataSrc src,
ColorSpace csMap)
Ctor resamples a BlkImgDataSrc so that all components
have the same number of samples.
|
| Modifier and Type | Method and Description |
|---|---|
static BlkImgDataSrc |
createInstance(BlkImgDataSrc src,
ColorSpace csMap)
Factory method for creating instances of this class.
|
DataBlk |
getCompData(DataBlk outblk,
int c)
Returns, in the blk argument, a block of image data containing the
specifed rectangular area, in the specified component.
|
int |
getCompImgHeight(int c)
Returns the height in pixels of the specified component in the
overall image.
|
int |
getCompImgWidth(int c)
Returns the width in pixels of the specified component in the
overall image.
|
int |
getCompSubsX(int c)
Returns the component subsampling factor in the horizontal
direction, for the specified component.
|
int |
getCompSubsY(int c)
Returns the component subsampling factor in the vertical
direction, for the specified component.
|
DataBlk |
getInternCompData(DataBlk outblk,
int c)
Return a DataBlk containing the requested component
upsampled by the scale factor applied to the particular
scaling direction
Returns, in the blk argument, a block of image data containing the
specifed rectangular area, in the specified component.
|
int |
getTileCompHeight(int t,
int c)
Returns the height in pixels of the specified tile-component.
|
int |
getTileCompWidth(int t,
int c)
Returns the width in pixels of the specified tile-component..
|
String |
toString()
Return an appropriate String representation of this Resampler instance.
|
copyGeometry, getFixedPoint, getParameterInfo, setInternalBuffergetCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomRangeBits, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth, nextTile, setTileclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCompULX, getCompULY, getImgHeight, getImgULX, getImgULY, getImgWidth, getNomRangeBits, getNomTileHeight, getNomTileWidth, getNumComps, getNumTiles, getNumTiles, getTile, getTileHeight, getTileIdx, getTilePartULX, getTilePartULY, getTileWidth, nextTile, setTileprotected Resampler(BlkImgDataSrc src, ColorSpace csMap) throws ColorSpaceException
src - -- Source of image datacsm - -- provides colorspace infoColorSpaceExceptionpublic static BlkImgDataSrc createInstance(BlkImgDataSrc src, ColorSpace csMap) throws ColorSpaceException
src - -- source of image datacsMap - -- provides colorspace infoColorSpaceExceptionpublic DataBlk getInternCompData(DataBlk outblk, int c)
The rectangular area to return is specified by the 'ulx', 'uly', 'w' and 'h' members of the 'blk' argument, relative to the current tile. These members are not modified by this method. The 'offset' of the returned data is 0, and the 'scanw' is the same as the block's width. See the 'DataBlk' class.
If the data array in 'blk' is 'null', then a new one is created. If the data array is not 'null' then it is reused, and it must be large enough to contain the block's data. Otherwise an 'ArrayStoreException' or an 'IndexOutOfBoundsException' is thrown by the Java system.
The returned data has its 'progressive' attribute set to that of the input data.
getInternCompData in interface BlkImgDataSrcgetInternCompData in class ColorSpaceMapperblk - Its coordinates and dimensions specify the area to
return. If it contains a non-null data array, then it must have the
correct dimensions. If it contains a null data array a new one is
created. The fields in this object are modified to return the data.c - The index of the component from which to get the data. Only 0
and 3 are valid.getCompData(jj2000.j2k.image.DataBlk, int)public String toString()
public DataBlk getCompData(DataBlk outblk, int c)
The rectangular area to return is specified by the 'ulx', 'uly', 'w' and 'h' members of the 'blk' argument, relative to the current tile. These members are not modified by this method. The 'offset' of the returned data is 0, and the 'scanw' is the same as the block's width. See the 'DataBlk' class.
If the data array in 'blk' is 'null', then a new one is created. If the data array is not 'null' then it is reused, and it must be large enough to contain the block's data. Otherwise an 'ArrayStoreException' or an 'IndexOutOfBoundsException' is thrown by the Java system.
The returned data has its 'progressive' attribute set to that of the input data.
getCompData in interface BlkImgDataSrcgetCompData in class ColorSpaceMapperblk - Its coordinates and dimensions specify the area to
return. If it contains a non-null data array, then it must have the
correct dimensions. If it contains a null data array a new one is
created. The fields in this object are modified to return the data.c - The index of the component from which to get the data. Only 0
and 3 are valid.getInternCompData(jj2000.j2k.image.DataBlk, int)public int getCompImgHeight(int c)
getCompImgHeight in interface ImgDatagetCompImgHeight in class ImgDataAdapterc - The index of the component, from 0 to N-1.public int getCompImgWidth(int c)
getCompImgWidth in interface ImgDatagetCompImgWidth in class ImgDataAdapterc - The index of the component, from 0 to N-1.public int getCompSubsX(int c)
getCompSubsX in interface ImgDatagetCompSubsX in class ImgDataAdapterc - The index of the component (between 0 and N-1)ImgDatapublic int getCompSubsY(int c)
getCompSubsY in interface ImgDatagetCompSubsY in class ImgDataAdapterc - The index of the component (between 0 and N-1)ImgDatapublic int getTileCompHeight(int t,
int c)
getTileCompHeight in interface ImgDatagetTileCompHeight in class ImgDataAdaptert - The tile index.c - The index of the component, from 0 to N-1.public int getTileCompWidth(int t,
int c)
getTileCompWidth in interface ImgDatagetTileCompWidth in class ImgDataAdaptert - Tile indexc - The index of the component, from 0 to N-1.Copyright © 2015. All rights reserved.