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.
Usage
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for dicom_image_tools-19.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a8e424cc55591a6a1747beef006c784f0d509729bf528a0ec0b628d97e3408b |
|
MD5 | 51570c14a1f1d85279da3e71b4058852 |
|
BLAKE2b-256 | 11e09a82ccca3eccf2a5a08bcbecee503ff11023a1a82cc0d2193291d6207da0 |