Download the PHP package aurabx/dcmtk-php without Composer
On this page you can find all versions of the php package aurabx/dcmtk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package dcmtk-php
dcmtk-php
A PHP wrapper for DCMTK (DICOM Toolkit), providing utilities for working with DICOM medical imaging files.
This is a modernized fork of class_dicom.php by Dean Vaughan, updated for PHP 8.3+ and maintained by Aurabox.
Requirements
- PHP 8.3 or higher
- DCMTK binaries installed and accessible
- (Optional) ffmpeg for video conversion
Installation
1. Install DCMTK
macOS (Homebrew):
Ubuntu/Debian:
Windows: Download from DCMTK releases and add to PATH.
2. Install via Composer
Configuration
The library auto-detects DCMTK binaries in common locations (/opt/homebrew/bin, /usr/local/bin). To specify a custom path:
Environment variable:
Or in PHP:
Usage
Reading DICOM Tags
Writing DICOM Tags
Converting DICOM to JPEG
Creating Thumbnails
Compression/Decompression
DICOM Network Operations
C-ECHO (DICOM Ping)
C-STORE (Send DICOM)
Store SCP (Receive DICOM)
Validating DICOM Files
API Reference
Tag Class
| Method | Description |
|---|---|
setFilePath(string $file) |
Set the DICOM file to work with |
loadTags(bool $uidNames = true) |
Load all tags from the file |
getTag(string $group, string $element) |
Get a specific tag value |
writeTags(array $tags) |
Write tags to the file |
Convert Class
| Method | Description |
|---|---|
dcmToJpg() |
Convert DICOM to JPEG |
dcmToThumbnail() |
Create a thumbnail |
uncompress(string $newFile = '') |
Decompress JPEG DICOM |
compressToJpeg(string $newFile = '') |
Compress to JPEG lossless |
multiFrameToVideo(string $format, int $framerate) |
Convert multi-frame to video |
Net Class
| Method | Description |
|---|---|
echoscu(string $host, int $port, ...) |
DICOM echo (ping) |
sendDcm(string $host, int $port, ...) |
Send DICOM file(s) |
storeServer(string $dcmDir, ...) |
Start a DICOM storage server |
Testing
Tests use mocked command execution and don't require DCMTK binaries.
License
MIT License - see licence.txt
Credits
- Original class_dicom.php by Dean Vaughan
- DCMTK by OFFIS