Ejemplo n.º 1
0
        /// <summary> Goes to the next tile, in standard scan-line order (by rows then by
        /// columns). An NoNextElementException is thrown if the current tile is
        /// the last one (i.e. there is no next tile).
        ///
        /// <p>This default implementation just advances to the next tile in the
        /// source and re-initializes properly component transformation
        /// variables.</p>
        ///
        /// </summary>
        public override void  nextTile()
        {
            src.nextTile();
            tIdx = TileIdx;             // index of the current tile

            // initializations
            System.String str = (System.String)cts.getTileDef(tIdx);
            if (str.Equals("none"))
            {
                transfType = NONE;
            }
            else if (str.Equals("rct"))
            {
                transfType = FORW_RCT;
                initForwRCT();
            }
            else if (str.Equals("ict"))
            {
                transfType = FORW_ICT;
                initForwICT();
            }
            else
            {
                throw new System.ArgumentException("Component transformation" + " not recognized");
            }
        }
Ejemplo n.º 2
0
        /// <summary> 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).
        ///
        /// <P>This default implementation just advances to the next tile
        /// in the source and re-initializes properly component
        /// transformation variables.
        ///
        ///
        /// </summary>
        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);
                }
            }
        }