# 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
```bash
pip install dicom-decompress
```
This will install the terminal command `dicom-decompress` in your environment.
Some transfer syntaxes need the c++ library [GDCM](http://gdcm.sourceforge.net/) installed. Install this by
```bash
conda install gdcm -c conda-forge
```
See [here](https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/index.html#) on how to install
conda.
To decompress a single file run
```bash
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:
```bash
dicom-decompress --transcode in.dcm out.dcm
```
To decompress multiple files in-place run e.g.
```bash
find . -name "*.dcm" -exec echo {} \; -exec dicom-decompress --transcode {} {} \;
```
### Dependencies
* [numpy](https://pypi.org/project/numpy/)
* [pydicom](https://pypi.org/project/pydicom/)
## Development
Update your `.pypirc` file in your home directory to include
```buildoutcfg
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/*`
Raw data
{
"_id": null,
"home_page": "https://github.com/exini/dicom-decompress",
"name": "dicom-decompress",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Karl Sj\u00f6strand",
"author_email": "karl.sjostrand@exini.com",
"download_url": "https://files.pythonhosted.org/packages/4a/be/553f3d5d3eed16203830dedde031e04b1404fe5d711d49ed8eba6bdd0669/dicom-decompress-1.0.1.tar.gz",
"platform": null,
"description": "# dicom-decompress\n\nA command-line utility for decompressing DICOM files with compressed pixel data. Optionally, ff photometric \ninterpretation is one of `YBR_FULL`, `YBR_FULL_422`, `PALETTE COLOR` pixel data will be transcoded to `RBG`.\n\n\n## Installation\n\n```bash\npip install dicom-decompress\n```\n\nThis will install the terminal command `dicom-decompress` in your environment.\n\nSome transfer syntaxes need the c++ library [GDCM](http://gdcm.sourceforge.net/) installed. Install this by\n```bash\nconda install gdcm -c conda-forge\n```\nSee [here](https://docs.conda.io/projects/continuumio-conda/en/latest/user-guide/install/index.html#) on how to install \nconda.\n\nTo decompress a single file run\n\n```bash\ndicom-decompress in.dcm out.dcm\n```\n\nwhere `in.dcm` is the file to decompress and `out.dcm` is the decompressed target file. To attempt transcoding for non\nmonochrome or rgb images add the `--transcode` flag:\n\n```bash\ndicom-decompress --transcode in.dcm out.dcm\n```\n\nTo decompress multiple files in-place run e.g.\n\n```bash\nfind . -name \"*.dcm\" -exec echo {} \\; -exec dicom-decompress --transcode {} {} \\;\n```\n\n### Dependencies\n\n* [numpy](https://pypi.org/project/numpy/)\n* [pydicom](https://pypi.org/project/pydicom/)\n\n## Development\n\nUpdate your `.pypirc` file in your home directory to include\n```buildoutcfg\nindex-servers = \n\tpypi\n\t<your other servers...>\n\n[pypi]\nrepository: https://upload.pypi.org/legacy/\nusername: <your pypi username>\n\n...\n```\n\n* **To build**: `python setup.py sdist bdist_wheel` *(requires python3 + wheel package)*\n* **To install**: `pip install --force-reinstall dist/dicom_decompress-x.y.z-py3-none-any.whl`, *(x.y.z is version, see\n setup.py)*\n* **To publish**\n * Install twine: `pip install twine`\n * Build package (cf. above)\n * Make sure it passes the twine check: `twine check dist/*`\n * Publish: `twine upload dist/*`\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Minimal command-line tool for decompressing DICOM files with compressed pixel data.",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/exini/dicom-decompress"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "48284eb22acb718f7cc94d889e4b89939b6223f96b62a253f4d329afdd1c38e4",
"md5": "f4d1b95d30c4177269edf0f9cfd95f65",
"sha256": "6a53a04d70c97029d6b16ce70018e8a1c73c972fdf071d28537a9102d5f834a5"
},
"downloads": -1,
"filename": "dicom_decompress-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f4d1b95d30c4177269edf0f9cfd95f65",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8299,
"upload_time": "2023-11-29T21:09:13",
"upload_time_iso_8601": "2023-11-29T21:09:13.251399Z",
"url": "https://files.pythonhosted.org/packages/48/28/4eb22acb718f7cc94d889e4b89939b6223f96b62a253f4d329afdd1c38e4/dicom_decompress-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4abe553f3d5d3eed16203830dedde031e04b1404fe5d711d49ed8eba6bdd0669",
"md5": "22f93e1351ba524de5ef66b2dcf15eb3",
"sha256": "ef735193111aee3376b5df00a56a1243f9a1480c8185ad07f007ab7513460a65"
},
"downloads": -1,
"filename": "dicom-decompress-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "22f93e1351ba524de5ef66b2dcf15eb3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3857,
"upload_time": "2023-11-29T21:09:14",
"upload_time_iso_8601": "2023-11-29T21:09:14.408423Z",
"url": "https://files.pythonhosted.org/packages/4a/be/553f3d5d3eed16203830dedde031e04b1404fe5d711d49ed8eba6bdd0669/dicom-decompress-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-29 21:09:14",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "exini",
"github_project": "dicom-decompress",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "dicom-decompress"
}