DicomObjects Reference
DicomObjects Reference / DicomImage Object / CopyPixelBuffer Method
The address from which data is to be copied
The frame number to fill.
The distance (in bytes) between the start of one row of data and the next
The distance (in bytes) between the start of one pixel and the next
In This Topic
    CopyPixelBuffer Method
    In This Topic
    Description
    Copy pixel data from an external buffer
    Syntax
    Visual Basic
    Public Sub CopyPixelBuffer( _
       ByVal Address As Long, _
       ByVal Frame As Integer, _
       ByVal RowStep As Long, _
       ByVal ColumnStep As Long _
    ) 
    Parameters
    Address
    The address from which data is to be copied
    Frame
    The frame number to fill.
    RowStep
    The distance (in bytes) between the start of one row of data and the next
    ColumnStep
    The distance (in bytes) between the start of one pixel and the next
    Remarks

    This function is primarily used to load data from an external frame buffer such as that produced by a video-grabber, into the pixel buffer, which should be allocated using AllocatePixelSpace if not already allocated by other means.
    An entire frame is loaded in one call, using values from the DicomImage’s Attributes to determine the following parameters:
     The height and width of the image (0028,0011) & (0028 & 0010)
     The bit depth - currently only 8 or 16 bits allocated are supported (0028,0100)

    The number of samples per pixel (0028,0002)
    When capturing from devices that use top to bottom row ordering, RowStep may be negative, in which case Address should be increased appropriately so that it still points to the first pixel of the lowest row.
    If samples per pixel is 3, then bits allocated must be 8.  In this case it is assumed that the data is being copied from a Windows compatible bitmap ordered as BGR, and the bytes are swapped appropriately to produce the RGB ordering needed for DICOM.

    See Also