Skip to main content

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:

  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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spydcmtk-1.2.24.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spydcmtk-1.2.24-py3-none-any.whl (1.6 MB view details)

Uploaded Python 3

File details

Details for the file spydcmtk-1.2.24.tar.gz.

File metadata

  • Download URL: spydcmtk-1.2.24.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

Hashes for spydcmtk-1.2.24.tar.gz
Algorithm Hash digest
SHA256 6c4e641f4406b7d0bc37319f1b959893257eb682307360469c81c7e74006cf54
MD5 51fb40df696ce2c8d6a58fee78bd8471
BLAKE2b-256 ea8554d40bf3835658c79a6bcb579e5ec970d0ab84db1773ab494b69deead5ba

See more details on using hashes here.

File details

Details for the file spydcmtk-1.2.24-py3-none-any.whl.

File metadata

  • Download URL: spydcmtk-1.2.24-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

Hashes for spydcmtk-1.2.24-py3-none-any.whl
Algorithm Hash digest
SHA256 76524082c98aa66d91ff97edc58a6ffbdfa839ded87ce65f89fdf9b3e22e5ab8
MD5 6ee40b9878d7981a28336f9058de84c6
BLAKE2b-256 0c2c60cdf1e1e07f0cbcb12412c361d87de58128645e4b796b2d5f645336c85a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page