CSJ2K.j2k.image.invcomptransf.InvCompTransf.nextTile C# (CSharp) Method

nextTile() public method

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).

This default implementation just advances to the next tile in the source and re-initializes properly component transformation variables.

public nextTile ( ) : void
return void
        public override void nextTile()
        {
            src.nextTile();
            tIdx = TileIdx; // index of the current tile

            // initializations
            if (((System.Int32)cts.getTileDef(tIdx)) == NONE) transfType = NONE;
            else
            {
                int nc = src.NumComps > 3 ? 3 : src.NumComps;
                int rev = 0;
                for (int c = 0; c < nc; c++)
                {
                    rev += (wfs.isReversible(tIdx, c) ? 1 : 0);
                }
                if (rev == 3)
                {
                    // All WT are reversible
                    transfType = INV_RCT;
                }
                else if (rev == 0)
                {
                    // All WT irreversible
                    transfType = INV_ICT;
                }
                else
                {
                    // Error
                    throw new System.ArgumentException(
                        "Wavelet transformation and " + "component transformation" + " not coherent in tile" + tIdx);
                }
            }
        }