DicomObjects Reference
DicomObjects Reference / DicomConnection Object
In This Topic
    DicomConnection Object
    In This Topic

    A DicomConnection Object represents the current state of an association, and may either be created automatically in response to an incoming query request, or explicitly by the client program.  Methods of this object are used to send data, images, and verification requests.  There is not a one-to-one correspondence between DicomConnections and associations, as one incoming association may cause several DicomConnection objects to be produced, one in response to each incoming command, and likewise, an outgoing DicomConnection object may (if synchronous) during its life serve more than one association, but at a given time, each association is represented by one, and only one DicomConnection.

    As most clients in which DicomObjects will be used are single-threaded, the DicomConnection object is structured so as to allow asynchronous operation, permitting multiple operations to be performed simultaneously. For incoming C-FIND, C-GET or C-MOVE requests, details of the request are found in the OperationRoot and Request properties.  The client then finds the data and/or images required, and returns them through one or more SetDestinationSendData and SendImages methods.  The SendStatus method is used both to return pending status messages for C-GET and C-MOVE operations, and the final status for all operations.

    For incoming Normalised operations, details of the request are less “interpreted”, as handling such commands as an SCP is an advanced technique for knowledgeable users only.  The main incoming command is found, as a DicomDataSet, in the Command property, and the associated identifier is, as for the composite operations, in Request.

    DicomConnection objects may be created under user control either directly (e.g. using Visual Basic’s ‘new’ command, or using the OLE name DicomObjects.DicomConnection) or via the New method of DicomViewer or DicomServer objects.  The method used for creation controls the allowable values for the Mode property.  When created directly, the Mode is always doSync, and cannot be modified, as there would be no mechanism for ActionComplete events to be fired in these circumstances.  When created via the DicomViewer or DicomServer objects, then Mode is initially doAsync, but this may be modified before the first operation is initiated.  In this case, if Mode is left as doSync, or changed to doAsync, then the object through which the DicomConnection is created receives the ActionComplete events.  The Close method should be applied to such all user created DicomConnection objects before allowing them to be destroyed.

    See the Mode property for details of synchronising options.

    This property is useful when extra operations are required over a print association, and enables you to use the simplified interface provided by DicomPrint, yet still have flexibility to make arbitrary requests.  In particular, it can be used to N-GET the well-known printer instance during an association to check for the printer’s status.
    The Mode property will always be doSync, and cannot be changed.
    See Also