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/*
- Install twine:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dicom-decompress-1.1.0.tar.gz
.
File metadata
- Download URL: dicom-decompress-1.1.0.tar.gz
- Upload date:
- Size: 4.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd872d1e84f8bc8aec23ab5ce3d788dc141c0b5dc536e2806256ce46c3c5a55b |
|
MD5 | 2bed826dd4788b37a3391a248c15e92f |
|
BLAKE2b-256 | ea091c219d4fd9e08f468f233f6013892a3f3f48df01a0f189448524c9164fb5 |
File details
Details for the file dicom_decompress-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: dicom_decompress-1.1.0-py3-none-any.whl
- Upload date:
- Size: 8.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3ad04720f4924d7916803377561c7fea087dde85a8f237cbeebf5c2d8e359e5 |
|
MD5 | 3136eec398bd51c60884475ea6834463 |
|
BLAKE2b-256 | 673846aa5638eeb3c167b4541e6b81b68998c3187613049b58cb57f82def2dcb |