# Cybersecurity and Medical Imaging: A Simulation-Based Approach to DICOM Communication
## 5 Simulation Results and Analysis
### Setting Up Orthanc to Accept Data from the Modality Simulator  
Within the configuration of Orthanc (_/etc/orthalntc/orthanc.json_), the _\"DicomModalities\"_ section should be changed to accept data from the specific modality. The example contains three parameters [41]:  
* Application Entity Title (AET): this parameter represents the unique identifier of the remote modality. It cannot exceed 16 characters in length. In the example, _\"MODALITY\"_ is used as the AET. * Remote Network Address: this parameter specifies the IP address or hostname of the remote modality. In the example, _\"192.168.0.105\"_ (Windows 10) is used as the address. * TCP port number: this parameter defines the port number on which the DICOM protocol is running on the remote modality. The default port for DICOM is 104. Figure 3: The DICOM/PACS simulated environment. The configuration (Listing 7) suggests that multiple DICOM modalities can be listed under the _\"DicomModalities\"_ section [41], each one identified by a unique AET and associated with a specific network address and port number for communication. ```
1'DicomModalities':{
2/**
3\"Thefirstparameteristhe
4\"AEToftheremotemodality(cannotbelongerthan16
5\"characters),thesecondonesistheremotenetworkaddress,
6\"andthethirdonesistheTCPportnumbercorresponding
7\"totheDICOMprotocolontheremotecm



When these changes have been made, the configuration file must be saved and the Orthanc server restarted to implement the modifications. As a result, the HTTP server of Orthanc becomes accessible over a secure TLS connection. ### Validation Tests: Scenario Test Execution

Two distinct scenarios are illustrated in Listing 9 from the script outputs. The scenarios depict different outcomes related to the transfer of data to a PACS server for validation purposes related to the present research. ```
1#Scenario1:Successfultransfer-Outputofthesuccessfulconnection
2C:\Users\bloodraven\Desktop\02_Projects\DT>pythondicom.py
3 ConnectedtothePACSserver. 4 SuccessfullysentC:\Users\bloodraven\Desktop\02_Projects\DT\dicom\0002.DCMtothePACSserver. 5 DisconnectedfromthePACSserver. 6
7#Scenario2:IncorrectIPorPortNumber-Outputoffailedconnection
8C:\Users\bloodraven\Desktop\02_Projects\DT>pythondicom.py
9 FailedtoconnecttothePACSserver. ```
Upon initiating the script execution (Listing 9), the command prompt confirms a successful connection establishment with the PACS server. This connection allows subsequent data transmission. Specifically, the output specifies that the file _\"0002.DCM\"_ is located at the specified path. Similarly, in Scenario 2 the output reveals that there is an inability to establish the intended connection, indicating that an erroneous IP address or port number was specified in the script or that other network-related complications impeded the connection process. ### Network Traffic Analysis: TCP/DICOM Communication Flow

This section provides the mathematical model that describes the progression of the TCP/DICOM communication flow of the DICOM Communication. Moreover, Listings 10-13 show the progression of the TCP/DICOM communication flow between the DICOM modality and the PACS server. ```
1#Time|MessageType|Information|(PortNumbers)
2T_{1}7.633204882|A-ASSOCIATErequest|DICOM:A-ASSOCIATErequest\MODALITY-->ORTHANC|(55822)-->(4242)
3T_{2}7.633597464|A-ASSOCIATEaccept|DICOM:A-ASSOCIATEaccept\MODALITY-->ORTHANC|(55822)--(4242)
```
Listing 10: Network flow: association initialization. ```
1#Time|MessageType|Information|(PortNumbers)
2T_{3,4,...}**MultipleTCPflows[TCPsegmentofareassembledPDU]
```
Listing 11: TCP segments in between the DICOM communication: data transmission.