THIS REPOSITORY IS NOT FOR PRODUCTION USAGE. It's a very simple way to provide tightly controlled test data to applications that integrate with DICOMWeb.
This repository is used as a version controlled collection of DICOM studies that are made available with lightweight implementation of DICOMWeb or the static wado service. We're leveraging the following projects:
- dicomweb-server: Lightweight DICOMweb Server with CouchDB
- CouchDB: NoSQL document-oriented database solution
- dicomweb-client: Python client for DICOMweb services.
- [dicomp10-to-dicomweb][dicomp10-to-dicomweb]: JavaScript version of a static wado generator for dicomweb
Run the two commands below to install mkdicomweb first, and then to run it on the test data, installing the test data to ~/viewer-testdata. The viewer testdata is automatically served by running the yarn start command in OHIF.
npm install -g dicomp10-to-dicomweb
mkdicomweb -d ~/viewer-testdata dcm
None of the remaining options are required.
For Running Container:
- Docker: Windows | Mac
- Share your drive w/ docker (on mac your drive will be shared by default)
For Uploading New Studies:
- Windows Subsystem for Linux (or Linux)
- This is not strictly true, but I find it easier
- Install Python 3 & pip (Linux)
apt-get -y install python3 python3-pip
- Install Python 3 & pip (Mac)
brew install python3 python3-pip
- Install Dicomweb-client and pydicom (Linux/Mac)
pip3 install dicomweb-client pydicom
Start:
docker-compose build
docker-compose up
Add Studies:
cd dcm
python3 seed-db.py
Request Data: (QIDO-RS)
- Studies:
http://localhost:5985/studies
- Series in Study:
http://localhost:5985/studies/<studyInstanceUid>/series
- Instances in Series:
http://localhost:5985/studies/<studyInstanceUid>/series/<seriesInstanceUid>/instances
Where UIDs often have a format similar to: 1.2.276.0.74.3.1167540280.200511.112514.1
OHIF Server Config:
By default dicomweb-server
has a wide open CORS policy set in it's fastify
config. This allows for little additional configuration.
window.config = {
routerBasename: "/",
extensions: [],
showStudyList: true,
servers: {
dicomWeb: [
{
name: "dicomweb_server",
wadoUriRoot: "http://localhost:5985",
qidoRoot: "http://localhost:5985",
wadoRoot: "http://localhost:5985",
qidoSupportsIncludeField: true,
imageRendering: "wadouri",
thumbnailRendering: "wadors",
enableStudyLazyLoad: true
}
]
}
};
config/
contains files used by docker images or projects.couchdb-data/
is our volume mount point so we can persist our data- If you wanted multiple data sets, you could submodule this or choose a different mount point.
dcm/
contains our seed DICOM files. By default, theseed-db.py
file will upload all.dcm
files in this directory.
👋 If
couchdb-data
grows too large; we can simply re-uploaddcm
files when the volume is spun up.
- MicroDicom (win only)
- img2dcm (command line)
- DicomBrowser (win, mac, CLI)