Skip to content

JFK-Ashmatics/meddream-viewport-reference

Repository files navigation

MEDDREAM ViewportsCore Demo Environment

A complete Docker Compose setup for running the MEDDREAM ViewportsCore demonstration with Orthanc PACS integration.

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Frontend   │───▢│  MEDDREAM    │───▢│   Orthanc   β”‚
β”‚  (nginx)    β”‚    β”‚  (viewer)    β”‚    β”‚   (PACS)    β”‚
β”‚  Port 80    β”‚    β”‚  Port 8080   β”‚    β”‚ Port 4242/  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚    8042     β”‚
                                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

1. Setup

# Clone/download this demo
chmod +x setup.sh
./setup.sh

# Set your NPM token
export NPM_TOKEN=your_meddream_npm_token

2. Build Frontend

docker-compose --profile build up builder

3. Start Services

docker-compose up -d

4. Load Sample Data

docker-compose --profile tools up dicom-loader

5. Access the Demo

πŸ“‹ Services

Core Services (always running)

  • orthanc: DICOM PACS server with Python integration
  • meddream: DICOM viewer application
  • frontend: nginx serving the ViewportsCore demo app

Utility Services (run when needed)

  • builder: Builds the frontend application
  • dicom-loader: Loads sample DICOM studies

πŸ› οΈ Management Commands

Service Management

# Start all services
docker-compose up -d

# Stop all services
docker-compose down

# View logs
docker-compose logs -f

# View specific service logs
docker-compose logs -f meddream

Development Workflow

# Rebuild frontend after code changes
docker-compose --profile build up --build builder

# Restart specific service
docker-compose restart meddream

# Update a single service
docker-compose up -d --no-deps meddream

Data Management

# Reset all data (including DICOM studies)
docker-compose down -v

# Reload sample DICOM data
docker-compose --profile tools up dicom-loader

# Backup Orthanc database
docker-compose exec orthanc tar czf - /var/lib/orthanc/db > orthanc-backup.tar.gz

πŸ”§ Configuration

Environment Variables

Create .env file:

NPM_TOKEN=your_meddream_npm_token
COMPOSE_PROJECT_NAME=meddream-demo

Key Configuration Files

  • orthanc.json: Orthanc PACS configuration
  • application.properties: MEDDREAM viewer settings
  • nginx.conf: Frontend proxy configuration
  • meddream.py: Orthanc-MEDDREAM integration script

Customizing MEDDREAM

Edit application.properties:

# Change PACS connection
pacs.host=your-pacs-server
pacs.port=11112
pacs.type=dimse

# Adjust logging
logging.level.com.softneta=DEBUG

Customizing nginx

Edit nginx.conf to add custom proxy rules or static file handling.

🩺 Health Checks

All services include health checks. Check status:

docker-compose ps

Individual health check URLs:

πŸ› Troubleshooting

Common Issues

1. Frontend won't build

# Check NPM_TOKEN is set
echo $NPM_TOKEN

# Rebuild with verbose output
docker-compose --profile build up --build builder

2. MEDDREAM can't connect to Orthanc

# Check Orthanc is running
docker-compose ps orthanc

# Check network connectivity
docker-compose exec meddream ping orthanc

# Verify Orthanc API
curl http://localhost:8042/system

3. No DICOM studies visible

# Check if studies were loaded
curl http://localhost:8042/studies

# Reload sample data
docker-compose --profile tools up dicom-loader

4. ViewportsCore chunk loading errors

# Check frontend build exists
ls -la build/

# Verify nginx proxy configuration
docker-compose exec frontend cat /etc/nginx/conf.d/default.conf

Debug Mode

# Run with debug logging
COMPOSE_LOG_LEVEL=DEBUG docker-compose up

# Access container shells
docker-compose exec meddream bash
docker-compose exec orthanc bash
docker-compose exec frontend sh

πŸ“ Project Structure

meddream-demo/
β”œβ”€β”€ docker-compose.yml      # Main orchestration
β”œβ”€β”€ nginx.conf             # Frontend proxy config
β”œβ”€β”€ setup.sh               # Setup script
β”œβ”€β”€ .env                   # Environment variables
β”œβ”€β”€ orthanc.json           # Orthanc configuration
β”œβ”€β”€ application.properties # MEDDREAM configuration  
β”œβ”€β”€ meddream.py            # Orthanc integration
β”œβ”€β”€ build/                 # Built frontend (created by builder)
β”œβ”€β”€ src/                   # Frontend source code
β”œβ”€β”€ package.json           # Frontend dependencies
└── README.md              # This file

πŸ”’ Security Notes

  • This is a development/demo environment
  • Default credentials are used (if any)
  • No HTTPS/SSL configured
  • Not suitable for production without hardening

πŸ“š Further Reading

πŸ†˜ Support

For issues with:

  • MEDDREAM: Contact Softneta support
  • Orthanc: Check Orthanc community forums
  • This demo: Check Docker and configuration logs

About

Reference application, React demo integration of meddream

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors