←Select platform

WindowLevelFillLookupTableExt Method

Summary
Fills the user-allocated 16-bit LUT with values ranging between the  startColor and  endColor colors according to the selected LUT type.
Syntax
C#
Objective-C
C++/CLI
Python
public static void WindowLevelFillLookupTableExt( 
   RasterColor16[] lookupTable, 
   RasterColor16 startColor, 
   RasterColor16 endColor, 
   int low, 
   int high, 
   int lowBit, 
   int highBit, 
   int minValue, 
   int maxValue, 
   int factor, 
   RasterPaletteWindowLevelFlags flags 
) 
+(BOOL)windowLevelFillLookupTableExt:(NSArray*)lookupTable 
                          startColor:(LTRasterColor16*)startColor 
                            endColor:(LTRasterColor16*)endColor 
                                 low:(int)low 
                                high:(int)high 
                              lowBit:(unsigned int)lowBit 
                             highBit:(unsigned int)highBit 
                            minValue:(int)minValue 
                            maxValue:(int)maxValue 
                              factor:(int)factor 
                               flags:(LTRasterPaletteWindowLevelFlags)flags 
                               error:(NSError**)outError; 
public: 
static void WindowLevelFillLookupTableExt(  
   array<RasterColor16>^ lookupTable, 
   RasterColor16 startColor, 
   RasterColor16 endColor, 
   int low, 
   int high, 
   int lowBit, 
   int highBit, 
   int minValue, 
   int maxValue, 
   int factor, 
   RasterPaletteWindowLevelFlags flags 
)  
def WindowLevelFillLookupTableExt(self,] lookupTable,startColor,endColor,low,high,lowBit,highBit,minValue,maxValue,factor,flags): 

Parameters

lookupTable
Pointer to an array to be updated with the 16-bit RGB quad (i.e. lookup table).

startColor
Starting color value for the gradient.

endColor
Ending color value for the gradient.

low
The low value of the window width, in pixels.

high
The high value for the window width, in pixels.

lowBit
Value indicating the low bit used for leveling.

This is normally 0 and should be less than the  highBit.

highBit
Value indicating the high bit used for leveling.

This should be greater than or equal to  lowBit and less than 11 for 12-bit grayscale or 15 for 16-bit grayscale.

minValue
The image minimum value. This value can be obtained using MinMaxValuesCommand.

maxValue
The image maximum value. This value can be obtained using MinMaxValuesCommand.

factor
Value that indicates the factor to be applied in the method operation specified in the  flags parameter.

This parameter is used only if  flags is RasterPaletteWindowLevelFlags.Exponential, RasterPaletteWindowLevelFlags.Logarithmic or RasterPaletteWindowLevelFlags.Sigmoid.

If RasterPaletteWindowLevelFlags.Exponential or RasterPaletteWindowLevelFlags.Sigmoid is specified, its value can be any integer (+/-). If RasterPaletteWindowLevelFlags.Logarithmic is specified, its value should be >>= 0. If  factor = 0, the lookup table will be filled linearly.

flags
Flags that indicate how the range is used to fill and the type of the lookup table and whether it contains signed or unsigned data.

Remarks

This method is available in the Medical Toolkits.

Use this method to fill in the lookup table, used in RasterImage.WindowLevelExtCommand, according to the lookup table type flag.

The lookup table will be filled as follows:

Inside/OutsideMinValue-LowLow-HighHigh-MaxValue
RasterPaletteWindowLevelFlags.Insidesolid black (0,0,0)color gradient ranging from startColor to endColorsolid white (255,255,255)
RasterPaletteWindowLevelFlags.Outsidesolid color (startColor)grayscale values from solid black (0,0,0) to solid white (255, 255, 255)solid color (endColor)
RasterPaletteWindowLevelFlags.Inside | RasterPaletteWindowLevelFlags.DicomStyleNonecolor gradient ranging from startColor to endColorNone
RasterPaletteWindowLevelFlags.Outside | RasterPaletteWindowLevelFlags.DicomStylesolid color (startColor)color gradient ranging from startColor to endColorsolid color (endColor)

To fill an 8-bit lookup table use WindowLevelFillLookupTable.

Only TIFF and DICOM file formats are capable of saving images that have been window-leveled.

Images can be window-leveled by calling RasterImage.WindowLevel and specifying RasterWindowLevelMode.PaintAndProcessing for the  flags parameter, by using the WindowLevelExt 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 Saving Window-Leveled Images.

LEADTOOLS supports two types of LUTs for 10-16-bit grayscale images (8-bit LUT and 16-bit LUT). Typical grayscale image display and processing is done using an 8-bit LUT. But, you can also use a 16-bit LUT, which offers more precision. Some special video cards and monitors also support display of grayscale images using a 16-bit LUT.

For more information, refer to Introduction to Image Processing With LEADTOOLS.

For more information, refer to Grayscale Images.

Requirements

Target Platforms

Help Version 23.0.2024.5.22
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.