spydcmtk


Namespydcmtk JSON
Version 1.2.2 PyPI version JSON
download
home_pagehttps://github.com/fraser29/spydcmtk
SummarySimple python dicom toolkit.
upload_time2025-01-07 16:40:18
maintainerNone
docs_urlNone
authorFraser M. Callaghan
requires_python>=3.9.0
licenseMIT
keywords medical imaging mri ct dicom
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. 

## Version

Current is VERSION 1.2.2 Release. 

- 1.2.2: Fix DICOM to VTK conversion bug. Add 4DFlow MRI to VTK conversion capability. 
- 1.2.1: Add filter by tag name and value. Add build image overview option. Update to use pydicom >=3.0.1
- 1.2.0: Improved stability of VTK conversion. Bug fixes. Add basic interactive functionality. Add functionality to construct 4D-flow datasets. Add reliance on external library ngawari for basic IO operations, format conversion and vtk filter actions. 
- 1.1.9: Permit user naming of series directory when writing at series level. Assistance for modifying tag values. 
- 1.1.8: Added improved functionality for dicom to: VTK image data; and VTK structured grid data conversion
- 1.1.7: Add basic DCM-SEG read/write/conversion functionality. Rewrote dcm2vtk routines for improved consistency in some edge cases. 
- 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 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": "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/42/ef/612a477af438bf9aa8142d834b3d557305e736582bb6cca46483b4f83e28/spydcmtk-1.2.2.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.2.2 Release. \n\n- 1.2.2: Fix DICOM to VTK conversion bug. Add 4DFlow MRI to VTK conversion capability. \n- 1.2.1: Add filter by tag name and value. Add build image overview option. Update to use pydicom >=3.0.1\n- 1.2.0: Improved stability of VTK conversion. Bug fixes. Add basic interactive functionality. Add functionality to construct 4D-flow datasets. Add reliance on external library ngawari for basic IO operations, format conversion and vtk filter actions. \n- 1.1.9: Permit user naming of series directory when writing at series level. Assistance for modifying tag values. \n- 1.1.8: Added improved functionality for dicom to: VTK image data; and VTK structured grid data conversion\n- 1.1.7: Add basic DCM-SEG read/write/conversion functionality. Rewrote dcm2vtk routines for improved consistency in some edge cases. \n- 1.1.5: Add option to retrieve tag value from commandline. Small bug fix on safe naming. \n- 1.1.4: Additional configuration moved to config file. DCM2VTI active. \n- 1.1.1: Add option to keep private tags when running anonymisation. Dcm2nii path configurable from config file. \n- 1.1.0: Some bug fixes and restrict the use of dicom to vti (WIP)\n- 1.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 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 \n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple python dicom toolkit.",
    "version": "1.2.2",
    "project_urls": {
        "Homepage": "https://github.com/fraser29/spydcmtk"
    },
    "split_keywords": [
        "medical",
        " imaging",
        " mri",
        " ct",
        " dicom"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7a2d4598826cd95f796632f66cd25bd6a600c1a5a5014453db5db1694508e71f",
                "md5": "7245619b313e6deaf431f5d394bd0e33",
                "sha256": "8b821ec8aa383dc04ef883bd376381a5c9e7f7edd3cd7e545d1a77881ec54f7f"
            },
            "downloads": -1,
            "filename": "spydcmtk-1.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7245619b313e6deaf431f5d394bd0e33",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.0",
            "size": 1534935,
            "upload_time": "2025-01-07T16:40:15",
            "upload_time_iso_8601": "2025-01-07T16:40:15.411930Z",
            "url": "https://files.pythonhosted.org/packages/7a/2d/4598826cd95f796632f66cd25bd6a600c1a5a5014453db5db1694508e71f/spydcmtk-1.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "42ef612a477af438bf9aa8142d834b3d557305e736582bb6cca46483b4f83e28",
                "md5": "03ec3cb4a7a38a1dfd55d833908301d1",
                "sha256": "914be548d20b3d32b29c85d6066ee960bfe3c66b43954e02dbc6a0b862488db9"
            },
            "downloads": -1,
            "filename": "spydcmtk-1.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "03ec3cb4a7a38a1dfd55d833908301d1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.0",
            "size": 1530621,
            "upload_time": "2025-01-07T16:40:18",
            "upload_time_iso_8601": "2025-01-07T16:40:18.317823Z",
            "url": "https://files.pythonhosted.org/packages/42/ef/612a477af438bf9aa8142d834b3d557305e736582bb6cca46483b4f83e28/spydcmtk-1.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-07 16:40:18",
    "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: 0.63484s