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.10+ 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-24.2.1.tar.gz (39.1 kB view details)

Uploaded Source

Built Distribution

dicom_image_tools-24.2.1-py3-none-any.whl (49.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dicom_image_tools-24.2.1.tar.gz
  • Upload date:
  • Size: 39.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for dicom_image_tools-24.2.1.tar.gz
Algorithm Hash digest
SHA256 f785032afcc38fea1727836473bd48e607a871e908b7e66fe4488bfe3d0efd31
MD5 88e993d2976f4288479f8636541dd728
BLAKE2b-256 c7673197bf74c9fa4c447e3c5c685b7a61f75580f756409660e7c173eb7b391b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dicom_image_tools-24.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8ae6d969f57ed4233133add8ed71d663bbcba027167c96119e60601b909fe764
MD5 de3d21e71ed86436c8979b3504fda187
BLAKE2b-256 91f0c393ab5ef4061b81135518eb37cba1ef5a28b20542d3c9c747cb26eaed44

See more details on using hashes here.

Supported by

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