The mechanism is quite different for the simple Send methods compared to using DicomConnection

DicomImage.Send / DicomDataSet.Send

For these simple method, the list of offered transfer syntaxes comes from the registry, from the default value of the following key

HKEY_LOCAL_MACHINE/Software/Medical Connections/DicomObjects/TransferSyntax

NOTE: The above is a Key not a value. You need to edit the list of transfer syntaxes into the default value of that key.

or to change dynamically, it can be controlled by

DicomGlobal.RegString("TransferSyntax/") - note the trailing "/"

If you wish to make this change only for a single SOP class (a.k.a. Abstract Syntax), then you can use that as the value name (real registry) or following the “/” in the programmatic version - e.g.

HKEY_LOCAL_MACHINE/Software/Medical Connections/DicomObjects/TransferSyntax/1.2.840.10008.5.1.4.1.1.3.1

NOTE: The above is a value not a key.

or

DicomGlobal.RegString("TransferSyntax/1.2.840.10008.5.1.4.1.1.3.1") 

Whichever method is used, the string value is a space separated list of transfer syntax UIDs

Therefore, for DicomImage.Send, you can control the transfer syntaxes offered, using this mechanism, and if necessary, you can reduce it to a single transfer syntax to “force” this to be used, but if so, then you must be prepared to accept a failure and retry if the SCP rejects your chosen transfer syntax.

Using DicomConnection

For DicomConnection.SendImages, the default is the same as above, but you can override this by making your own contexts explicitly.

e.g. in VB:

set cn = new DicomConnection
dim cxt as DicomContext 
set cxt = cn.Contexts.Add("1.2.840.10008.5.1.2.1.1.2") ' CT
cxt.OfferedTS = array("1.2.840.10008.1.2", "1.2.840.10008.1.2.4.51")
cn.SetDestination.......

This will offer CT (only - default values are not used once any override is made), with just default Implicit VR Little Endian and Lossy JPEG 12 bit.

You can if you wish use this mechanism to add the same SOP class more than once e.g.

set cn = new DicomConnection
dim cxt as DicomContext 
cxt = cn.Contexts.Add("1.2.840.10008.5.1.2.1.1.2") ' CT
cxt.OfferedTS = "1.2.840.10008.1.2"
set cxt = cn.Contexts.Add("1.2.840.10008.5.1.2.1.1.2") ' CT again
cxt.OfferedTS = "1.2.840.10008.1.2.4.51"
cn.SetDestination.......

This also avoids having to use arrays!

PreferredTS and PreferredPCID

Here, if the SCP accepts both contexts, then you have the choice which to use - see the PreferredTS and PreferredPCID help file entries to guide you further….just note that PCID numbers go 1,3,5 etc., not 1,2,3…….you may find looking at a log useful to see what is happening!

When DicomObjects is the SCP, the choice of transfer syntaxes accepted can be accomplished either internally, or through programmatic control.

For full control, you must put code in the AssociationRequest/AssociationRequest2 events to iterate through the contexts, and for each one choose which of the transfer syntaxes in the OfferedTS list you wish to accept, and put this into the AcceptedTS property. For any contexts where an explicit choice ha not been made, DicomObjects makes an internal choice, using the default list from the TransferSyntax registry key or global.RegString value as defined above. In this case, the transfer syntax accepted is the first in the default list which is also present in the list offered. Note that the order in which the transfer syntaxes are offered is therefore irrelevant.