SbImageDataAccessorCopyRegion Method (SbImageDataAccessorRegion, SbChannelList) |
Returns an OIV.ImageViz.Nodes.Images.SoMemoryDataAdapter corresponding to the requested region.
Namespace: OIV.ImageViz
public SoMemoryDataAdapter CopyRegion( SbImageDataAccessorRegion region, SbChannelList channels )
The data are copied and can be accessed in read/write. Returned buffer data are interleaved, i.e. if request for RGB buffer, data will be RGBRGBRGB... Data are then organized line by line, slice by slice, volume by volume. Ptr[0] is 1st channel of 1st voxel of 1st line of 1st slice of 1st volume. Ptr[nbChannel * regionWidth] is 1st channel of 1st voxel of 2nd line of 1st volume, and so on. The returned buffer is the intersection of requested region and requested channels. There is no intersection with image extent or image available channels. Any data outside of image are considered to be zeros.