CSJ2K.j2k.roi.encoder.ROIScaler.calcMaxMagBits C# (CSharp) Метод

calcMaxMagBits() приватный Метод

Calculates the maximum amount of magnitude bits for each tile-component, and stores it in the 'maxMagBits' array. This is called by the constructor
private calcMaxMagBits ( CSJ2K.j2k.encoder.EncoderSpecs encSpec ) : void
encSpec CSJ2K.j2k.encoder.EncoderSpecs The encoder specifications for addition of roi specs /// ///
Результат void
        private void calcMaxMagBits(EncoderSpecs encSpec)
        {
            int tmp;
            MaxShiftSpec rois = encSpec.rois;

            int nt = src.getNumTiles();
            int nc = src.NumComps;

            maxMagBits = new int[nt][];
            for (int i = 0; i < nt; i++)
            {
                maxMagBits[i] = new int[nc];
            }

            src.setTile(0, 0);
            for (int t = 0; t < nt; t++)
            {
                for (int c = nc - 1; c >= 0; c--)
                {
                    tmp = src.getMaxMagBits(c);
                    maxMagBits[t][c] = tmp;
                    rois.setTileCompVal(t, c, (System.Object) tmp);
                }
                if (t < nt - 1)
                    src.nextTile();
            }
            // Reset to current initial tile position
            src.setTile(0, 0);
        }