DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomAssociation Class / Open Method / Open(String,Int32,String,String,String) Method

Network address (as dotted notation or resolvable name) to which the association is to be made

Port on which remote application is listening

Name to quote for this Application Entity

Name of remote Application Entity

Optional Local IP Address to use for binding the outbound Socket
Example

In This Topic
    Open(String,Int32,String,String,String) Method
    In This Topic
    Open and negotiate a new DICOM Association
    Syntax
    'Declaration
     
    
    Public Overloads Sub Open( _
       ByVal Node As System.String, _
       ByVal Port As System.Integer, _
       ByVal CallingAE As System.String, _
       ByVal CalledAE As System.String, _
       Optional ByVal LocalIP As System.String _
    ) 
    public void Open( 
       System.string Node,
       System.int Port,
       System.string CallingAE,
       System.string CalledAE,
       System.string LocalIP
    )

    Parameters

    Node

    Network address (as dotted notation or resolvable name) to which the association is to be made

    Port

    Port on which remote application is listening

    CallingAE

    Name to quote for this Application Entity

    CalledAE

    Name of remote Application Entity

    LocalIP
    Optional Local IP Address to use for binding the outbound Socket
    Remarks

    This method returns, after the connection has been established. If there is a protocol failure, then a trappable DicomException is thrown.

    Example
    DicomImage image = new DicomImage("image.dcm");
                        
    string node = "dicomserver.co.uk";
    int port = 104;
    string callingAE = "SCU";
    string calledAE = "SCP";
                        
    using (DicomAssociation cn = new DicomAssociation())
    {
       cn.RequestedContexts.Add(image.SOPClass, TransferSyntaxes.ExplicitVRLittleEndian);        
       cn.Open(node, port, callingAE, calledAE);
       cn.SendInstances(image);
        
       var result = cn.LastStatus;
        
       cn.Close();
    }
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also