Science Score: 59.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
✓Committers with academic emails
2 of 98 committers (2.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.1%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Read, modify and write DICOM files with python code
Basic Info
- Host: GitHub
- Owner: pydicom
- License: other
- Language: Python
- Default Branch: main
- Homepage: https://pydicom.github.io/pydicom/dev
- Size: 126 MB
Statistics
- Stars: 2,052
- Watchers: 63
- Forks: 506
- Open Issues: 12
- Releases: 31
Topics
Metadata Files
README.md
pydicom
pydicom is a pure Python package for working with DICOM files. It lets you read, modify and write DICOM data in an easy "pythonic" way. As a pure Python package, pydicom can run anywhere Python runs without any other requirements, although if you're working with Pixel Data then we recommend you also install NumPy.
Note that pydicom is a general-purpose DICOM framework concerned with reading and writing DICOM datasets. In order to keep the project manageable, it does not handle the specifics of individual SOP classes or other aspects of DICOM. Other libraries both inside and outside the pydicom organization are based on pydicom and provide support for other aspects of DICOM, and for more specific applications.
Examples are pynetdicom, which is a Python library for DICOM networking, and deid, which supports the anonymization of DICOM files.
Installation
Using pip:
pip install pydicom
Using conda:
conda install -c conda-forge pydicom
For more information, including installation instructions for the development version, see the installation guide.
Documentation
The pydicom user guide, tutorials, examples and API reference documentation is available for both the current release and the development version on GitHub Pages.
Pixel Data
Compressed and uncompressed Pixel Data is always available to be read, changed and written as bytes: ```python
from pydicom import dcmread from pydicom.data import gettestdatafile path = gettestdatafile("CT_small.dcm") ds = dcmread(path) type(ds.PixelData)
len(ds.PixelData) 32768 ds.PixelData[:2] b'\xaf\x00'
```
If NumPy is installed, Pixel Data can be converted to an ndarray using the Dataset.pixel_array property:
```python
arr = ds.pixel_array arr.shape (128, 128) arr array([[175, 180, 166, ..., 203, 207, 216], [186, 183, 157, ..., 181, 190, 239], [184, 180, 171, ..., 152, 164, 235], ..., [906, 910, 923, ..., 922, 929, 927], [914, 954, 938, ..., 942, 925, 905], [959, 955, 916, ..., 911, 904, 909]], dtype=int16) ```
Decompressing Pixel Data
JPEG, JPEG-LS and JPEG 2000
Converting JPEG, JPEG-LS or JPEG 2000 compressed Pixel Data to an
ndarrayrequires installing one or more additional Python libraries. For information on which libraries are required, see the pixel data handler documentation.
RLE
Decompressing RLE Pixel Data only requires NumPy, however it can be quite slow. You may want to consider installing one or more additional Python libraries to speed up the process.
Compressing Pixel Data
Information on compressing Pixel Data using one of the below formats can be found in the corresponding encoding guides. These guides cover the specific requirements for each encoding method and we recommend you be familiar with them when performing image compression.
JPEG-LS, JPEG 2000
Compressing image data from an ndarray or bytes object to JPEG-LS or JPEG 2000 requires installing the following:
- JPEG-LS requires pyjpegls
- JPEG 2000 requires pylibjpeg and the pylibjpeg-openjpeg plugin
RLE
Compressing using RLE requires no additional packages but can be quite slow. It can be sped up by installing pylibjpeg with the pylibjpeg-rle plugin, or gdcm.
Examples
More examples are available in the documentation.
Change a patient's ID ```python from pydicom import dcmread
ds = dcmread("/path/to/file.dcm")
Edit the (0010,0020) 'Patient ID' element
ds.PatientID = "12345678" ds.saveas("/path/to/fileupdated.dcm") ```
Display the Pixel Data
With NumPy and matplotlib ```python import matplotlib.pyplot as plt from pydicom import dcmread, examples
The path to the example "ct" dataset included with pydicom
path: "pathlib.Path" = examples.get_path("ct") ds = dcmread(path)
arr is a numpy.ndarray
arr = ds.pixel_array
plt.imshow(arr, cmap="gray") plt.show() ```
Contributing
We are all volunteers working on pydicom in our free time. As our resources are limited, we very much value your contributions, be it bug fixes, new core features, or documentation improvements. For more information, please read our contribution guide.
Owner
- Name: DICOM in Python
- Login: pydicom
- Kind: organization
- Repositories: 24
- Profile: https://github.com/pydicom
development for software, modules, and containers for dicom applications that use Python
GitHub Events
Total
- Issues event: 56
- Watch event: 140
- Delete event: 21
- Issue comment event: 248
- Push event: 132
- Pull request event: 106
- Pull request review event: 271
- Pull request review comment event: 217
- Fork event: 32
- Create event: 21
Last Year
- Issues event: 56
- Watch event: 140
- Delete event: 21
- Issue comment event: 248
- Push event: 132
- Pull request event: 106
- Pull request review event: 271
- Pull request review comment event: 217
- Fork event: 32
- Create event: 21
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| scaramallion | s****n | 415 |
| Darcy Mason | d****n@g****m | 405 |
| mrbean-bremen | m****n | 188 |
| rhaxton | r****n@g****m | 119 |
| Suever | s****r@g****m | 71 |
| dependabot[bot] | 4****] | 46 |
| Dimitri Papadopoulos Orfanos | 3****s | 43 |
| vsoch | v****t@s****u | 36 |
| pre-commit-ci[bot] | 6****] | 29 |
| Guillaume Lemaitre | g****8@g****m | 24 |
| lamy | d****l@l****t | 12 |
| Chris Bridge | c****4@g****m | 10 |
| Markus D. Herrmann | h****d | 10 |
| Alex Rothberg | a****g@g****m | 10 |
| Joan Massich | m****k@g****m | 9 |
| James Kerns | j****0@g****m | 9 |
| Korijn van Golen | k****n@c****m | 9 |
| Aditya Panchal | a****l@b****g | 8 |
| Simon Biggs | me@s****t | 7 |
| Thomas Robitaille | t****e@g****m | 7 |
| Brendan Moloney | m****n@g****m | 6 |
| Matthew Shun-Shin | m@s****m | 6 |
| Blair Conrad | b****r@b****m | 5 |
| p.l.zajdel | p****l@g****m | 5 |
| youngkiu | y****u@g****m | 4 |
| Markus Mattes | m****7@g****m | 4 |
| Zvi Baratz | z****z@g****m | 3 |
| Félix C. Morency | f****y@g****m | 3 |
| Tim | t****n@g****m | 3 |
| ferdymercury | f****y | 2 |
| and 68 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 226
- Total pull requests: 447
- Average time to close issues: 10 months
- Average time to close pull requests: about 1 month
- Total issue authors: 150
- Total pull request authors: 40
- Average comments per issue: 4.53
- Average comments per pull request: 2.1
- Merged pull requests: 378
- Bot issues: 0
- Bot pull requests: 103
Past Year
- Issues: 49
- Pull requests: 117
- Average time to close issues: 15 days
- Average time to close pull requests: 2 days
- Issue authors: 36
- Pull request authors: 16
- Average comments per issue: 2.27
- Average comments per pull request: 1.17
- Merged pull requests: 90
- Bot issues: 0
- Bot pull requests: 31
Top Authors
Issue Authors
- scaramallion (23)
- darcymason (18)
- CPBridge (5)
- naterichman (4)
- hackermd (4)
- ZviBaratz (3)
- erikogabrielsson (3)
- BJladika (3)
- Kri-Ol (3)
- kwijk (3)
- rconnaughton (3)
- mrbean-bremen (3)
- bersbersbers (2)
- yehudahkay (2)
- joon612 (2)
Pull Request Authors
- scaramallion (187)
- dependabot[bot] (74)
- darcymason (45)
- pre-commit-ci[bot] (29)
- DimitriPapadopoulos (27)
- mrbean-bremen (19)
- CPBridge (9)
- hackermd (3)
- ZviBaratz (3)
- emmanuel-ferdman (2)
- bocchris-aws (2)
- jstark-tpx (2)
- katia-sentry (2)
- naterichman (2)
- yarikoptic (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 18
-
Total downloads:
- pypi 1,168,781 last-month
- Total docker downloads: 180,338
-
Total dependent packages: 334
(may contain duplicates) -
Total dependent repositories: 1,562
(may contain duplicates) - Total versions: 144
- Total maintainers: 8
pypi.org: pydicom
A pure Python package for reading and writing DICOM data
- Documentation: https://pydicom.readthedocs.io/
- License: MIT License
-
Latest release: 3.0.1
published over 1 year ago
Rankings
Maintainers (3)
spack.io: py-pydicom
Pure python package for DICOM medical file reading and writing pydicom is a pure Python package for working with DICOM files. It lets you read, modify and write DICOM data in an easy "pythonic" way.
- Homepage: https://github.com/pydicom/pydicom
- License: []
-
Latest release: 2.4.3
published over 2 years ago
Rankings
Maintainers (1)
alpine-edge: py3-pydicom-pyc
Precompiled Python bytecode for py3-pydicom
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 3.0.1-r0
published over 1 year ago
Rankings
Maintainers (1)
conda-forge.org: pydicom
pydicom is a pure python package for parsing DICOM files. DICOM is a standard (https://dicomstandard.org) for communicating medical images and related information such as reports and radiotherapy objects. pydicom makes it easy to read these complex files into natural pythonic structures for easy manipulation. Modified datasets can be written again to DICOM format files. See the `Getting Started <https://pydicom.github.io/pydicom/stable/>`_ page for installation and basic information, and the `Pydicom User Guide
- Homepage: http://github.com/pydicom/pydicom
- License: MIT
-
Latest release: 2.3.1
published over 3 years ago
Rankings
proxy.golang.org: github.com/pydicom/pydicom
- Documentation: https://pkg.go.dev/github.com/pydicom/pydicom#section-documentation
- License: other
-
Latest release: v3.0.1+incompatible
published over 1 year ago
Rankings
alpine-edge: py3-pydicom
Read, modify and write DICOM files with python
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 3.0.1-r0
published over 1 year ago
Rankings
Maintainers (1)
pypi.org: pyjpegls
JPEG-LS for Python via CharLS C++ Library
- Documentation: https://pyjpegls.readthedocs.io/
- License: MIT
-
Latest release: 1.5.1
published over 1 year ago
Rankings
Maintainers (3)
pypi.org: ukritlib
Testing Python Package From Ukrit Fongsomboon
- Homepage: https://github.com/ukritfongsomboon/ukritlib
- Documentation: https://ukritlib.readthedocs.io/
- License: MIT
-
Latest release: 0.3.13
published almost 5 years ago
Rankings
Maintainers (1)
pypi.org: medcog-dicom-anonymizer
Program to anonymize dicom files with default and custom rules.
- Documentation: https://medcog-dicom-anonymizer.readthedocs.io/
- License: MIT
-
Latest release: 1.0.8
published almost 2 years ago
Rankings
Maintainers (1)
anaconda.org: pydicom
pydicom is a pure python package for parsing DICOM files. DICOM is a standard (https://dicomstandard.org) for communicating medical images and related information such as reports and radiotherapy objects. pydicom makes it easy to read these complex files into natural pythonic structures for easy manipulation. Modified datasets can be written again to DICOM format files. See the `Getting Started <https://pydicom.github.io/pydicom/stable/>`_ page for installation and basic information, and the `Pydicom User Guide
- Homepage: https://github.com/pydicom/pydicom
- License: MIT
-
Latest release: 3.0.1
published 6 months ago
Rankings
alpine-v3.22: py3-pydicom-pyc
Precompiled Python bytecode for py3-pydicom
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 3.0.1-r0
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.21: py3-pydicom-pyc
Precompiled Python bytecode for py3-pydicom
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 3.0.1-r0
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.19: py3-pydicom
Read, modify and write DICOM files with python
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 2.4.3-r0
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.19: py3-pydicom-pyc
Precompiled Python bytecode for py3-pydicom
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 2.4.3-r0
published over 2 years ago
Rankings
Maintainers (1)
alpine-v3.22: py3-pydicom
Read, modify and write DICOM files with python
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 3.0.1-r0
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.21: py3-pydicom
Read, modify and write DICOM files with python
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 3.0.1-r0
published over 1 year ago
Rankings
Maintainers (1)
alpine-v3.20: py3-pydicom
Read, modify and write DICOM files with python
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 2.4.4-r1
published almost 2 years ago
Rankings
Maintainers (1)
alpine-v3.20: py3-pydicom-pyc
Precompiled Python bytecode for py3-pydicom
- Homepage: https://github.com/pydicom/pydicom
- License: MIT AND BSD-3-Clause
-
Latest release: 2.4.4-r1
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- pypa/gh-action-pypi-publish master composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite