spydcmtk


Namespydcmtk JSON
Version 1.2.12 PyPI version JSON
download
home_pageNone
SummarySimple python dicom toolkit.
upload_time2025-08-25 15:53:44
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9.0
licenseMIT
keywords ct dicom imaging medical mri
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # *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. 


## 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 usage 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 over writing 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-documentation](https://fraser29.github.io/spydcmtk/)

## Works in progress

Basic handling of DicomSegmentation images is added :

- [x] writing a label map to dicom segmentation
- [x] basic reading a dicom segmentation and writing to vti/vts
- [ ] handling multi label dicom segmentations
- [ ] improved, explicit handling of data orientation for
  - [ ] multi-volume dicom images
  - [ ] multi-label dicom seg images 
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "spydcmtk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.0",
    "maintainer_email": null,
    "keywords": "ct, dicom, imaging, medical, mri",
    "author": null,
    "author_email": "\"Fraser M. Callaghan\" <callaghan.fm@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/07/2e/e3e75c18024c75fe520b3651ba89c92b95a886e8be9fba742d9c4710da1c/spydcmtk-1.2.12.tar.gz",
    "platform": null,
    "description": "# *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\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 usage 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 over writing 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-documentation](https://fraser29.github.io/spydcmtk/)\n\n## Works in progress\n\nBasic handling of DicomSegmentation images is added :\n\n- [x] writing a label map to dicom segmentation\n- [x] basic reading a dicom segmentation and writing to vti/vts\n- [ ] handling multi label dicom segmentations\n- [ ] improved, explicit handling of data orientation for\n  - [ ] multi-volume dicom images\n  - [ ] multi-label dicom seg images ",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple python dicom toolkit.",
    "version": "1.2.12",
    "project_urls": {
        "Homepage": "https://github.com/fraser29/spydcmtk"
    },
    "split_keywords": [
        "ct",
        " dicom",
        " imaging",
        " medical",
        " mri"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c5f962333a450102fdefaf6be80ebae44b681db885f2bdb41733695d2a0504e8",
                "md5": "b9bc6aef59ca3c66674e75d2f669133c",
                "sha256": "701bb879c3dd9b84d3903f115517f1b641cad57b7753c0b45fc8b27e6af3300a"
            },
            "downloads": -1,
            "filename": "spydcmtk-1.2.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b9bc6aef59ca3c66674e75d2f669133c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.0",
            "size": 1549701,
            "upload_time": "2025-08-25T15:53:41",
            "upload_time_iso_8601": "2025-08-25T15:53:41.612266Z",
            "url": "https://files.pythonhosted.org/packages/c5/f9/62333a450102fdefaf6be80ebae44b681db885f2bdb41733695d2a0504e8/spydcmtk-1.2.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "072ee3e75c18024c75fe520b3651ba89c92b95a886e8be9fba742d9c4710da1c",
                "md5": "2d7b016beecfed205007158c76cb1ffc",
                "sha256": "9cdb3ebe4d365efffeabad3ac0fbcd1df83994d6683c78073b688cf252709edb"
            },
            "downloads": -1,
            "filename": "spydcmtk-1.2.12.tar.gz",
            "has_sig": false,
            "md5_digest": "2d7b016beecfed205007158c76cb1ffc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0",
            "size": 1539726,
            "upload_time": "2025-08-25T15:53:44",
            "upload_time_iso_8601": "2025-08-25T15:53:44.299708Z",
            "url": "https://files.pythonhosted.org/packages/07/2e/e3e75c18024c75fe520b3651ba89c92b95a886e8be9fba742d9c4710da1c/spydcmtk-1.2.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-25 15:53:44",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fraser29",
    "github_project": "spydcmtk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "spydcmtk"
}
        
Elapsed time: 3.63272s