Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.3.5
MaxValue Property
See Also 
Leadtools Namespace > RasterImage Class : MaxValue Property




Gets or sets the images maximum grayscale value.

Syntax

Visual Basic (Declaration) 
Public Property MaxValue As Integer
Visual Basic (Usage)Copy Code
Dim instance As RasterImage
Dim value As Integer
 
instance.MaxValue = value
 
value = instance.MaxValue
C# 
public int MaxValue {get; set;}
Managed Extensions for C++ 
public: __property int get_MaxValue();
public: __property void set_MaxValue( 
   int value
);
C++/CLI 
public:
property int MaxValue {
   int get();
   void set (int value);
}

Return Value

Maximum grayscale value.

Example

For an example, refer to WindowLevel and WindowLevelCommand

Remarks

For every value between 0 and MinValue, Black (RGB(0,0,0)) will be used. For values between MinValue and MaxValue, the gray value to be displayed is calculated by : gray = (index - MinValue) * 255 / (MaxValue - MinValue).

index is the intensity value of the pixel. If the intensity value is > MaxValue, the color will be White. If the intensity value is < MinValue, the color will be Black. For those intensity values between MinValue and MaxValue, the above equation is used to determine the color, with index equal to the intensity value.

For more information, refer to Grayscale Images.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also