invwtadapter.java
来自「jpeg2000编解码」· Java 代码 · 共 477 行 · 第 1/2 页
JAVA
477 行
* @param c The index of the component (between 0 and N-1). * * @return The vertical subsampling factor of component 'c'. * * @see ImgData * */ public int getCompSubsY(int c) { return mressrc.getCompSubsY(c); } /** * Returns the width in pixels of the specified tile-component * * @param t Tile index * * @param c The index of the component, from 0 to N-1. * * @return The width in pixels of component <tt>n</tt> in tile <tt>t</tt>. * */ public int getTileCompWidth(int t,int c) { // Retrieves the tile-component maximum resolution index and gets the // width from the source. int rl = mressrc.getSynSubbandTree(t,c).resLvl; return mressrc.getTileCompWidth(t,c,rl); } /** * Returns the height in pixels of the specified tile-component. * * <p>This default implementation returns the value of the source at the * current reconstruction resolution level.</p> * * @param t The tile index. * * @param c The index of the component, from 0 to N-1. * * @return The height in pixels of component <tt>n</tt> in tile * <tt>t</tt>. * */ public int getTileCompHeight(int t,int c) { // Retrieves the tile-component maximum resolution index and gets the // height from the source. int rl = mressrc.getSynSubbandTree(t,c).resLvl; return mressrc.getTileCompHeight(t,c,rl); } /** * Returns the width in pixels of the specified component in the overall * image. * * @param c The index of the component, from 0 to N-1. * * @return The width in pixels of component <tt>c</tt> in the overall * image. * */ public int getCompImgWidth(int c) { // Retrieves the component maximum resolution index and gets the width // from the source module. int rl = decSpec.dls.getMinInComp(c); return mressrc.getCompImgWidth(c,rl); } /** * Returns the height in pixels of the specified component in the overall * image. * * <p>This default implementation returns the value of the source at the * current reconstruction resolution level.</p> * * @param c The index of the component, from 0 to N-1. * * @return The height in pixels of component <tt>n</tt> in the overall * image. * */ public int getCompImgHeight(int c) { // Retrieves the component maximum resolution index and gets the // height from the source module. int rl = decSpec.dls.getMinInComp(c); return mressrc.getCompImgHeight(c,rl); } /** * Changes the current tile, given the new indices. An * IllegalArgumentException is thrown if the coordinates do not correspond * to a valid tile. * * <p>This default implementation calls the same method on the source.</p> * * @param x The horizontal index of the tile. * * @param y The vertical index of the new tile. * */ public void setTile(int x, int y) { mressrc.setTile(x,y); } /** * Advances to the next tile, in standard scan-line order (by rows then * columns). An NoNextElementException is thrown if the current tile is * the last one (i.e. there is no next tile). * * <p>This default implementation calls the same method on the source.</p> * */ public void nextTile() { mressrc.nextTile(); } /** * Returns the indixes of the current tile. These are the horizontal and * vertical indexes of the current tile. * * <p>This default implementation returns the value of the source.</p> * * @param co If not null this object is used to return the information. If * null a new one is created and returned. * * @return The current tile's indices (vertical and horizontal indexes). * */ public Coord getTile(Coord co) { return mressrc.getTile(co); } /** * Returns the index of the current tile, relative to a standard scan-line * order. * * <p>This default implementation returns the value of the source.</p> * * @return The current tile's index (starts at 0). * */ public int getTileIdx() { return mressrc.getTileIdx(); } /** * Returns the horizontal coordinate of the upper-left corner of the * specified component in the current tile. * * @param c The component index. * */ public int getCompULX(int c) { // Find tile-component maximum resolution index and gets information // from the source module. int tIdx = getTileIdx(); int rl = mressrc.getSynSubbandTree(tIdx,c).resLvl; return mressrc.getResULX(c,rl); } /** * Returns the vertical coordinate of the upper-left corner of the * specified component in the current tile. * * @param c The component index. * */ public int getCompULY(int c) { // Find tile-component maximum resolution index and gets information // from the source module. int tIdx = getTileIdx(); int rl = mressrc.getSynSubbandTree(tIdx,c).resLvl; return mressrc.getResULY(c,rl); } /** * Returns the horizontal coordinate of the image origin, the top-left * corner, in the canvas system, on the reference grid. * * <p>This default implementation returns the value of the source at the * current reconstruction resolution level.</p> * * @return The horizontal coordinate of the image origin in the canvas * system, on the reference grid. * */ public int getImgULX() { return mressrc.getImgULX(reslvl); } /** * Returns the vertical coordinate of the image origin, the top-left * corner, in the canvas system, on the reference grid. * * <p>This default implementation returns the value of the source at the * current reconstruction resolution level.</p> * * @return The vertical coordinate of the image origin in the canvas * system, on the reference grid. * */ public int getImgULY() { return mressrc.getImgULY(reslvl); } /** Returns the horizontal tile partition offset in the reference grid */ public int getTilePartULX() { return mressrc.getTilePartULX(); } /** Returns the vertical tile partition offset in the reference grid */ public int getTilePartULY() { return mressrc.getTilePartULY(); } /** * Returns the number of tiles in the horizontal and vertical directions. * * <p>This default implementation returns the value of the source.</p> * * @param co If not null this object is used to return the information. If * null a new one is created and returned. * * @return The number of tiles in the horizontal (Coord.x) and vertical * (Coord.y) directions. * */ public Coord getNumTiles(Coord co) { return mressrc.getNumTiles(co); } /** * Returns the total number of tiles in the image. * * <p>This default implementation returns the value of the source.</p> * * @return The total number of tiles in the image. * */ public int getNumTiles() { return mressrc.getNumTiles(); } /** * Returns the specified synthesis subband tree * * @param t Tile index. * * @param c Component index. * */ public SubbandSyn getSynSubbandTree(int t,int c) { return mressrc.getSynSubbandTree(t,c); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?