Skip to content

hendrapaiton/Modality-Emulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modality Emulator

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.

Overview

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.

Features

  • 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

Architecture

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

Installation

  1. Clone the repository:
git clone https://github.com/hendrapaiton/Modality-Emulator.git
cd Modality-Emulator
  1. Install dependencies:
pip install -r requirements.txt
  1. Configure the system with your DICOM network settings

Usage

Modality Worklist Emulator (MWL)

  1. Configure the DICOM settings in the configuration file
  2. Run the modality emulator:
python -m src.modality_emulator

DICOM StoreCP Client (Modality Emulator for sending files)

To 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_client

Or run the test version:

python -m tests.test_dicom_sender

The 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

Testing

The project includes comprehensive tests using pytest:

  1. Install test dependencies:
pip install -r requirements.txt
  1. Run the tests:
pytest
  1. Run tests with coverage:
pytest --cov=src tests/

Configuration

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

DICOM Conformance

This implementation follows DICOM Standard Part 4 (Service Class Specifications) for:

  • Modality Worklist Service (MWL)
  • Storage Service Class (C-STORE)

Contributing

We welcome contributions to the project! Please see our contributing guidelines for more information.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Based on DICOM standard for medical imaging communication
  • Compatible with DVTK RIS Emulator for testing purposes
  • Inspired by medical imaging workflow requirements

Funding

Saweria QR Code

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.

About

Modality Emulator with Python Pynetdicom

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Contributors 2

  •  
  •  

Languages