DigitalSubtract method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short DigitalSubtract (ILEADRaster *pRasterDst, ILEADRaster *pRasterSrc, long lFlags);

Overview

Refer to Examining and Altering Bitmaps

Remarks

(Medical only) Subtracts the live (destination) bitmap from the mask (source) bitmap to show the differences between the two bitmaps.

Performs a digital subtraction between two images. The resulting image may be enhanced using the lFlags options. Digital subtraction is mainly used to show the differences or the changes between two images. For the process to be meaningful both images should be related to each other. Digital Subtraction Angiography (DSA) is a practical example of digital subtraction.

Digital Subtraction Angiography (DSA) and Quality Control (QC) are both major fields that use image subtraction. An example of DSA is explained below.

DSA is a technology used for the visualization of blood vessels in the human body. A mask image is obtained using X-ray film of the body part of interest. Then vessels of that part are injected using a contrast medium. A sequence of images is taken after the injection. These are called live images. After applying subtraction between the mask and live images the resulting images are images that show the passage of the contrast medium in the vessels.

Both pRasterDst and pRasterSrct should have the same bits per pixel, number of channels and image dimensions; otherwise the method will return an error code.

If DS_CONTRASTENH is set then the contrast of the subtracted image will be enhanced.

If DS_OPTIMIZERANGE is set then the tonal range of the subtracted image will be optimized. That is, the image intensity will be distributed among the full image intensity range.

The result of the subtraction is placed in pRasterDst.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits. It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

ShiftData method, SelectData method, ColorizeGray method, MultiScaleEnhancement method, Combine method

Topics:

Raster Images: Modifying Intensity Values