# *spydcmtk*
*Simple PYthon DiCoM Tool Kit*
Dicom organisational, querying and conversion toolkit
*spydcmtk* is a pure Python package built on top of [*pydicom*](https://github.com/pydicom/pydicom).
This package extends pydicom with a class structure based upon the Patient-Study-Series-Image hierarchy. In addition, it provides a number of built in routines for common actions when working with dicom files, such as human readable renaming, anonymisation, searching and summarising.
## Version
Current is VERSION 1.1.5 Release.
1.1.5: Add option to retrieve tag value from commandline. Small bug fix on safe naming.
1.1.4: Additional configuration moved to config file. DCM2VTI active.
1.1.1: Add option to keep private tags when running anonymisation. Dcm2nii path configurable from config file.
1.1.0: Some bug fixes and restrict the use of dicom to vti (WIP)
1.0.0: Initial Release
## Installation
Using [pip](https://pypi.org/project/spydcmtk/):
```
pip install spydcmtk
```
## Quick start
If you installed via pip then *spydcmtk* console script will be exposed in your python environment.
Access via:
```bash
spydcmtk -h
```
to see the commandline useage available to you.
If you would like to incorporate spydcmtk into your python project, then import as:
```python
import spydcmtk
listOfStudies = spydcmtk.dcmTK.ListOfDicomStudies.setFromDirectory(MY_DICOM_DIRECTORY)
# Example filtering
dcmStudy = listOfStudies.getStudyByDate('20230429') # Dates in dicom standard string format: YYYYMMDD
dcmSeries = dcmStudy.getSeriesBySeriesNumber(1)
# Example writing new dicom files with anonymisation
dcmStudy.writeToOrganisedFileStructure(tmpDir, anonName='Not A Name')
```
# Configuration
spydcmtk uses a spydcmtk.conf file for configuration.
By default spydcmtk.conf files are search for in the following locations:
1. source_code_directory/spydcmtk.conf (file with default settings)
2. $HOME/spydcmtk.conf
3. $HOME/.spydcmtk.conf
4. $HOME/.config/spydcmtk.conf
5. Full file path defined at environment variable: "SPYDCMTK_CONF"
6. Full path passed as commandline argument to `spydcmtk`
Files are read in the above order with each subsequent variable present overwritting any previously defined.
For information on files found and variables used run:
`spydcmtk -INFO`
## Documentation
Clear documentation of basic features can be seen by running the *"spycmtk -h"* command as referenced above.
For detailed documentation please see [spydcmtk-documnetation](https://fraser29.github.io/spydcmtk/)
Raw data
{
"_id": null,
"home_page": "https://github.com/fraser29/spydcmtk",
"name": "spydcmtk",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9.0",
"maintainer_email": null,
"keywords": "medical, imaging, mri, ct, dicom",
"author": "Fraser M. Callaghan",
"author_email": "callaghan.fm@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ec/85/7840ae12a148ef08586c066bedafa24d1c34ab0b664942cf9f43892be486/spydcmtk-1.1.6.tar.gz",
"platform": null,
"description": "\n# *spydcmtk*\n\n*Simple PYthon DiCoM Tool Kit*\n\nDicom organisational, querying and conversion toolkit\n\n*spydcmtk* is a pure Python package built on top of [*pydicom*](https://github.com/pydicom/pydicom).\n\nThis package extends pydicom with a class structure based upon the Patient-Study-Series-Image hierarchy. In addition, it provides a number of built in routines for common actions when working with dicom files, such as human readable renaming, anonymisation, searching and summarising. \n\n## Version\n\nCurrent is VERSION 1.1.5 Release. \n\n1.1.5: Add option to retrieve tag value from commandline. Small bug fix on safe naming. \n1.1.4: Additional configuration moved to config file. DCM2VTI active. \n1.1.1: Add option to keep private tags when running anonymisation. Dcm2nii path configurable from config file. \n1.1.0: Some bug fixes and restrict the use of dicom to vti (WIP)\n1.0.0: Initial Release\n\n## Installation\n\nUsing [pip](https://pypi.org/project/spydcmtk/):\n```\npip install spydcmtk\n```\n\n## Quick start\n\nIf you installed via pip then *spydcmtk* console script will be exposed in your python environment. \n\nAccess via:\n```bash\nspydcmtk -h\n```\nto see the commandline useage available to you.\n\n\nIf you would like to incorporate spydcmtk into your python project, then import as:\n```python\nimport spydcmtk\n\nlistOfStudies = spydcmtk.dcmTK.ListOfDicomStudies.setFromDirectory(MY_DICOM_DIRECTORY)\n# Example filtering\ndcmStudy = listOfStudies.getStudyByDate('20230429') # Dates in dicom standard string format: YYYYMMDD\ndcmSeries = dcmStudy.getSeriesBySeriesNumber(1)\n# Example writing new dicom files with anonymisation\ndcmStudy.writeToOrganisedFileStructure(tmpDir, anonName='Not A Name')\n\n```\n\n\n# Configuration\n\nspydcmtk uses a spydcmtk.conf file for configuration. \n\nBy default spydcmtk.conf files are search for in the following locations: \n\n1. source_code_directory/spydcmtk.conf (file with default settings)\n2. $HOME/spydcmtk.conf\n3. $HOME/.spydcmtk.conf\n4. $HOME/.config/spydcmtk.conf\n5. Full file path defined at environment variable: \"SPYDCMTK_CONF\"\n6. Full path passed as commandline argument to `spydcmtk`\n\nFiles are read in the above order with each subsequent variable present overwritting any previously defined. \nFor information on files found and variables used run:\n\n`spydcmtk -INFO` \n\n\n## Documentation\n\nClear documentation of basic features can be seen by running the *\"spycmtk -h\"* command as referenced above. \nFor detailed documentation please see [spydcmtk-documnetation](https://fraser29.github.io/spydcmtk/)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simple python dicom toolkit.",
"version": "1.1.6",
"project_urls": {
"Homepage": "https://github.com/fraser29/spydcmtk"
},
"split_keywords": [
"medical",
" imaging",
" mri",
" ct",
" dicom"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3e0ae0a99cf8c978d226c4c8ef810cb8db7afd4b3c69855808073cfe735d4252",
"md5": "0c68ff0919d21539283b3a5fba1a49c3",
"sha256": "a605feffa93d91fcbeaa4dc25fe08647cf7dd255a64ab316d1009af8bed93842"
},
"downloads": -1,
"filename": "spydcmtk-1.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0c68ff0919d21539283b3a5fba1a49c3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9.0",
"size": 1528428,
"upload_time": "2024-04-02T11:49:25",
"upload_time_iso_8601": "2024-04-02T11:49:25.080062Z",
"url": "https://files.pythonhosted.org/packages/3e/0a/e0a99cf8c978d226c4c8ef810cb8db7afd4b3c69855808073cfe735d4252/spydcmtk-1.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ec857840ae12a148ef08586c066bedafa24d1c34ab0b664942cf9f43892be486",
"md5": "d7638034cedcb70516581f18395f8f84",
"sha256": "128248db803b2aea8425d1c6989c7cfa2c75a1273542a5fa0516b8a92bd0af3b"
},
"downloads": -1,
"filename": "spydcmtk-1.1.6.tar.gz",
"has_sig": false,
"md5_digest": "d7638034cedcb70516581f18395f8f84",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9.0",
"size": 1523720,
"upload_time": "2024-04-02T11:49:31",
"upload_time_iso_8601": "2024-04-02T11:49:31.316565Z",
"url": "https://files.pythonhosted.org/packages/ec/85/7840ae12a148ef08586c066bedafa24d1c34ab0b664942cf9f43892be486/spydcmtk-1.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-02 11:49:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "fraser29",
"github_project": "spydcmtk",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "spydcmtk"
}