'DeclarationPublic Overloads Sub SendInstances( _ ByVal Images As System.Collections.Generic.IEnumerable(Of DicomImage) _ )
public void SendInstances( System.Collections.Generic.IEnumerable<DicomImage> Images )
Parameters
- Images
- The Images to send
'DeclarationPublic Overloads Sub SendInstances( _ ByVal Images As System.Collections.Generic.IEnumerable(Of DicomImage) _ )
public void SendInstances( System.Collections.Generic.IEnumerable<DicomImage> Images )
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.
DicomImage image1 = new DicomImage("image1.dcm"); DicomImage image2 = new DicomImage("image2.dcm"); DicomImageCollection dicomImages = new DicomImageCollection(); dicomImages.Add(image1); dicomImages.Add(image2); string node = "dicomserver.co.uk"; int port = 104; string callingAE = "SCU"; string calledAE = "SCP"; using (DicomAssociation cn = new DicomAssociation()) { cn.RequestedContexts.Add(image1.SOPClass, TransferSyntaxes.ExplicitVRLittleEndian); cn.RequestedContexts.Add(image2.SOPClass, TransferSyntaxes.ExplicitVRLittleEndian); cn.Open(node, port, callingAE, calledAE); cn.SendInstances(dicomImages); var result = cn.LastStatus; cn.Close(); }