CSJ2K.j2k.image.ImgDataJoiner.getCompData C# (CSharp) Метод

getCompData() публичный Метод

Returns, in the blk argument, a block of image data containing the specifed rectangular area, in the specified component. The data is returned, as a copy of the internal data, therefore the returned data can be modified "in place".

The rectangular area to return is specified by the 'ulx', 'uly', 'w' and 'h' members of the 'blk' argument, relative to the current tile. These members are not modified by this method. The 'offset' of the returned data is 0, and the 'scanw' is the same as the block's width. See the 'DataBlk' class.

This method, in general, is less efficient than the 'getInternCompData()' method since, in general, it copies the data. However if the array of returned data is to be modified by the caller then this method is preferable.

If the data array in 'blk' is 'null', then a new one is created. If the data array is not 'null' then it is reused, and it must be large enough to contain the block's data. Otherwise an 'ArrayStoreException' or an 'IndexOutOfBoundsException' is thrown by the Java system.

The returned data may have its 'progressive' attribute set. In this case the returned data is only an approximation of the "final" data.

public getCompData ( CSJ2K.j2k.image.DataBlk blk, int c ) : CSJ2K.j2k.image.DataBlk
blk CSJ2K.j2k.image.DataBlk Its coordinates and dimensions specify the area to return, /// relative to the current tile. If it contains a non-null data array, /// then it must be large enough. If it contains a null data array a new /// one is created. Some fields in this object are modified to return the /// data. /// ///
c int The index of the component from which to get the data. /// ///
Результат CSJ2K.j2k.image.DataBlk
        public virtual DataBlk getCompData(DataBlk blk, int c)
        {
            return imageData[c].getCompData(blk, compIdx[c]);
        }