DicomObjects Reference
DicomObjects Reference / DicomImage Object / WriteStream Method
The name of the stream object to write to.
Although this object must support an IStream interface, this is retrieved via a QueryInterface call, and any interface to the object may therefore be passed.
If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the stream, and an appropriate transfer syntax is used, as below.
If FALSE, the stream 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.
The quality factor to be used.
In This Topic
    WriteStream Method
    In This Topic
    Description
    Writes an image to an IStream
    Syntax
    Visual Basic
    Public Sub WriteStream( _
       ByVal Stream As Unknown, _
       ByVal isPart10 As Boolean, _
       Optional ByVal TransferSyntax As Variant, _
       Optional ByVal Quality As Variant _
    ) 
    Parameters
    Stream
    The name of the stream object to write to.
    Although this object must support an IStream interface, this is retrieved via a QueryInterface call, and any interface to the object may therefore be passed.
    isPart10
    If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the stream, and an appropriate transfer syntax is used, as below.
    If FALSE, the stream 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.
    Quality
    The quality factor to be used.
    Remarks

    The file may subsequently be read by the ReadStream method or by other DICOM software.
    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 file) , and for JPEG 2000 lossy, it is a compression ratio.  Other compression methods may use this for other purposes in the future.

    This method is particularly suitable for use with Delphi, which provides access to streams via classes such as TStreamAdapter.

    See Also