ShiftZeroToNegative method (ILEADRasterProcess)

Visual Basic example

Visual C++ example

 

Syntax

short ShiftZeroToNegative(ILEADRaster * pRaster, long lShiftAmount, long lMinInput, long lMaxInput, long lMinOutput, long lMaxOutput);

Overview

Refer to Examining and Altering Bitmaps.

Remarks

(Raster Pro and above only) Converts an unsigned bitmap to a signed bitmap by decreasing intensity values by a specific amount.

By decreasing the intensity values of the bitmap (creating some negative values), a value of zero in the original bitmap would be shifted to a value of –lShiftAmount.

This method is similar to ConvertUnsignedToSigned method. However, ShiftZeroToNegative lets the user determine the value by which to shift the data, while in ConvertUnsignedToSigned, the shift is fixed always. (i.e. shift center to zero.)

The ShiftMinimumToZero method and ShiftZeroToNegative method are most often used in concert with one or more image processing or analysis methods. ShiftMinimumToZero converts signed data to unsigned data, in preparation for some image processing or analysis. (Most image processing methods work only on unsigned data.) After the image processing or analysis is performed, ShiftZeroToNegative converts the unsigned data back to signed data.

This method doesn’t support 8-bit images.

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.

This method supports signed data images.

See Also

Elements:

ConvertUnsignedToSigned method, ConvertSignedToUnsigned method, ShiftMinimumToZero method

Topics:

Raster Images: Modifying Intensity Values