Main Content

testConnection

Test connection with PACS server

Since R2024b

Description

tf = testConnection(dConn) returns a logical 1 (true) if your client system has established a connection with the PACS server indicated by the dicomConnection object dConn. Otherwise, the function returns a logical 0 (false).

example

Examples

collapse all

Before running this example, you must get access from the administrator of the PACS server with which you intend to connect. Alternatively, you may consider setting up a local PACS server on your machine, as demonstrated in Working with PACS Server for DICOM Image Retrieval.

Establish a secure TLS connection with the PACS server using the key and certificate of your client system and the trusted certificate of the server. Display the response message of the DICOM connection.

dConn = dicomConnection("localhost",4242,"key.pem","certificate.pem","trusted-certificate.pem");
disp(dConn.ResponseMessage)
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending Echo Request (MsgID 1)
I: Received Echo Response (Success)
I: Releasing Association

Test the connection with the PACS server.

testConn = testConnection(dConn)
testConn = logical
   1

Input Arguments

collapse all

PACS server connection object, specified as a dicomConnection object.

Version History

Introduced in R2024b