⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 invwtadapter.java

📁 jpeg2000算法实现
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    public int getCompWidth(int c) {	// Find tile-component resolution level	int tIdx = getTileIdx();	int rl = ((Integer)decSpec.dls.getTileCompVal(tIdx,c)).intValue()	    -decSpec.dls.getMin()+reslvl;        return mressrc.getCompWidth(c,rl);    }    /**     * Returns the height in pixels of the specified component in the     * current tile.     *     * <P>This default implementation returns the value of the source at the     * current reconstruction resolution level.     *     * @param c The index of the component, from 0 to N-1.     *     * @return The height in pixels of component <tt>n</tt> in the current     * tile.     *     *     * */    public int getCompHeight(int c) {	// Find tile-component resolution level	int tIdx = getTileIdx();	int rl = ((Integer)decSpec.dls.getTileCompVal(tIdx,c)).intValue()	    -decSpec.dls.getMin()+reslvl;        return mressrc.getCompHeight(c,rl);    }    /**     * Returns the width 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.     *     * @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) {	// Find component resolution level	int rl = decSpec.dls.getMinInComp(c)-decSpec.dls.getMin()+reslvl;        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.     *     * @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) {	// Find component resolution level	int rl = decSpec.dls.getMinInComp(c)-decSpec.dls.getMin()+reslvl;        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.     *     * @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.     *     *     * */    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.     *     * @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.     *     * @return The current tile's index (starts at 0).     *     *     * */    public int getTileIdx() {        return mressrc.getTileIdx();    }    /**     * Returns the horizontal and vertical offset of the upper-left corner of     * the current tile, in the specified component, relative to the canvas     * origin, in the component coordinates (not in the reference grid     * coordinates). These are the coordinates of the current tile's (not     * active tile) upper-left corner relative to the canvas.     *     * <P>This default implementation returns the value of the source at the     * current reconstruction resolution level.     *     * @param co If not null the object is used to return the values,     * if null a new one is created and returned.     *     * @param c The index of the component (between 0 and N-1)     *     * @return The horizontal and vertical offsets of the upper-left     * corner of the current tile, for the specified component,     * relative to the canvas origin, in the component coordinates.     *     *     * */    public Coord getTileOff(Coord co, int c) {        return mressrc.getTileOff(co,c,reslvl);    }    /**     * Returns the horizontal coordinate of the upper-left corner of the     * active tile, with respect to the canvas origin, in the component     * coordinates, for the specified component.     *     * <P>This default implementation returns the value of the source at the     * current reconstruction resolution level.     *     * @param c The index of the component (between 0 and N-1)     *     * @return The horizontal coordinate of the upper-left corner of the active     * tile, with respect to the canvas origin, for component 'n', in the     * component coordinates.     *     *     * */    public int getULX(int c) {	// Find component resolution level	int tIdx = getTileIdx();	int rl = ((Integer)decSpec.dls.getTileCompVal(tIdx,c)).intValue()	    -decSpec.dls.getMin()+reslvl;        return mressrc.getULX(c,rl);    }    /**     * Returns the vertical coordinate of the upper-left corner of the     * active tile, with respect to the canvas origin, in the component     * coordinates, for the specified component.     *     * <P>This default implementation returns the value of the source at the     * current reconstruction resolution level.     *     * @param c The index of the component (between 0 and N-1)     *     * @return The vertical coordinate of the upper-left corner of the active     * tile, with respect to the canvas origin, for component 'n', in the     * component coordinates.     *     *     * */    public int getULY(int c) {	// Find component resolution level	int tIdx = getTileIdx();	int rl = ((Integer)decSpec.dls.getTileCompVal(tIdx,c)).intValue()	    -decSpec.dls.getMin()+reslvl;        return mressrc.getULY(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.     *     * @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.     *     * @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 number of tiles in the horizontal and vertical directions.     *     * <P>This default implementation returns the value of the source.     *     * @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.     *     * @return The total number of tiles in the image.     *     *     * */    public int getNumTiles() {        return mressrc.getNumTiles();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -