Skip to main content

Utility functions for easy DICOM management.

Project description

DICOM Utils

Collection of helpful scripts and Python methods for working with DICOMs.

Setup

This repo can be installed with pip. To install to a virtual environment:

  1. Run make init to create a virtual environment with dicom-utils installed.
  2. Call utilities with venv/bin/python -m dicom_utils

Alternatively, install the repo without a virtual environment and run the entrypoints provided by setup.py

  1. pip install . or pip install -e .
  2. Run utilities anywhere as dicomcat, dicomfind, etc.

Usage

The following scripts are provided:

  • dicomcat - Print DICOM metadata output as text or JSON
  • dicomfind - Find valid DICOM files, with options to filter by image type
  • dicomphi - Find and overwrite PHI across DICOM files
  • dicom2img - Convert DICOM to static image or GIF
  • dicom_types - Print unique values of the "Image Type" field
  • dicom_overlap - Find StudyInstanceUID values shared by files in two directories

PHI Anonymization Rules

If anonymization is enabled when running dicomphi, fields defined in this script are anonymized with the exception of fields which are affected by additional rules located here.

pynvjpeg

To install pynvjpeg for accelerated JPEG2000 decoding, install the j2k extra.

$ pip install -e ".[j2k,dev]"

The following steps may be required:

  1. apt install cmake

  2. Add CUDA tools to path

CUDA_FOLDER="cuda-12.0"
export PATH="/usr/local/$CUDA_FOLDER/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/$CUDA_FOLDER/lib64:$LD_LIBRARY_PATH"
  1. apt -y install python3-pybind11

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-utils-1.0.10.tar.gz (240.9 kB view details)

Uploaded Source

Built Distribution

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

dicom_utils-1.0.10-py3-none-any.whl (135.6 kB view details)

Uploaded Python 3

File details

Details for the file dicom-utils-1.0.10.tar.gz.

File metadata

  • Download URL: dicom-utils-1.0.10.tar.gz
  • Upload date:
  • Size: 240.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for dicom-utils-1.0.10.tar.gz
Algorithm Hash digest
SHA256 304248ed2042137f0bcbcedd8e5fc423340502914cb5e6e75b9abd8375a7ff43
MD5 547659b4e9e2a3d331f0158fef83b760
BLAKE2b-256 ff4c3f412300b8a273b0048ae87d906b3f9adeb5aa8cd50521cf85b51a1d0761

See more details on using hashes here.

File details

Details for the file dicom_utils-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: dicom_utils-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 135.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for dicom_utils-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 d0ccb99a6b16ded80c2167ea60b2a212f9f286ac34f752fdf0e571d99d8cfb68
MD5 b94a95e878f6ab816c9edf68e0e5c101
BLAKE2b-256 f130db185821f3dab79c342ab512a0f30650c0ceda432f1363a14b944c2fc32a

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