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.9+ 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-23.1.0.tar.gz (38.0 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-23.1.0-py3-none-any.whl (48.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dicom_image_tools-23.1.0.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for dicom_image_tools-23.1.0.tar.gz
Algorithm Hash digest
SHA256 3baf0cb4273a02270a321b3496ba6e5d17cf942b9fabc80e68be0b813bc4b53e
MD5 c065450bc8f37a12a9e0b52d9d4eab89
BLAKE2b-256 984d1a3c4fe716a472274927c0773050fa49e752e4de25e07ee1b46769d57c3f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dicom_image_tools-23.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b8f60ffe89486ba877d08b336482c10aa3be90c69f8047f149176318f3c4724
MD5 9c3beda8fbf4b8d924ca73942f57ca1f
BLAKE2b-256 b6eda8d6a2f93e3334adc871af7d97a49a193519c7287660fb5e9ddcb7d766b3

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