ImageGear .NET v25.2 - Updated
BuildColorLimitsLUT Method
Example 




ImageGear.Formats.Dicom Assembly > ImageGear.Formats.DICOM Namespace > ImGearDICOM Class : BuildColorLimitsLUT Method
Lower pixel value limit. All pixels at or below this value will be pseudocolored.
An RGB value that will be used to fill (i.e. pseudocolor) the pixels with intensities equal or smaller than lowThreshold.
Higher pixel value limit. All pixels at or above this value will be pseudocolored.
An RGB value that will be used to fill (i.e. pseudocolor) the pixels with intensities equal or greater than highThreshold.
Lookup table to fill. It should contain three single-channel LUTs with input and output depths set to 8.
Builds a LUT that highlights image extremes.
Syntax
'Declaration
 
Public Shared Sub BuildColorLimitsLUT( _
   ByVal lowThreshold As Integer, _
   ByVal lowFillColor As ImGearPixel, _
   ByVal highThreshold As Integer, _
   ByVal highFillColor As ImGearPixel, _
   ByVal lookupTable As ImGearRGBLUT _
) 
'Usage
 
Dim lowThreshold As Integer
Dim lowFillColor As ImGearPixel
Dim highThreshold As Integer
Dim highFillColor As ImGearPixel
Dim lookupTable As ImGearRGBLUT
 
ImGearDICOM.BuildColorLimitsLUT(lowThreshold, lowFillColor, highThreshold, highFillColor, lookupTable)
public static void BuildColorLimitsLUT( 
   int lowThreshold,
   ImGearPixel lowFillColor,
   int highThreshold,
   ImGearPixel highFillColor,
   ImGearRGBLUT lookupTable
)
public: static void BuildColorLimitsLUT( 
   int lowThreshold,
   ImGearPixel* lowFillColor,
   int highThreshold,
   ImGearPixel* highFillColor,
   ImGearRGBLUT* lookupTable
) 
public:
static void BuildColorLimitsLUT( 
   int lowThreshold,
   ImGearPixel^ lowFillColor,
   int highThreshold,
   ImGearPixel^ highFillColor,
   ImGearRGBLUT^ lookupTable
) 

Parameters

lowThreshold
Lower pixel value limit. All pixels at or below this value will be pseudocolored.
lowFillColor
An RGB value that will be used to fill (i.e. pseudocolor) the pixels with intensities equal or smaller than lowThreshold.
highThreshold
Higher pixel value limit. All pixels at or above this value will be pseudocolored.
highFillColor
An RGB value that will be used to fill (i.e. pseudocolor) the pixels with intensities equal or greater than highThreshold.
lookupTable
Lookup table to fill. It should contain three single-channel LUTs with input and output depths set to 8.
Remarks
This method fills the lookup table (LUT) so that it highlights the brightest and darkest pixels in a grayscale image. Use this method to initialize ImageGear.Display.ImGearPageDisplay.LUT property. This is typically used to clearly see pixel values that are over-saturated (255 and up) or under-saturated (0 and below). However, this method lets you to customize the settings for the upper and lower pixel value limits with lowThreshold and highThreshold.

ImageGear.Display.ImGearPageDisplay.LUT property is used on the last stage of display processing, after that all geometric, color space and depth conversions have been done. This allows you to use a 24-bit RGB to 24-bit RGB lookup table for displaying images of any color space and depth.

Example
ImGearPageDisplay pageDisplay = igPageView.Display;
// Highlight low values with blue
ImGearPixel lowColor = new ImGearPixel(3, 8);
lowColor[0] = 0;
lowColor[1] = 0;
lowColor[2] = 255;
// Highlight high values with red
ImGearPixel highColor = new ImGearPixel(3, 8);
highColor[0] = 255;
highColor[1] = 0;
highColor[2] = 0;
ImGearRGBLUT LUT = new ImGearRGBLUT(8, 8);
ImGearContrastSettings contrastSettings = ImGearContrastSettings.CreateDefault();
ImGearDICOM.BuildColorLimitsLUT(0, lowColor, 255, highColor, LUT);
pageDisplay.UpdateLUT(LUT, contrastSettings);
Dim pageDisplay As ImGearPageDisplay = igPageView.Display
' Highlight low values with blue
Dim lowColor As ImGearPixel = New ImGearPixel(3, 8)
lowColor(0) = 0
lowColor(1) = 0
lowColor(2) = 255
' Highlight high values with red
Dim highColor As ImGearPixel = New ImGearPixel(3, 8)
highColor(0) = 255
highColor(1) = 0
highColor(2) = 0
Dim LUT As ImGearRGBLUT = New ImGearRGBLUT(8, 8)
Dim contrastSettings As ImGearContrastSettings = ImGearContrastSettings.CreateDefault()
ImGearDICOM.BuildColorLimitsLUT(0, lowColor, 255, highColor, LUT)
pageDisplay.UpdateLUT(LUT, contrastSettings)
See Also

Reference

ImGearDICOM Class
ImGearDICOM Members
ImGearPixel Class
ImGearRGBLUT Class

Is this page helpful?
Yes No
Thanks for your feedback.