DicomObjects Reference
DicomObjects Reference / DicomDataSet Object / WriteMemory Method
This must be the handle to a global block of memory, or may be NULL to find the length required
The length of the memory block (i.e. available space for the data), or 0 to find the length required
If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the data, and an appropriate transfer syntax is used, as below.
If FALSE, the data is written in the unofficial, but common format, with no header, and using the little-endian implicit VR transfer syntax.
Specifies the full UID of the transfer syntax with which the data is to be saved when Part 10 format is used.  If omitted, the little-endian explicit VR transfer syntax is used.  For details of the currently supported syntaxes, see the conformance entry.
The quality factor to be used.
In This Topic
    WriteMemory Method
    In This Topic
    Description
    Writes a dataset to a global memory block
    Syntax
    Visual Basic
    Public Function WriteMemory( _
       ByVal Handle As Integer, _
       ByVal Length As Long, _
       ByVal isPart10 As Boolean, _
       Optional ByVal TransferSyntax As Variant, _
       Optional ByVal Quality As Variant _
    ) As Long
    Parameters
    Handle
    This must be the handle to a global block of memory, or may be NULL to find the length required
    Length
    The length of the memory block (i.e. available space for the data), or 0 to find the length required
    isPart10
    If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the data, and an appropriate transfer syntax is used, as below.
    If FALSE, the data is written in the unofficial, but common format, with no header, and using the little-endian implicit VR transfer syntax.
    TransferSyntax
    Specifies the full UID of the transfer syntax with which the data is to be saved when Part 10 format is used.  If omitted, the little-endian explicit VR transfer syntax is used.  For details of the currently supported syntaxes, see the conformance entry.
    Quality
    The quality factor to be used.
    Remarks
    The data may subsequently be read by the ReadMemory method or by other DICOM software.
    If either Handle is NULL, or Length is 0, then no data is written, but the length is still calculated (applying compression if necessary), so that a suitable memory block may be allocated.
    If the length available is not enough for the data to be written, an error is thrown.
    Quality is specific to the compression method being used, and is ignored for non-compressed or lossless JPEG transfer syntaxes.  For Lossy JPEG, it is an integer in the range 1-100, the higher the number, the better the quality (and the larger the data).  Other compression methods may use this for other purposes in the future.
    See Also