Name | dicom-csv JSON |
Version |
0.4.0
JSON |
| download |
home_page | https://github.com/neuro-ml/dicom-csv |
Summary | Utils for gathering, aggregation and handling metadata from DICOM files. |
upload_time | 2025-07-09 14:48:18 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT License
Copyright (c) 2017-2023 NeuroML Group
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
dicom
|
VCS |
 |
bugtrack_url |
|
requirements |
pydicom
pandas
numpy
tqdm
more_itertools
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Utils for gathering, aggregation and handling metadata from DICOM files.
# Installation
From pip
```
pip install dicom-csv
```
or from GitHub
```bash
git clone https://github.com/neuro-ml/dicom-csv
cd dicom-csv
pip install -e .
```
# Example `join_tree`
```python
>>> from dicom_csv import join_tree
>>> folder = '/path/to/folder/'
>>> meta = join_tree(folder, verbose=2)
>>> meta.head(3)
```
| AccessionNumber | AcquisitionDate | ... | WindowCenter | WindowWidth |
| -------------: | -------------: | :---: | --------: | :---------: |
|000002621237 |20200922 |... |-500.0 |1500.0 |
|000002621237 |20200922 |... |-40.0 |400.0 |
|000002621237 |20200922 |... |-500.0 |1500.0 |
3 rows x 155 columns
# Example load 3D image
from a series of dicom files (each containing 2D image)
```python
from dicom_csv import join_tree, order_series, stack_images
from pydicom import dcmread
from pathlib import Path
# 1. Collect metadata from all dicom files
folder = Path('/path/to/folder/')
meta = join_tree(folder, verbose=2)
# 2. Select series to load
uid = '...' # unique identifier of a series you want to load,
# you could list them by `meta.SeriesInstanceUID.unique()`
series = meta.query("SeriesInstanceUID==@uid")
# 3. Read files & combine them into a single volume
images2d = [dcmread(folder / row[1].PathToFolder / row[1].FileName) for row in series.iterrows()]
image3d = stack_images(order_series(images2d))
```
# Documentation
You can find the documentation [here](https://dicom-csv.readthedocs.io/en/latest/index.html).
Raw data
{
"_id": null,
"home_page": "https://github.com/neuro-ml/dicom-csv",
"name": "dicom-csv",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "DICOM",
"author": null,
"author_email": "NeuroML Group <max@ira-labs.com>",
"download_url": "https://files.pythonhosted.org/packages/ed/bb/7e98bc18c133a61efe59534747f3a9d51446287573dd7b6609b8bbdb6d80/dicom_csv-0.4.0.tar.gz",
"platform": null,
"description": "Utils for gathering, aggregation and handling metadata from DICOM files.\n\n# Installation\n\nFrom pip\n```\npip install dicom-csv\n```\n\nor from GitHub\n\n```bash\ngit clone https://github.com/neuro-ml/dicom-csv\ncd dicom-csv\npip install -e .\n```\n\n# Example `join_tree`\n\n```python\n>>> from dicom_csv import join_tree\n>>> folder = '/path/to/folder/'\n>>> meta = join_tree(folder, verbose=2)\n>>> meta.head(3)\n```\n| AccessionNumber | AcquisitionDate | ... | WindowCenter | WindowWidth |\n| -------------: | -------------: | :---: | --------: | :---------: |\n|000002621237 \t |20200922 |... |-500.0 |1500.0 |\n|000002621237 \t |20200922 |... |-40.0 |400.0 |\n|000002621237 \t |20200922 |... |-500.0 |1500.0 |\n3 rows x 155 columns\n\n\n# Example load 3D image\nfrom a series of dicom files (each containing 2D image)\n\n```python\nfrom dicom_csv import join_tree, order_series, stack_images\nfrom pydicom import dcmread\nfrom pathlib import Path\n\n# 1. Collect metadata from all dicom files\nfolder = Path('/path/to/folder/')\nmeta = join_tree(folder, verbose=2)\n\n# 2. Select series to load\nuid = '...' # unique identifier of a series you want to load,\n # you could list them by `meta.SeriesInstanceUID.unique()`\nseries = meta.query(\"SeriesInstanceUID==@uid\")\n\n# 3. Read files & combine them into a single volume\nimages2d = [dcmread(folder / row[1].PathToFolder / row[1].FileName) for row in series.iterrows()] \nimage3d = stack_images(order_series(images2d))\n```\n\n# Documentation\n\nYou can find the documentation [here](https://dicom-csv.readthedocs.io/en/latest/index.html).\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2017-2023 NeuroML Group\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Utils for gathering, aggregation and handling metadata from DICOM files.",
"version": "0.4.0",
"project_urls": {
"Docs": "https://dicom-csv.readthedocs.io/en/latest/index.html",
"Download": "https://github.com/neuro-ml/dicom-csv/v0.4.0.tar.gz",
"Homepage": "https://github.com/neuro-ml/dicom_csv",
"Issues": "https://github.com/neuro-ml/dicom_csv/issues",
"Source": "https://github.com/neuro-ml/dicom_csv"
},
"split_keywords": [
"dicom"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "edbb7e98bc18c133a61efe59534747f3a9d51446287573dd7b6609b8bbdb6d80",
"md5": "fe063021de31a9e3fe6105f9ee480eed",
"sha256": "a53cd9ee321db433ea586995e46569220cd5f755bf59dffa1b3d82e8adbaa49c"
},
"downloads": -1,
"filename": "dicom_csv-0.4.0.tar.gz",
"has_sig": false,
"md5_digest": "fe063021de31a9e3fe6105f9ee480eed",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 20359,
"upload_time": "2025-07-09T14:48:18",
"upload_time_iso_8601": "2025-07-09T14:48:18.220396Z",
"url": "https://files.pythonhosted.org/packages/ed/bb/7e98bc18c133a61efe59534747f3a9d51446287573dd7b6609b8bbdb6d80/dicom_csv-0.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-09 14:48:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "neuro-ml",
"github_project": "dicom-csv",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pydicom",
"specs": [
[
"<",
"4.0"
],
[
">=",
"3.0"
]
]
},
{
"name": "pandas",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "more_itertools",
"specs": []
}
],
"lcname": "dicom-csv"
}