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

getTileCompHeight() public method

Returns the height in pixels of the specified tile-component for the given (tile-component) resolution level.
public getTileCompHeight ( int t, int c, int rl ) : int
t int The tile index. /// ///
c int The index of the component, from 0 to N-1. /// ///
rl int The resolution level, from 0 to L. /// ///
return int
        public int getTileCompHeight(int t, int c, int rl)
        {
            int tIdx = TileIdx;
            if (t != tIdx)
            {
                throw new System.InvalidOperationException("Asking the tile-component width of a tile " + "different  from the current one.");
            }
            int ntuly;
            int dl = mdl[c] - rl; // Revert level indexation (0 is hi-res)
            // Calculate starting Y of next tile Y-wise at reference grid hi-res
            ntuly = (ctY < ntY - 1)?py + (ctY + 1) * ntH:ay + imgH;
            // Convert reference grid hi-res to component grid hi-res
            ntuly = (ntuly + hd.getCompSubsY(c) - 1) / hd.getCompSubsY(c);
            // Starting Y of current tile at component grid hi-res is culy[c]
            // The difference at the rl level is the height
            return (ntuly + (1 << dl) - 1) / (1 << dl) - (culy[c] + (1 << dl) - 1) / (1 << dl);
        }