[]
        
(Showing Draft Content)

CSJ2K.j2k.image.Tiler.getCompData

getCompData Method

getCompData(DataBlk, int)

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

       <p>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.</p><p>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.</p><p>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.</p><p>The returned data may have its 'progressive' attribute set. In this
       case the returned data is only an approximation of the "final"
       data.</p>
Declaration
public DataBlk getCompData(DataBlk blk, int c)
Parameters
Type Name Description
DataBlk blk

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.

int c

The index of the component from which to get the data.

Returns
Type Description
DataBlk

The requested DataBlk

Implements
See Also