A Python-based open source modality emulator designed to communicate with DVTK RIS Emulator and PACS systems, focusing on MWL (Modality Worklist) with C-FIND and PACS with C-STORE operations.
This project implements a modality emulator that simulates medical imaging devices (such as CT, MR, US, etc.) in a DICOM network. It provides communication capabilities with RIS (Radiology Information System) and PACS (Picture Archiving and Communication System) using standard DICOM protocols.
- MWL (Modality Worklist) Support: Implementation of C-FIND operations to retrieve worklist entries from RIS systems
- PACS Communication: Implementation of C-STORE operations for sending images to PACS systems
- DICOM StoreSCP Client: Generate and send random DICOM files to your own DICOM server (storescp)
- DVTK RIS Emulator Integration: Compatible with DVTK RIS Emulator for testing and development
- DICOM Standard Compliance: Adheres to DICOM networking and communication standards
- Configurable Settings: Easy configuration for different network environments and systems
The modality emulator supports:
- C-FIND operations for worklist queries to MWL
- C-STORE operations for image storage to PACS
- Network communication following DICOM protocols
- Random DICOM file generation and transmission
- Clone the repository:
git clone https://github.com/hendrapaiton/Modality-Emulator.git
cd Modality-Emulator- Install dependencies:
pip install -r requirements.txt- Configure the system with your DICOM network settings
- Configure the DICOM settings in the configuration file
- Run the modality emulator:
python -m src.modality_emulatorTo generate and send random DICOM files to your storescp server (storescp -v -aet MYSTORE -od C:\dicom_store 11112):
Run the module directly:
python -m src.storescp_clientOr run the test version:
python -m tests.test_dicom_senderThe script will:
- Generate 10 random DICOM files with different modalities (CT, MR, PT, SC)
- Send them to your storescp server at localhost:11112 with AE title MYSTORE
- Clean up temporary files after successful transmission
- Display a summary of successful/failed transmissions
The project includes comprehensive tests using pytest:
- Install test dependencies:
pip install -r requirements.txt- Run the tests:
pytest- Run tests with coverage:
pytest --cov=src tests/The system can be configured with:
- AE Title for the modality
- IP address and port for the modality
- RIS/PACS destination settings
- Supported SOP classes
- Network timeouts and retry settings
This implementation follows DICOM Standard Part 4 (Service Class Specifications) for:
- Modality Worklist Service (MWL)
- Storage Service Class (C-STORE)
We welcome contributions to the project! Please see our contributing guidelines for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
- Based on DICOM standard for medical imaging communication
- Compatible with DVTK RIS Emulator for testing purposes
- Inspired by medical imaging workflow requirements
Support this project by donating through Saweria.
This project is maintained by the open source community and is intended for educational and development purposes in medical imaging systems.
