CSJ2K.j2k.image.forwcomptransf.ForwCompTransf.initForwICT C# (CSharp) Method

initForwICT() private method

Initialize some variables used with ICT. It must be called, at least, at the beginning of a new tile.
private initForwICT ( ) : void
return void
        private void initForwICT()
        {
            int i;
            int tIdx = TileIdx;

            if (src.NumComps < 3)
            {
                throw new System.ArgumentException();
            }
            // Check that the 3 components have the same dimensions
            if (src.getTileCompWidth(tIdx, 0) != src.getTileCompWidth(tIdx, 1) || src.getTileCompWidth(tIdx, 0) != src.getTileCompWidth(tIdx, 2) || src.getTileCompHeight(tIdx, 0) != src.getTileCompHeight(tIdx, 1) || src.getTileCompHeight(tIdx, 0) != src.getTileCompHeight(tIdx, 2))
            {
                throw new System.ArgumentException("Can not use ICT " + "on components with different " + "dimensions");
            }
            // Initialize bitdepths
            int[] utd; // Premix bitdepths
            utd = new int[src.NumComps];
            for (i = utd.Length - 1; i >= 0; i--)
            {
                utd[i] = src.getNomRangeBits(i);
            }
            tdepth = calcMixedBitDepths(utd, FORW_ICT, null);
        }