A tool for creating static DICOM web applications
Project description
Static DICOMweb Creator
A Python library and CLI tool for generating static DICOMweb endpoints from DICOM files. Create self-contained, deployable medical imaging web applications without requiring a PACS server or database.
✨ Features
- 🚀 Zero Server Requirements: Generate static files that can be served from any web server or CDN
- 🔒 Self-Contained: All DICOM metadata and images converted to web-friendly formats
- 📊 DICOMweb Compatible: Generates standard DICOMweb API endpoints (WADO-RS)
- 🌐 OHIF Viewer Ready: Works out-of-the-box with OHIF Viewer for viewing medical images
- 📦 Easy Deployment: Includes docker templates
📋 Requirements
- Python 3.9 or higher
- Frontend viewer: OHIF Viewer (recommended) or any DICOMweb-compatible viewer
🚀 Installation
From PyPI
pip install static-dicomweb-creator
Development Installation
pip install -e ".[dev]"
📖 Usage
Command Line Interface
Basic usage:
static-dicomweb-creator input_dicom_dir base_url output_web_dir
For OHIF viewer:
static-dicomweb-creator --ohif input_dicom_dir base_url output_web_dir
Python API
from static_dicomweb_creator.creator import StaticDICOMWebCreator
from static_dicomweb_creator.utils import list_dicom_files
creator = StaticDICOMWebCreator(
output_path="/path/to/web",
root_uri="https://example.com/dicomweb/"
)
for dcm_path in list_dicom_files("/path/to/dicom_files"):
dcm = pydicom.dcmread(dcm_path)
creator.add_dcm_instance(dcm)
creator.create_json()
🏗️ Architecture
Input DICOM Files
↓
Static DICOMweb Creator
↓
Generated Output:
└ studies/
├ index.json
└ {StudyInstanceUID}/
└ series/
├ index.json
└ {SeriesInstanceUID}/
├ index.json
├ metadata
│ └ index.json
└ instances/
└ {SOPInstanceUID}/
├ metadata
│ └ index.json
├ frame
│ └ {frame_number}/
│ └ index.json
└ bulkdata
└ {tag}/
└ index.json
🌐 Deployment
With Docker Compose (Recommended)
This repository includes a ready-to-use Docker Compose setup with OHIF Viewer and Nginx:
# use samle_docker/docker-compose.yml placing your generated output in static_dicomweb/
docker-compose up
Access the viewer at http://localhost
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- OHIF Viewer - Open Health Imaging Foundation
- pydicom - Python library for DICOM files
- DICOMweb - Web standard for medical imaging
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file static_dicomweb_creator-0.1.0.tar.gz.
File metadata
- Download URL: static_dicomweb_creator-0.1.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de3eca7135cf0543ee176d96291acc000c3edb430995577df44c6f574f185c4d
|
|
| MD5 |
affc53cc434e3985b6fe42cf5ead3f22
|
|
| BLAKE2b-256 |
b43ab63c1ffbef8adea1d36416b1efc1f7ae7abaa974fb7a5aae375636b5b8c0
|
Provenance
The following attestation bundles were made for static_dicomweb_creator-0.1.0.tar.gz:
Publisher:
publish_to_pypi.yml on akchan/static_dicomweb_creator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
static_dicomweb_creator-0.1.0.tar.gz -
Subject digest:
de3eca7135cf0543ee176d96291acc000c3edb430995577df44c6f574f185c4d - Sigstore transparency entry: 621826190
- Sigstore integration time:
-
Permalink:
akchan/static_dicomweb_creator@a69029ebb59409c53aa8152a52e5348be0579eb9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/akchan
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@a69029ebb59409c53aa8152a52e5348be0579eb9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file static_dicomweb_creator-0.1.0-py3-none-any.whl.
File metadata
- Download URL: static_dicomweb_creator-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc6d894d99066ad8d5dbff054fa5241e48056a4e2bf3189e1bec32bd60b85e5f
|
|
| MD5 |
8879e908637abc5b8f310a3717bfb126
|
|
| BLAKE2b-256 |
3015b532dc98b3f44f50de294fa7d1432f71372720fa1e992c10dc60de10b868
|
Provenance
The following attestation bundles were made for static_dicomweb_creator-0.1.0-py3-none-any.whl:
Publisher:
publish_to_pypi.yml on akchan/static_dicomweb_creator
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
static_dicomweb_creator-0.1.0-py3-none-any.whl -
Subject digest:
bc6d894d99066ad8d5dbff054fa5241e48056a4e2bf3189e1bec32bd60b85e5f - Sigstore transparency entry: 621826192
- Sigstore integration time:
-
Permalink:
akchan/static_dicomweb_creator@a69029ebb59409c53aa8152a52e5348be0579eb9 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/akchan
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_to_pypi.yml@a69029ebb59409c53aa8152a52e5348be0579eb9 -
Trigger Event:
push
-
Statement type: