DICOM Router - Installation Guide

Installation Guide

Prerequisites

System Requirements

Operating System

  • Windows 10 (version 1909 or later)
  • Windows 11 (all versions)
  • Windows Server 2019 (recommended for production)
  • Windows Server 2022 (recommended for production)

.NET Runtime

Hardware Requirements

Minimum Configuration:

  • CPU: 2 cores, 2.4 GHz
  • RAM: 4 GB
  • Storage: 100 MB for application + storage space for DICOM files
  • Network: 100 Mbps

Recommended Configuration:

  • CPU: 4+ cores, 3.0 GHz or higher
  • RAM: 8-16 GB (32 GB+ for high-throughput)
  • Storage: SSD with 1 TB+ capacity, RAID 1/5/10 for redundancy
  • Network: 1 Gbps dedicated network interface

Installation Methods

Method 1: Standalone Installation

  1. Extract Application Files

    # Extract DicomProxyRTWindows.zip to installation directory
    # Example: C:\DicomProxy\
    
  2. Install .NET 9.0 Runtime

    # Download and install .NET 9.0 Runtime
    # Verify installation:
    dotnet --info
    
  3. Configure Application

    # Copy configuration template
    copy appsettings.example.json appsettings.json
    # Edit appsettings.json with your settings
    
  4. Test Installation

    # Run in console mode for testing
    DicomProxyRTWindows.exe
    

Method 2: Windows Service Installation

  1. Install as Windows Service

    # Run as Administrator
    sc create "DICOM Proxy" binPath="C:\DicomProxy\DicomProxyRTWindows.exe" start=auto
    sc description "DICOM Proxy" "Advanced DICOM Proxy/Router/PACS Service"
    
  2. Configure Service Properties

    # Set service to restart on failure
    sc failure "DICOM Proxy" reset=86400 actions=restart/5000/restart/5000/restart/5000
    
  3. Start Service

    sc start "DICOM Proxy"
    
  4. Verify Service Status

    sc query "DICOM Proxy"
    

Initial Configuration

1. Basic Configuration (appsettings.json)

{
  "DicomPort": 11112,
  "HttpPort": 8080,
  "HttpsPort": 8443,
  "StoragePath": "C:\\DicomStorage",
  "DatabasePath": "C:\\DicomStorage\\dicom.db",
  "LogLevel": "Info",
  "MaxStorageSizeGB": 1000,
  "CleanupIntervalHours": 24,
  "ThisModality": {
    "AE_Title": "DICOMPROXY",
    "Port": 11112,
    "IPAddress": "0.0.0.0",
    "MaxConnections": 50
  },
  "Security": {
    "EnableTLS": false,
    "CertificatePath": "",
    "CertificatePassword": "",
    "RequireAuthentication": false
  }
}

2. DICOM Modalities Configuration (servers.json)

{
  "servers": [
    {
      "id": "pacs1",
      "name": "Main PACS Server",
      "ae_title": "MAINPACS",
      "hostname": "192.168.1.100",
      "port": 11112,
      "enabled": true,
      "max_connections": 10,
      "timeout_seconds": 30,
      "priority": 1,
      "supported_services": ["C-STORE", "C-FIND", "C-GET", "C-MOVE", "C-ECHO"]
    },
    {
      "id": "pacs2",
      "name": "Backup PACS Server",
      "ae_title": "BACKUPPACS",
      "hostname": "192.168.1.101",
      "port": 11112,
      "enabled": true,
      "max_connections": 5,
      "timeout_seconds": 30,
      "priority": 2,
      "supported_services": ["C-STORE", "C-FIND", "C-GET", "C-ECHO"]
    }
  ]
}

3. Storage Directory Structure

The application will automatically create the following directory structure:

C:\DicomStorage\
├── studies\
│   └── [StudyInstanceUID]\
│       └── [SeriesInstanceUID]\
│           └── [SOPInstanceUID].dcm
├── temp\
├── logs\
└── config\
    ├── dicom.db (SQLite database)
    └── cache\

Network Configuration

Firewall Configuration

Required Inbound Rules:

# DICOM Port (TCP)
netsh advfirewall firewall add rule name="DICOM Proxy - DICOM" dir=in action=allow protocol=TCP localport=11112

# HTTP Port (TCP)
netsh advfirewall firewall add rule name="DICOM Proxy - HTTP" dir=in action=allow protocol=TCP localport=8080

# HTTPS Port (TCP) - if SSL enabled
netsh advfirewall firewall add rule name="DICOM Proxy - HTTPS" dir=in action=allow protocol=TCP localport=8443

Required Outbound Rules:

# Allow outbound DICOM connections to PACS servers
netsh advfirewall firewall add rule name="DICOM Proxy - Outbound DICOM" dir=out action=allow protocol=TCP remoteport=11112

# Allow outbound HTTP/HTTPS for updates and licensing
netsh advfirewall firewall add rule name="DICOM Proxy - Outbound HTTP" dir=out action=allow protocol=TCP remoteport=80,443

Port Configuration

Service Default Port Protocol Purpose
DICOM SCP 11112 TCP DICOM network operations
HTTP API 8080 TCP REST API endpoints
HTTPS API 8443 TCP Secure REST API endpoints
DICOM TLS 11113 TCP Secure DICOM operations

SSL/TLS Configuration

1. Generate Self-Signed Certificate (Development)

# Generate certificate for HTTPS
$cert = New-SelfSignedCertificate -DnsName "localhost" -CertStoreLocation "cert:\LocalMachine\My"
$certPath = "C:\DicomProxy\certificate.pfx"
$certPassword = "YourSecurePassword"
Export-PfxCertificate -Cert $cert -FilePath $certPath -Password (ConvertTo-SecureString $certPassword -AsPlainText -Force)

2. Configure SSL in appsettings.json

{
  "Security": {
    "EnableTLS": true,
    "CertificatePath": "certificate.pfx",
    "CertificatePassword": "YourSecurePassword",
    "RequireAuthentication": true
  }
}

3. DICOM TLS Configuration

For secure DICOM communications, place the TLS certificate file:

C:\DicomProxy\dicomtls.pfx

Logging Configuration

1. NLog Configuration (nlog.config)

<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  
  <targets>
    <target xsi:type="File" name="fileTarget"
            fileName="C:\DicomStorage\logs\dicom-proxy-${shortdate}.log"
            layout="${longdate} ${uppercase:${level}} ${logger} ${message} ${exception:format=tostring}" />
    
    <target xsi:type="Console" name="consoleTarget"
            layout="${time} [${level}] ${message}" />
  </targets>

  <rules>
    <logger name="*" minlevel="Info" writeTo="fileTarget" />
    <logger name="*" minlevel="Info" writeTo="consoleTarget" />
  </rules>
</nlog>

2. Log Levels

Level Description Use Case
Fatal Critical errors System crashes, unrecoverable errors
Error Error conditions Failed operations, exceptions
Warn Warning conditions Deprecated features, potential issues
Info Informational Normal operation, status updates
Debug Debug information Development and troubleshooting
Trace Detailed tracing Performance analysis

License Configuration

Demo Mode

The application runs in demo mode by default with the following limitations:

  • 30-day evaluation period
  • Limited to 100 studies
  • Watermarked output

Production License

  1. Obtain license file from vendor
  2. Place license file in application directory
  3. Restart service
  4. Verify license status in logs
{
  "LicenseFile": "dicomproxy.lic",
  "LicenseServer": "https://license.dicom.link",
  "AutoRenewal": true
}

Verification Steps

1. Service Verification

# Check service status
sc query "DICOM Proxy"

# View service logs
Get-EventLog -LogName Application -Source "DICOM Proxy" -Newest 10

2. DICOM Connectivity Test

# Using DCMTK tools
echoscu localhost 11112 -aet TESTCLIENT -aec DICOMPROXY

# Using findscu
findscu localhost 11112 -aet TESTCLIENT -aec DICOMPROXY -k "QueryRetrieveLevel=STUDY" -k "StudyInstanceUID"

3. HTTP API Test

# Test REST endpoints
curl http://localhost:8080/api/studies
curl http://localhost:8080/openapi.json

# Test QIDO-RS
curl "http://localhost:8080/wado/studies?StudyDate=20240101-20241231"

4. Storage Test

# Verify storage directory creation
dir C:\DicomStorage\studies

# Check database
sqlite3 C:\DicomStorage\dicom.db ".tables"

Performance Optimization

1. System Optimization

# Disable Windows Defender real-time scanning for DICOM storage directory
Add-MpPreference -ExclusionPath "C:\DicomStorage"

# Optimize network settings
netsh int tcp set global chimney=enabled
netsh int tcp set global autotuninglevel=normal

2. Application Configuration

{
  "Performance": {
    "MaxConcurrentConnections": 50,
    "ConnectionPoolSize": 20,
    "RequestTimeoutSeconds": 300,
    "EnableCaching": true,
    "CacheExpirationMinutes": 60,
    "MaxMemoryUsageMB": 2048
  }
}

Troubleshooting Installation Issues

Common Issues

1. Port Already in Use

# Check port usage
netstat -an | findstr :11112
# Kill process using port
taskkill /f /pid [ProcessID]

2. Permission Denied

# Run as Administrator
# Grant full control to application directory
icacls "C:\DicomProxy" /grant "NT SERVICE\DICOM Proxy":(OI)(CI)F

3. .NET Runtime Not Found

# Verify .NET installation
dotnet --info
# Reinstall .NET 9.0 Runtime if necessary

4. Service Won’t Start

# Check Windows Event Logs
eventvwr.msc
# Navigate to Windows Logs > Application
# Look for DICOM Proxy entries

Log Analysis

Check the application logs for detailed error information:

C:\DicomStorage\logs\dicom-proxy-[date].log

Common log patterns:

  • Started DICOM server on port - Successful DICOM startup
  • HTTP server started on - Successful HTTP API startup
  • License validation successful - License OK
  • Failed to connect to server - Network connectivity issue

Next Steps

After successful installation:

  1. Configuration Reference - Detailed configuration options
  2. API Reference - Learn about available APIs
  3. Examples & Tutorials - Practical implementation examples

For support during installation, refer to the Troubleshooting Guide or check the application logs for detailed error information.