CSJ2K.j2k.codestream.reader.BitstreamReaderAgent.getImgULY C# (CSharp) Method

getImgULY() public method

Returns the vertical coordinate of the image origin, the top-left corner, in the canvas system, on the reference grid at the specified resolution level.

Note: Image resolution level indexes may differ from tile-component resolution index. They are indeed indexed starting from the lowest number of decomposition levels of each component of each tile.

Example: For an image (1 tile) with 2 components (component 0 having 2 decomposition levels and component 1 having 3 decomposition levels), the first (tile-) component has 3 resolution levels and the second one has 4 resolution levels, whereas the image has only 3 resolution levels available.

public getImgULY ( int rl ) : int
rl int The resolution level, from 0 to L. /// ///
return int
        public virtual int getImgULY(int rl)
        {
            int mindl = decSpec.dls.Min;
            if (rl > mindl)
            {
                throw new System.ArgumentException("Requested resolution level" + " is not available for, at " + "least, one tile-component");
            }
            // Retrieve number of decomposition levels corresponding to this
            // resolution level
            int dl = mindl - rl;
            return (ay + (1 << dl) - 1) / (1 << dl);
        }