DICOM (DIC) files are commonly used in medical images. LEADTOOLS reads a broad range of DICOM formats, converting them to LEAD-supported bits-per-pixel as necessary.
Read Support is provided in all toolkits. Full support for this file format is available in Medical Imaging toolkits.
LEADTOOLS writes DICOM files in the LEAD-supported bits-per-pixel. DICOM files can contain many comment fields of various types. Use the L_ReadFileComment function to read comments in an existing file. Before writing a file, use the L_SetComment function to create an array of comments to be saved in the file. Use the L_DeleteComment function to delete a comment field from a file.
You can read DICOM files as follows:
Grayscale files in the 1- to 16-bit range are loaded as they are in the original file.
Palettized color files in the 1- to 16-bit range are converted to 8-bit palettized or 24-bit unpalettized. By default, they are converted to 24-bit only if the palette contains more than 256 colors.
Unpalettized color files (RGB, ARGB, or CMYK) with 1 to 16 bits per plane are converted to 24-bit RGB.
Read multipage DICOM files by setting the page number in LOADFILEOPTION.
You can write DICOM files as 8, 12, or 16-bit grayscale, 8-bit palettized color, or 24-bit RGB color (8 bits per plane).
It is possible to speed up the loading of large DIC files. For more information, refer to Using Filter Data to Speed up Loading Large Files.
The file constants associated with this file format are:
|Constant||Read Support||Write Support||Description|
|FILE_DICOM_GRAY||1 to 16 BPP (Grayscale)||1 to 16 BPP (Grayscale)|| Grayscale DICOM uncompressed.|
|FILE_DICOM_COLOR||8, 24 BPP||8, 24 BPP|| Color DICOM uncompressed.|
|FILE_DICOM_RLE_GRAY||1 to 16 BPP (Grayscale)||1 to 16 BPP (Grayscale)|| Grayscale DICOM RLE compressed.|
|FILE_DICOM_RLE_COLOR||8, 24 BPP||8, 24 BPP|| Color DICOM RLE compressed.|
|FILE_DICOM_JPEG_GRAY||8, 16 BPP (Grayscale)||8, 16 BPP (Grayscale)|| Grayscale DICOM JPEG compressed.|
|FILE_DICOM_JPEG_COLOR||24 BPP||24 BPP|| Color DICOM JPEG compressed.|
|FILE_DICOM_J2K_GRAY||8, 16 BPP (Grayscale)||8, 16 BPP (Grayscale)|| Grayscale DICOM JPEG 2000 compressed.|
|FILE_DICOM_J2K_COLOR||24 BPP||24 BPP|| Color DICOM JPEG 2000 compressed.|
|FILE_DICOM_JPEG_LS_GRAY||8, 16 BPP (Grayscale)||8, 16 BPP (Grayscale)|| Grayscale DICOM JPEG-LS compressed.|
|FILE_DICOM_JPEG_LS_COLOR||24 BPP||24 BPP|| Color DICOM JPEG-LS compressed.|
|FILE_DICOM_JPX_GRAY||8, 16 BPP (Grayscale)||8, 16 BPP (Grayscale)|| Grayscale DICOM JPEG 2000 Part 2 compressed.|
|FILE_DICOM_JPX_COLOR||24 BPP||24 BPP|| Color DICOM JPEG 2000 Part 2 compressed.|
Required DLLs and Libraries
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries