'DeclarationPublic Overloads Sub SendInstances( _ ByVal Stream As System.IO.Stream _ )
public void SendInstances( System.IO.Stream Stream )
Parameters
- Stream
The Stream which contains the data to be transmitted
The Stream which contains the data to be transmitted
'DeclarationPublic Overloads Sub SendInstances( _ ByVal Stream As System.IO.Stream _ )
public void SendInstances( System.IO.Stream Stream )
The Stream which contains the data to be transmitted
For automatically generated DicomAssociation objects, this method is used in response to a C-GET or C-MOVE request, but it may also be used to send any images the client chooses over a "stand-alone" DicomAssociation.
Data sent by this method are sent either to the requesting application (C-GET) or to another (C-MOVE or stand-alone) as a series of C-STORE actions.
For C-MOVE operations, if this Association has been linked internally to the request (i.e. if it is the DicomObjects.EventArguments.QueryReceivedArgs.InstanceAssociation), then:
For C-MOVE requests, or "stand-alone" DicomAssociation objects, Open must be called before this method.
string file = "image.dcm"; string node = "dicomserver.co.uk"; int port = 104; string callingAE = "SCU"; string calledAE = "SCP"; using (DicomAssociation cn = new DicomAssociation()) { cn.RequestedContexts.Add(SOPClasses.CT, TransferSyntaxes.ExplicitVRLittleEndian); cn.Open(node, port, callingAE, calledAE); cn.SendInstances(new FileStream(file, FileMode.Open, FileAccess.Read)); var result = cn.LastStatus; cn.Close(); }