DCMTK  Version 3.6.6
OFFIS DICOM Toolkit
dcmimgle: an image processing library and utility apps

This module contains classes to access and render DICOM monochrome images. Support for color images is provided by the module dcmimage. Support for JPEG compressed images is provided by the module dcmjpeg.

The main interface classes are:

Tools

This module contains the following command line tools:

Examples

The following example shows how to load a DICOM single-frame monochrome image and render its pixel data:

DicomImage *image = new DicomImage("test.dcm");
if (image != NULL)
{
if (image->getStatus() == EIS_Normal)
{
if (image->isMonochrome())
{
image->setMinMaxWindow();
Uint8 *pixelData = (Uint8 *)(image->getOutputData(8 /* bits */));
if (pixelData != NULL)
{
/* do something useful with the pixel data */
}
}
} else
cerr << "Error: cannot load DICOM image (" << DicomImage::getString(image->getStatus()) << ")" << endl;
}
delete image;
DicomImage::getString
static const char * getString(const EI_Status status)
convert status code to status string
DicomImage::isMonochrome
int isMonochrome() const
check whether image is monochrome or not.
Definition: dcmimage.h:492
DicomImage
Interface class for dcmimgle/dcmimage module.
Definition: dcmimage.h:58
EIS_Normal
@ EIS_Normal
normal, no error
Definition: diutils.h:226
DicomImage::getOutputData
const void * getOutputData(const int bits=0, const unsigned long frame=0, const int planar=0)
render pixel data and return pointer to internal memory buffer.
Definition: dcmimage.h:422
DicomImage::getStatus
EI_Status getStatus() const
get current status information
Definition: dcmimage.h:202
DicomImage::setMinMaxWindow
int setMinMaxWindow(const int idx=0)
set automatically calculated minimum/maximum window.
Definition: dcmimage.h:627


Generated on Thu Jan 14 2021 for DCMTK Version 3.6.6 by Doxygen 1.8.18