dicom_converter.utils.dicom_to_img¶
Created on Wed Sep 1 15:44:11 2021
Module with functions used to convert DICOM files (.dcm) to .png/.bmp and .json files and from .png/.bmp to DICOM.
The function ‘compress_to_png’ calls executables from OpenJPEG (https://www.openjpeg.org/) available at ‘https://github.com/uclouvain/openjpeg/releases/tag/v2.4.0’.
Functions
|
Compresses an image to a .png with a specified ‘compress_ratio’ |
|
Divides dicom file into a .json file with the dicom metadata and a .’img_format’ file containing the image. |
|
Creates a dicom from a .json file or a .png/.bmp file |
|
Get tag value from .json fiel containing DICOM metadata |
|
Extract array from dicom dataset ‘dcm’ with [0,256] pixel intensities. |