This project provides a solution for converting NIFTI files to DICOM format, storing them in Orthanc, and enabling simultaneous comparison of multiple studies using the OHIF Viewer.
- API: A FastAPI-based service for handling NIFTI to DICOM conversion and Orthanc interactions.
- Orthanc: An open-source DICOM server for storing and managing medical images.
- OHIF Viewer: A zero-footprint DICOM viewer for web browsers.
- Nginx: A reverse proxy to manage connections between services.
- Python 3.11+
- Node.js and Yarn
- Docker (for Orthanc and Nginx)
-
Clone this repository:
git clone https://github.com/altairrostam/nifti-ohif-orthanc.git cd nifti-ohif-orthanc
-
Set up the API:
cd api python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate` pip install -r requirements.txt
-
Run Orthanc:
docker run -d --name orthanc \ --network orthanc-network \ -p 4242:4242 \ -p 8042:8042 \ -v ./api/orthanc.json:/etc/orthanc/orthanc.json:ro \ jodogne/orthanc-plugins
-
Run Nginx reverse proxy:
docker run -d --name nginx-proxy \ --network orthanc-network \ -p 8080:80 \ -v ./api/nginx.conf:/etc/nginx/conf.d/default.conf nginx
-
Start the API:
cd api fastapi dev main.py
-
Set up and start the OHIF Viewer:
cd viewer yarn install yarn run dev
-
Access the services:
- Orthanc:
http://localhost:8080/orthanc
- API Documentation:
http://localhost:8000/docs
- OHIF Viewer:
http://localhost:3000
- Orthanc:
- Use the OHIF Viewer to view and upload the stored images.
- The converted DICOM files are automatically stored in Orthanc.
demo-1.mp4
- After the images are uploaded, you can select the studies to compare.
demo-2.mp4
- Nginx configuration is located in
api/nginx.conf
.
To make changes to the services:
- Modify the relevant files in the service directories.
- For Docker services (Orthanc and Nginx), rebuild and restart the containers.
- For local services (API and Viewer), restart the respective service.
If you encounter any issues:
-
For Docker services, check the logs:
docker logs orthanc docker logs nginx-proxy
-
For local services, check the console output.
-
Ensure all services are running and the required ports (8080, 8000, 3000) are not in use by other applications.
-
Verify that the Orthanc and Nginx containers are on the same Docker network:
docker network inspect orthanc-network