GetBitmapValue method (ILEADDicomDS)

VB.NET example

C# example

Visual Basic example

Visual C++ 6.0 example

 

Syntax

short GetBitmapValue ( long lIndex, short nBitsPerPixel, short nOrder, long lFlags);

Overview

Refer to Working with Data Sets.

Remarks

Updates the Bitmap property with the image associated with the Pixel Data Element specified by the CurrentElement property.

If more than one image is present, lIndex specifies which image to get. lIndex is zero-based.

For a table of possible Compression, Photometric, BitsPerPixel, and Quality Factor combinations, refer to Compression Table.

 

If DICOM_GETIMAGE_ALLOW_RANGE_EXPANSION is set in lFlags, consider the
following example:

If the dataset has the following attributes:
Bits allocated 16
Bits stored 12
Pixel Range 0 - +4095
Pixel Representation is unsigned (0)
Photometric Interpretation is MONOCHROME2
Rescale Slope 1
Rescale Intercept -1024

After applying the rescale slope and the intercept:

Output minimum pixel value = (0 * 1 +(-1024)) = -1024
Output maximum pixel value = (4095 * 1 + (-1024)) = 3071

The new pixel value range (–1024 to 3071) can’t be represented with the current bits stored (12 bits), which can represent values in the range (–2048 to 2048). In this case the function will change the high bit inside the bitmap handle to be 12 instead of 11 (bits stored becomes 13), which can represent values in the range (–8192 to 8191). Please note that the function won’t be able to update the high bit and/or low bit if the number of bits stored was already equal to the number of bits allocated.

See Also

Elements:

Bitmap property, SetBitmapValue method

Topics:

Data Sets: Getting and Setting Data Element Values