CSJ2K.j2k.codestream.reader.BitstreamReaderAgent.BitstreamReaderAgent C# (CSharp) Метод

BitstreamReaderAgent() защищенный Метод

Initializes members of this class. This constructor takes a HeaderDecoder object. This object must be initialized by the constructor of the implementing class from the header of the bit stream.
protected BitstreamReaderAgent ( HeaderDecoder hd, DecoderSpecs decSpec ) : System
hd HeaderDecoder The decoded header of the bit stream from where to initialize /// the values. /// ///
decSpec CSJ2K.j2k.decoder.DecoderSpecs The decoder specifications /// ///
Результат System
        protected internal BitstreamReaderAgent(HeaderDecoder hd, DecoderSpecs decSpec)
        {
            Coord co;
            //int i, j, max;

            this.decSpec = decSpec;
            this.hd = hd;

            // Number of components
            nc = hd.NumComps;
            offX = new int[nc];
            offY = new int[nc];
            culx = new int[nc];
            culy = new int[nc];

            // Image size and origin
            imgW = hd.ImgWidth;
            imgH = hd.ImgHeight;
            ax = hd.ImgULX;
            ay = hd.ImgULY;

            // Tiles
            co = hd.getTilingOrigin(null);
            px = co.x;
            py = co.y;
            ntW = hd.NomTileWidth;
            ntH = hd.NomTileHeight;
            ntX = (ax + imgW - px + ntW - 1) / ntW;
            ntY = (ay + imgH - py + ntH - 1) / ntH;
            nt = ntX * ntY;
        }