Skip to main content

Python package for managing DICOM images from different modalities

Project description

ci codecov

Dicom Image Tools

The dicom image tools package was created for giving a framework handling DICOM image data. Adding functionality often used for programmatic image analysis.

The package is still in early development and more features will be added.

Install Dicom Image Tools

Install using pipenv by running:

$ pipenv install dicom-image-tools

Install using pip by running:

$ pip install dicom-image-tools

Only Python 3.7+ is supported.

See project wiki for more detailed documentation

Usage

When you've installed the package you import it as any other package using

import dicom_image_tools 

Importing DICOM images

There are two functions for importing DICOM images, import_dicom_file(file: pathlib.Path) and import_dicom_from_folder(folder: pathlib.Path, recursively: bool = True).

The latter function has an optional input argument for specifying if the folder given should be searched for DICOM files recursively, default = True

Both will return the image/-s in DicomStudy objects, the import_dicom_from_folder function returns a dictionary with the Study Instance UID as the key and the corresponding DicomStudy object as value.

You can then add additional files to the DicomStudy object through the DicomStudy.add_file which takes the file path as a pathlib.Path object as input.

The DicomStudy.Series is a list of all series belonging to the study that has been imported. Each DicomStudy.Series item is an object containing the image/image volume and metadata for each image. The image/image volume is accessed through the ImageVolume attribute of the DicomStudy.Series item, and the metadata in the CompleteMetadata attribute.

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

dicom_image_tools-22.3.2.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

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

dicom_image_tools-22.3.2-py3-none-any.whl (47.9 kB view details)

Uploaded Python 3

File details

Details for the file dicom_image_tools-22.3.2.tar.gz.

File metadata

  • Download URL: dicom_image_tools-22.3.2.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for dicom_image_tools-22.3.2.tar.gz
Algorithm Hash digest
SHA256 13c4cef1faa00010c88432c249ba49c6a54ddef2a429570969c8cd55c2fa6b36
MD5 72c446ca0707a9763731a4ac3d8b2a65
BLAKE2b-256 4840d2f08a71cdf865b0c0a0f0dc2dba5a3fb90caa4e70b4644e48a87c5f05d4

See more details on using hashes here.

File details

Details for the file dicom_image_tools-22.3.2-py3-none-any.whl.

File metadata

  • Download URL: dicom_image_tools-22.3.2-py3-none-any.whl
  • Upload date:
  • Size: 47.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.12

File hashes

Hashes for dicom_image_tools-22.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 30181d63c117045e2aeeb4658d93e9c45637eb8fca9266d54a187c7794ac0346
MD5 446a59f2954af345296f5523f6d60dba
BLAKE2b-256 d319019999ecd3cc5c515f387439c220bb23e7a0e82c4136b482df1022d304c7

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