DicomObjects Reference
DicomObjects Reference / DicomImage Object / WriteField Method

 

The field into which the image or dataset is to be Written.
This must be from the list of supported interfaces below, and must be of a type capable of holding binary objects.  In Microsoft Access, this would be either an OLE or Memo field.   The supported object types are:

Object Category  Version Object Type
ActiveX Data Objects ADO >=1.5 Field
Data Access Objects DAO 3.0 or 3.5 Field
Remote Data Objects RDO 2.0 Column

If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the field.
If FALSE, the field 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 used when Part 10 format is specified.  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
    WriteField Method
    In This Topic
    Description
    Writes a DICOM image into a database field
    Syntax
    Visual Basic
    Public Sub WriteField( _
       ByVal Field As Object, _
       ByVal isPart10 As Boolean, _
       Optional ByVal TransferSyntax As Variant, _
       Optional ByVal Quality As Variant _
    ) 
    Parameters
    Field

     

    The field into which the image or dataset is to be Written.
    This must be from the list of supported interfaces below, and must be of a type capable of holding binary objects.  In Microsoft Access, this would be either an OLE or Memo field.   The supported object types are:

    Object Category  Version Object Type
    ActiveX Data Objects ADO >=1.5 Field
    Data Access Objects DAO 3.0 or 3.5 Field
    Remote Data Objects RDO 2.0 Column

    isPart10
    If TRUE, a blank 128 byte header, DICM marker, and meta-header are written at the start of the field.
    If FALSE, the field 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 used when Part 10 format is specified.  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 field would normally be read by the ReadField method, but may be copied from the field to an external file.
    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 has been provided to allow development of a DICOM servers using Microsoft tools such as Access and SQL server, which have limited facilities for the handling of Binary Large Objects (BLOBs).
    Note:
    Whilst this method is useful for simple demonstrations and small projects, most database servers do not handle large BLOBs well when stored within the main database, and in a “production” environment, storage in simple files is strongly advised (with storage of just the filename within the database).

    See Also