This project is a DICOM device simulator implemented in Python, utilizing the questionary
, pydicom
, and pynetdicom
libraries. It provides functionalities to interact with DICOM servers, handle PACS information, and manage general settings via a command-line interface.
note1: This project is still under development. note2: python main.py need in cmd or powershell.not in vscode or other IDE.
quick run:
python main.py
- MPPS: Modality Performed Procedure Step (MPPS) is a DICOM data structure that contains information about the procedures performed during a study. It is used to track the progress of a patient's treatment plan and to ensure that the correct procedures are performed.
- You can choose a directory or a file. Continuous use '/'
-
CT: CT is a type of medical imaging modality that uses X-ray beams to create detailed images of the body. It is used to diagnose and treat diseases and conditions such as cancer, heart disease, and lung diseases.
-
MR: MR is a type of medical imaging modality that uses magnetic resonance to create detailed images of the body. It is used to diagnose and treat diseases and conditions such as cancer, heart disease, and lung diseases.
-
PACS: PACS is a type of medical imaging modality that uses a network of computers to store, retrieve, and manage medical images. It is used to store, retrieve, and manage medical images.
- Python 3.8 or higher
- Virtual environment (recommended)
-
Clone the Repository:
git clone [email protected]:riusky/dicom-device-simulator.git cd irt-dicom-device-simulator
-
Create a Virtual Environment: unnecessary
python3 -m venv venv
-
Activate the Virtual Environment: unnecessary
-
On Windows:
.\venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
-
-
Install Required Packages:
pip install -r requirements.txt
-
Run the Simulator:
python main.py
questionary: For creating interactive command-line interfaces. pydicom: For working with DICOM files. pynetdicom: For networking with DICOM services.
To use the DICOM device simulator, follow these steps: Running the Simulator
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
python main.py
The simulator provides an interactive menu to manage general settings and PACS information:
- General Settings:
- Edit individual settings such as language, WML address, MPPS address, etc.
- PACS Information:
- Add new PACS info
- Edit existing PACS info
- Delete PACS info by UUID
- Modify individual settings with real-time validation and default values.
- language
- wml_address
- mpps_address
- pacs_address
- debug
- wml_ae_title
- mpps_ae_title
- calling_ae_title
- pacs_ae_title
- ct_default_path
- mr_default_path
- Add new PACS info with unique name validation and UUID generation.
- Edit existing PACS info with unique name validation and non-editable UUID.
- Delete PACS info by UUID.
- Default Configuration
The default configuration is stored in a JSON file. Example:
{
"language": "English",
"wml_address": "127.0.0.1:106",
"mpps_address": "127.0.0.1:107",
"pacs_address": "127.0.0.1:11112",
"debug": false,
"wml_ae_title": "ENS-MWL",
"mpps_ae_title": "ENS-MPPS",
"calling_ae_title": "ct99",
"pacs_ae_title": "ENS-PACS",
"ct_default_path": "./system_data\\/dcm\\/ct",
"mr_default_path": "./system_data\\/dcm\\/mr",
"pacs_info": [
{
"name": "MIM1",
"pacs_address": "127.0.0.1:11112",
"pacs_ae_title": "ENS-PACS",
"uuid": "uuids1"
},
{
"name": "MIM2",
"pacs_address": "127.0.0.1:11112",
"pacs_ae_title": "ENS-PACS",
"uuid": "uuids2"
},
{
"name": "MIM3",
"pacs_address": "127.0.0.1:11112",
"pacs_ae_title": "ENS-PACS",
"uuid": "uuids3"
}
]
}
python -m pynetdicom storescp 11112 -d -aet ENS-PACS -od ./images
download the microdicom and run it.
tool > Options > DICOM Servers:
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please open an issue or submit a pull request for any bugs, improvements, or new features.
For any questions or suggestions, please reach out to [email protected].