DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImageCollection Class / Send Method
The IP address
The port number
The calling application entity title
The called application entity title
Example

In This Topic
    Send Method (DicomImageCollection)
    In This Topic
    Sends all images within the collection in one association
    Syntax
    'Declaration
     
    
    Public Function Send( _
       ByVal Node As System.String, _
       ByVal Port As System.Integer, _
       ByVal CallingAE As System.String, _
       ByVal CalledAE As System.String _
    ) As System.Integer()
    public System.int[] Send( 
       System.string Node,
       System.int Port,
       System.string CallingAE,
       System.string CalledAE
    )

    Parameters

    Node
    The IP address
    Port
    The port number
    CallingAE
    The calling application entity title
    CalledAE
    The called application entity title

    Return Value

    int Array, as status of each image transfer
    Example
    DicomImageCollection imageCollection = new DicomImageCollection();
     
    DicomImage image1 = new DicomImage("your_dicom_image1.dcm");
    DicomImage image2 = new DicomImage("your_dicom_image2.dcm");
    DicomImage image3 = new DicomImage("your_dicom_image3.dcm");
                        
    imageCollection.Add(image1);
    imageCollection.Add(image2);
    imageCollection.Add(image3);
                        
    string serverIP = "dicomserver.co.uk";
    int serverPort = 104;
    string callingAE = "SENDER_AE";
    string calledAE = "SERVER_AE";
                        
    // The statuses array contains the response code for each sent image
    int[] statuses = imageCollection.Send(serverIP, serverPort, callingAE, calledAE); 
                        
    foreach (var status in statuses)
    {
         if (status == 0)
         {
            // Success
         }
         else if (status == 273)
         {
            // Duplicate 
         }
         else
         {
            // ...
         }
    }
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also