RasterColorDialogStringsId Enumeration

Summary
Indicates the dialog string ID.
Syntax
C#
C++/CLI
public enum RasterColorDialogStringsId 
public enum class RasterColorDialogStringsId : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable   
Members
ValueMemberDescription
0WindowLevelCaptionString ID for the Window Level dialog "Window Level" string.
1WindowLevelRangeString ID for the Window Level dialog "Range:" string.
2WindowLevelInsideString ID for the Window Level dialog "Inside" string.
3WindowLevelOutsideString ID for the Window Level dialog "Outside" string.
4WindowLevelColorsString ID for the Window Level dialog "Colors" string.
5WindowLevelEndColorsString ID for the Window Level dialog "End Color:" string.
6WindowLevelStartColorsString ID for the Window Level dialog "Start Color:" string.
7WindowLevelLUTCurveString ID for the Window Level dialog "LUT Carve" string.
8WindowLevelCurveModeString ID for the Window Level dialog "Mode:" string.
9WindowLevelFactorString ID for the Window Level dialog "Factor:" string.
10WindowLevelLinearString ID for the Window Level dialog "Linear" string.
11WindowLevelExponentialString ID for the Window Level dialog "Exponential" string.
12WindowLevelLogarithmicString ID for the Window Level dialog "Logarithmic" string.
13WindowLevelSigmoidString ID for the Window Level dialog "Sigmoid" string.
14WindowLevelLowLevelString ID for the Window Level dialog "Low Level:" string.
15WindowLevelHighLevelString ID for the Window Level dialog "High Level:" string.
16WindowLevelWindowString ID for the Window Level dialog "Window" string.
17WindowLevelCenterString ID for the Window Level dialog "Center:" string.
18WindowLevelWidthString ID for the Window Level dialog "Width:" string.
19WindowLevelOkString ID for the Window Level dialog "OK" string.
20WindowLevelCancelString ID for the Window Level dialog "Cancel" string.
21WindowLevelHelpString ID for the Window Level dialog "Help" string.
22WindowLevelValueDialogLowCaptionString ID for the Window Level dialog "Low Value Dialog" string.
23WindowLevelValueDialogHighCaptionString ID for the Window Level dialog "High Value Dialog" string.
24WindowLevelValueDialogValueString ID for the Window Level dialog "Value:" string.
25WindowLevelIdleStatusString ID for the Window Level idle status
26WindowLevelProcessingStatusString ID for the Window Level processing status
27WindowLevelCopyingStatusString ID for the Window Level copying status
28WindowLevelZoomToNormalString ID for the Window Level zoom to normal option
29WindowLevelZoomToFitWindowString ID for the Window Level zoom to fit window option
30WindowLevelNoteString ID for the Window Level tool tip note
Example
C#
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.ImageProcessing.Core; 
using Leadtools.WinForms.CommonDialogs.Color; 
 
 
public void windowLevelDlg_Help(object sender, RasterColorDialogHelpEventArgs e) 
{ 
   if (e.Dialog == RasterColorDialogHelpName.WindowLevel) 
   { 
      MessageBox.Show("Window Level dialog Help"); 
   } 
} 
 
 
public void WindowLevelDialogExample() 
{       
   // initialize the RasterCodecs 
   RasterCodecs codecs = new RasterCodecs(); 
 
   // load an image 
   RasterImage rasterImage = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "Beauty16.jpg")); 
 
   int size; 
   RasterWindowLevelDialog windowLevelDlg = new RasterWindowLevelDialog(); 
   MinMaxBitsCommand minMaxBitsCmd = new MinMaxBitsCommand(); 
   MinMaxValuesCommand minMaxValuesCmd = new MinMaxValuesCommand(); 
 
   size = (1 << (rasterImage.HighBit - rasterImage.LowBit + 1)); 
 
   minMaxBitsCmd.Run(rasterImage); 
   windowLevelDlg.LowBit = minMaxBitsCmd.MinimumBit; 
   windowLevelDlg.HighBit = minMaxBitsCmd.MaximumBit; 
 
   minMaxValuesCmd.Run(rasterImage); 
   windowLevelDlg.Low = minMaxValuesCmd.MinimumValue; 
   windowLevelDlg.High = minMaxValuesCmd.MaximumValue; 
 
   windowLevelDlg.AutoProcess = false; 
   windowLevelDlg.Factor = 0; 
   windowLevelDlg.Image = rasterImage; 
   windowLevelDlg.ZoomToFit = true; 
   windowLevelDlg.ShowPreview = true; 
   windowLevelDlg.ShowZoomLevel = true; 
   windowLevelDlg.ShowHelp = false; 
   windowLevelDlg.ShowRange = true; 
   windowLevelDlg.Signed = rasterImage.Signed; 
   windowLevelDlg.LookupTable = new Leadtools.RasterColor[size]; 
   windowLevelDlg.StartColor = new Leadtools.RasterColor(0, 0, 0); 
   windowLevelDlg.EndColor = new Leadtools.RasterColor(255, 255, 255); 
   windowLevelDlg.WindowLevelFlags = Leadtools.RasterPaletteWindowLevelFlags.Inside | Leadtools.RasterPaletteWindowLevelFlags.Linear; 
   windowLevelDlg.Help += new EventHandler<RasterColorDialogHelpEventArgs>(windowLevelDlg_Help); 
 
 
   if (DialogResult.OK == windowLevelDlg.ShowDialog(null)) 
   { 
      WindowLevelCommand command = new WindowLevelCommand(); 
 
      command.HighBit = windowLevelDlg.HighBit; 
      command.LowBit = windowLevelDlg.LowBit; 
      command.LookupTable = windowLevelDlg.LookupTable; 
      command.Order = Leadtools.RasterByteOrder.Bgr; 
 
      command.Run(rasterImage); 
   } 
 
   // save the resulted image 
   codecs.Save(rasterImage, Path.Combine(LEAD_VARS.ImagesDir, "WindowLevelDialogResult.bmp"), RasterImageFormat.Bmp, 24); 
} 
 
static class LEAD_VARS 
{ 
   public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; 
} 
Requirements

Target Platforms

See Also

Reference

Leadtools.WinForms.CommonDialogs.Color Namespace

RasterColorDialogStringsId Enumeration

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