Skip to main content

Minimal command-line tool for decompressing DICOM files with compressed pixel data.

Project description

dicom-decompress

A command-line utility for decompressing DICOM files with compressed pixel data. Optionally, ff photometric interpretation is one of YBR_FULL, YBR_FULL_422, PALETTE COLOR pixel data will be transcoded to RBG.

Installation

pip install dicom-decompress

This will install the terminal command dicom-decompress in your environment.

Some transfer syntaxes need the c++ library GDCM installed. Install this by

conda install gdcm -c conda-forge

See here on how to install conda.

To decompress a single file run

dicom-decompress in.dcm out.dcm

where in.dcm is the file to decompress and out.dcm is the decompressed target file. To attempt transcoding for non monochrome or rgb images add the --transcode flag:

dicom-decompress --transcode in.dcm out.dcm

To decompress multiple files in-place run e.g.

find . -name "*.dcm" -exec echo {} \; -exec dicom-decompress --transcode {} {} \;

Dependencies

Development

Update your .pypirc file in your home directory to include

index-servers = 
	pypi
	<your other servers...>

[pypi]
repository: https://upload.pypi.org/legacy/
username: <your pypi username>

...
  • To build: python setup.py sdist bdist_wheel (requires python3 + wheel package)
  • To install: pip install --force-reinstall dist/dicom_decompress-x.y.z-py3-none-any.whl, (x.y.z is version, see setup.py)
  • To publish
    • Install twine: pip install twine
    • Build package (cf. above)
    • Make sure it passes the twine check: twine check dist/*
    • Publish: twine upload dist/*

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-decompress-1.0.0.tar.gz (3.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_decompress-1.0.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file dicom-decompress-1.0.0.tar.gz.

File metadata

  • Download URL: dicom-decompress-1.0.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for dicom-decompress-1.0.0.tar.gz
Algorithm Hash digest
SHA256 28302c90e22abd44765fe2bc37d77ab9729ca4a15ac07c84850eef4e52f2d048
MD5 1b56f44c85847e37f8dcd8765738d76b
BLAKE2b-256 45c476c7d371f3c14c388e70bd373b3ac9cf464704fcb6250cef11d283608b43

See more details on using hashes here.

File details

Details for the file dicom_decompress-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dicom_decompress-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.8

File hashes

Hashes for dicom_decompress-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d0a303df0541aa938a50c7dc2ce8c45a6cdb8a6e28bd482eefe6bce01eb0c3c
MD5 751b629172b8b3ac96590306c0588581
BLAKE2b-256 eebda8a953a2737c257bec48825a48643ab600b31e86774cade6ed066c5d6175

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