SelectData method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short SelectData (ILEADRaster *pRasterDst, LPDISPATCH pRasterSrc, OLE_COLOR crColor, long lSrcLowBit, long lSrcHighBit, long lThreshold, VARIANT_BOOL bCombine);

Overview

Refer to Grayscale Images

Remarks

(Medical only) Selects a specified number of bits of an 8, 12 or 16-bit grayscale bitmap and puts them into a mask, then colors the bitmap depending on the mask. This can show bitmap variances depending on user-defined conditions.

This method is used as a visualization aid. You can select certain bits of the supported type bitmap and show the variances of that bitmap under conditions that you define.

When the method returns successfully pRasterDst will be updated with a 24-bit RGB bitmap.

For 8, 12 and 16-bit grayscale bitmap, the lSrcLowBit can range from 0 to 7, 11, and 15 respectively. However, if this value exceeds the range, then the method will not return an error, and the pRasterDst will be a pure black bitmap.

For 8, 12 and 16-bit grayscale bitmap, the lSrcHighBit can range from lSrcLowBit to 7, 11, and 15 respectively. No error will be returned if lSrcHighBit is greater than 7, 11 or 15. The method will return an invalid parameter error if lSrcHighBit < lSrcLowBit.

The method will first construct a mask from bits lSrcLowBit through lSrcHighBit. For each pixel, the pixel value will be combined with the mask using a bitwise ‘and’ operation. The result will be shifted to the right by lSrcLowBit. This result will be compared with the threshold: if the value is greater than or equal to the threshold, the output pixel’s color is changed using crColor. If the result is less than the threshold, the output is set to 0.

This method supports 8, 12 and 16-bit grayscale bitmaps only. Support for 12 and 16-bit grayscale images are 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:

WindowLevel, GrayScaleToDuotone, GrayScaleToMultitone, ShiftData, ColorizeGray, SelectiveColor

Topics:

Raster Image Functions: Doing Color Expansion or Reduction