CSJ2K.j2k.wavelet.synthesis.InvWTFull.setTile C# (CSharp) Метод

setTile() публичный Метод

Changes the current tile, given the new indexes. An IllegalArgumentException is thrown if the indexes do not correspond to a valid tile.
public setTile ( int x, int y ) : void
x int The horizontal index of the tile. /// ///
y int The vertical index of the new tile. /// ///
Результат void
        public override void setTile(int x, int y)
        {
            int i;

            // Change tile
            base.setTile(x, y);

            int nc = src.NumComps;
            int tIdx = src.TileIdx;
            for (int c = 0; c < nc; c++)
            {
                ndl[c] = src.getSynSubbandTree(tIdx, c).resLvl;
            }

            // Reset the decomposed component buffers.
            if (reconstructedComps != null)
            {
                for (i = reconstructedComps.Length - 1; i >= 0; i--)
                {
                    reconstructedComps[i] = null;
                }
            }

            cblkToDecode = 0;
            SubbandSyn root, sb;
            for (int c = 0; c < nc; c++)
            {
                root = src.getSynSubbandTree(tIdx, c);
                for (int r = 0; r <= reslvl - maxImgRes + root.resLvl; r++)
                {
                    if (r == 0)
                    {
                        sb = (SubbandSyn) root.getSubbandByIdx(0, 0);
                        if (sb != null)
                            cblkToDecode += sb.numCb.x * sb.numCb.y;
                    }
                    else
                    {
                        sb = (SubbandSyn) root.getSubbandByIdx(r, 1);
                        if (sb != null)
                            cblkToDecode += sb.numCb.x * sb.numCb.y;
                        sb = (SubbandSyn) root.getSubbandByIdx(r, 2);
                        if (sb != null)
                            cblkToDecode += sb.numCb.x * sb.numCb.y;
                        sb = (SubbandSyn) root.getSubbandByIdx(r, 3);
                        if (sb != null)
                            cblkToDecode += sb.numCb.x * sb.numCb.y;
                    }
                } // Loop on resolution levels
            } // Loop on components
        }