Simple python dicom toolkit.
Project description
spydcmtk
Simple PYthon DiCoM Tool Kit
Dicom organisational, querying and conversion toolkit
spydcmtk is a pure Python package built on top of 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:
pip install spydcmtk
Quick start
If you installed via pip then spydcmtk console script will be exposed in your python environment.
Access via:
spydcmtk -h
to see the commandline usage available to you.
If you would like to incorporate spydcmtk into your python project, then import as:
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:
- source_code_directory/spydcmtk.conf (file with default settings)
- $HOME/spydcmtk.conf
- $HOME/.spydcmtk.conf
- $HOME/.config/spydcmtk.conf
- Full file path defined at environment variable: "SPYDCMTK_CONF"
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spydcmtk-1.2.22.tar.gz.
File metadata
- Download URL: spydcmtk-1.2.22.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf9b90584005ba0c5fca6ee84317395f6ca20ea2f32ec0c16d337230e148233d
|
|
| MD5 |
d8646faec526d77e69054d4fe1614008
|
|
| BLAKE2b-256 |
b0424e2941a458cf5d96715e26e7afde90ee1444ba23753075e01aa1a7838b8d
|
File details
Details for the file spydcmtk-1.2.22-py3-none-any.whl.
File metadata
- Download URL: spydcmtk-1.2.22-py3-none-any.whl
- Upload date:
- Size: 1.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5dd4dfaa20ed28b6d88b03e46e8584d9709522c970086f36aa62fba9a720f57
|
|
| MD5 |
b1b3dc4d4fee71e124797bf833fed6c9
|
|
| BLAKE2b-256 |
74125a6a7fa7250e4d86089027ff8cfec4cfcab0d2b5a8b360d49665118210de
|