Download the PHP package rbraunm/class_dicom without Composer

On this page you can find all versions of the php package rbraunm/class_dicom. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package class_dicom

class_dicom.php

A PHP library for working with DICOM medical images: tag reading and writing, JPEG conversion, compression, multiframe-to-video, and DICOM networking (C-ECHO, C-STORE send and receive). It drives the DCMTK command-line toolkit under a typed, namespaced PHP API.

Version 2 is a clean-room rewrite on PHP 8.5 with a first-class object API (DICOM\*, PACS\*) and value objects for dates, names, and UIDs. The original procedural surface (dicom_tag, dicom_convert, dicom_net, and the global helpers) is preserved as a compatibility shim so v1 code keeps running unchanged -- it now emits deprecation notices pointing at the v2 equivalents. See Migrating from v1.

Originally created by Dean Vaughan (deanvaughan.org).

Requirements

On Debian/Ubuntu:

DCMTK tools are resolved from PATH by default. If your installation lives elsewhere, construct a DCMTK\Toolkit with the directory and hand it to whichever object you use (every entry point accepts an optional Toolkit):

Installation

Then load Composer's autoloader (require __DIR__ . '/vendor/autoload.php';). There is no single file to copy -- the library is autoloaded.

Quick start

Reading tags

Writing tags

Typed setters take validated value objects and persist in place:

DICOM to JPEG

JPEG to DICOM

Convert::fromJpeg() builds a Secondary Capture object and generates the study, series, and SOP UIDs; fill identifying tags with typed setters afterward. No XML template is required.

Compression

Multiframe to video

Networking

Migrating from v1

Existing v1 code runs unchanged against the compatibility shim, which emits deprecation notices:

The examples/ directory contains a worked migration for every operation: each script shows the v1 form as a "Before" block and the runnable v2-native "After" that bypasses the shim. A full element-by-element mapping lives in docs/migration-v1-to-v2.md.

A few migration notes:

Testing

The suite runs under PHPUnit, with independent oracles (pydicom and pynetdicom) validating that files the library produces are correct when read by a separate implementation -- not just round-tripped through the same tools that wrote them.

API reference

v2 API

Namespace / class Purpose
DICOM\File Open a file; typed get/set accessors keyed by the Tag enum
DICOM\Dataset Raw tag access by group/element (get, put, all)
DICOM\Tag Enum of known tags
DICOM\Convert JPEG render, thumbnail, JPEG/PDF import, multiframe video
DICOM\Compress Compress / decompress pixel data
DICOM\Value\* PersonName, Date, Time, DateTime, UID value objects
PACS\EchoSCU C-ECHO verification
PACS\SCU C-STORE send (send, sendDirectory)
PACS\SCP C-STORE receive server
PACS\Peer / PACS\Association / PACS\TransferSyntaxProposal Connection, AE, and negotiation settings
DCMTK\Toolkit Locates the DCMTK binaries (PATH or an explicit directory)

Compatibility shim (deprecated)

Class / function v2 replacement
dicom_tag DICOM\File / DICOM\Dataset
dicom_convert DICOM\Convert / DICOM\Compress
dicom_net PACS\EchoSCU / PACS\SCU / PACS\SCP
is_dcm($file) DICOM\File::isDICOM($path)
Execute($command) DCMTK\Tool (internal)

Examples

Each script in examples/ is a v1-to-v2 migration recipe.

File Operation
get_tags.php, get_tags_webbased.php Read tags
write_tags.php Write tags
dcm_to_jpg.php Render to JPEG + thumbnail
jpg_to_dcm.php Build a DICOM from a JPEG
compress.php, uncompress.php Compress / decompress
send_dcm.php C-STORE send one file
send_directory.php Send and archive a directory
store_server.php, store_server_handler.php, store_server_config.cfg C-STORE receive server

Acknowledgments

This library wraps DCMTK, the DICOM Toolkit developed and maintained by OFFIS e.V., a non-profit research institute in Oldenburg, Germany. DCMTK is distributed under a 3-clause BSD license that permits this use freely; it is credited and linked here as a matter of attribution and courtesy, not obligation. DCMTK is a runtime dependency you install separately -- this library invokes its command-line tools and does not bundle or redistribute them.

License

Apache-2.0. See NOTICE.


Supported in part by the work of OneSourceIT.


All versions of class_dicom with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
psr/log Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rbraunm/class_dicom contains the following files

Loading the files please wait ...