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-21.10.3.tar.gz (24.1 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-21.10.3-py3-none-any.whl (32.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dicom_image_tools-21.10.3.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for dicom_image_tools-21.10.3.tar.gz
Algorithm Hash digest
SHA256 46c98bec80448c1ce94edd11ccf7699c45260b1e470f86b9188f8e47d4022460
MD5 ce7339170133ad4f58d60a41b48333c2
BLAKE2b-256 8fc25f4caf37a6f318479247b1258295d5e61faf0ac56587a10df49a439d50e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dicom_image_tools-21.10.3-py3-none-any.whl
  • Upload date:
  • Size: 32.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for dicom_image_tools-21.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bcea471d2d1d94c2c0cd6bedea5a34fe4b7840b3ee54584a67b40e2b573332ea
MD5 e544f66863405d6189ee31eafa4b7aba
BLAKE2b-256 dbaf7cccc7bcfd9584bad7bb39355b01da5b3a10f40deacaf591e890bc8982df

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