Skip to main content

Prints information about DICOM files.

Project description

dicom-info

A command-line tool for displaying DICOM file information.

Description

dicom-info is a simple Python utility that reads and displays information from DICOM (Digital Imaging and Communications in Medicine) files. It provides a straightforward way to inspect DICOM file metadata from the command line, and can also display DICOM images interactively.

Requirements

  • Python >= 3.13
  • pydicom >= 3.0.1
  • matplotlib >= 3.7.0 (for image display)
  • numpy >= 1.24.0 (for image display)

Installation

With uv:

uvx dicom-info

or pip

pip install dicom-info

Usage

The basic syntax is:

dicom-info FILE [FILE ...]

Displaying Metadata

To display DICOM file metadata:

dicom-info path/to/file.dcm
dicom-info file1.dcm file2.dcm file3.dcm

The tool will display information for each DICOM file, including all available metadata and attributes.

Displaying Images

To display DICOM images interactively, use the --display or -d flag:

dicom-info --display path/to/file.dcm
dicom-info -d file1.dcm file2.dcm file3.dcm

Image display features:

  • 2D images: Displayed as grayscale plots with a colorbar
  • 3D images: Displayed with an interactive slider to navigate through slices
  • Multiple files: Each image is shown in its own subplot with the filename as the title

Error Handling

The tool will exit with status code 1 if:

  • Files are not found
  • Files are not valid DICOM files
  • When using --display, if no files contain pixel data

License

This project is licensed under the GNU GPL version 3 license which can be found here.

Contributing

Contributions welcome! Please open an issue or submit a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dicom_info-0.2.0.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dicom_info-0.2.0-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file dicom_info-0.2.0.tar.gz.

File metadata

  • Download URL: dicom_info-0.2.0.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dicom_info-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e8381d5e43a382406ac24ddbd4c2e9968d3bac38321ef6054e267a9d69a28efb
MD5 d9fd8ef6ee59e28e5e94b5bf59e044e6
BLAKE2b-256 ec6dff68a48aa9e68968215e0250b6d0f014541f6d5c21578281eae01f9c6f24

See more details on using hashes here.

File details

Details for the file dicom_info-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dicom_info-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for dicom_info-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8bd3ba1927948505e49df321ca93d78dc3b1f639ea2fd876f92c94b4ac88f3a
MD5 9a1af4625b08f32d4f87ce3837a8461e
BLAKE2b-256 469bbfa6efabf7a0679b290976102eb997c7652015672e768f56c307648e45b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page