Visual Basic (Declaration) | |
---|---|
Public Sub WindowLevel( _ ByVal lowBit As Integer, _ ByVal highBit As Integer, _ ByVal palette() As RasterColor, _ ByVal mode As RasterWindowLevelMode _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public void WindowLevel( int lowBit, int highBit, RasterColor[] palette, RasterWindowLevelMode mode ) |
C++/CLI | |
---|---|
public: void WindowLevel( int lowBit, int highBit, array<RasterColor>^ palette, RasterWindowLevelMode mode ) |
Parameters
- lowBit
- Value indicating the low bit used for leveling. 0 <= RasterImage.LowBit <= RasterImage.HighBit <= (11 for 12-bit grayscale or 15 for 16-bit grayscale).
- highBit
- Value indicating the high bit used for leveling. 0 <= RasterImage.LowBit <= RasterImage.HighBit <= (11 for 12-bit grayscale or 15 for 16-bit grayscale).
- palette
- Optional 8-bit lookup table that can be used to implement a user defined conversion. For every intensity value between 0 and 2 raised to the power of (RasterImage.HighBit - RasterImage.LowBit + 1)-1 there should be a corresponding entry in the lookup table that contains a color. If palette is null (Nothing in Visual Basic), the conversion is a normal shift (right or left) and the painted image is 8-bit grayscale. If palette is not null (Nothing in Visual Basic), the painted image is a 24-bit image.
- mode
- Value indicating whether palette is used by the paint and image processing methods or only by the paint methods.
Visual Basic | Copy Code |
---|---|
Public Sub WindowLevelExample() |
C# | Copy Code |
---|---|
public void WindowLevelExample() |
This method is available in the (Document/Medical only) Toolkits.
Provides "on demand" window leveling for the paint methods and does not alter the image data. To convert the image data to a window leveled image, use WindowLevelCommand.
If RasterWindowLevelMode.PaintAndProcessing is specified, then all image processing methods will take the palette into account.
Only TIFF and DICOM file formats are capable of saving images that have been window-leveled. Images can be window-leveled by calling WindowLevel and specifying RasterWindowLevelMode.PaintAndProcessing for the mode parameter, by using the WindowLevelCommand or by loading an image from a file format that supports Window Leveling. If a window-leveled image is saved as any other file format, the image data will be converted before being saved. For more information, refer to
For a version of this function that uses an 8-bit palette, see WindowLevelExt.
Saving Window-Leveled Images.
For more information, refer to Introduction to Image Processing With LEADTOOLS.
For more information, refer to Grayscale Images.
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family