Skip to main content

Python package for managing DICOM images from different modalities

Project description

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-20.2.0.tar.gz (19.5 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-20.2.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dicom_image_tools-20.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for dicom_image_tools-20.2.0.tar.gz
Algorithm Hash digest
SHA256 42d17f7154a1e79dcf3a828ad341a299380c63cab0f39baae311f0f75a606432
MD5 cee5ebd22636bf23cc49f9418153cc67
BLAKE2b-256 f24149cf38a22ad1e80bd7e9e19d189d25949fb09169cea43800ffc184ab609d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dicom_image_tools-20.2.0-py3-none-any.whl
  • Upload date:
  • Size: 27.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for dicom_image_tools-20.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17ba098521230ea479ba7ff2a6a8bc1496171b667bd732705bc69a28c8ec370b
MD5 c22c43874ab83d3c14074865e730d760
BLAKE2b-256 7703ac64212296baff9e759f16557d6d975e69ba5a1a6d80719e1449558ab7d7

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