BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
BioImager.Graphics.FloodTool Class Reference
Inheritance diagram for BioImager.Graphics.FloodTool:

Public Member Functions

void UpdateGUI ()
 
void SetColor ()
 
 FloodTool (Pen p, ColorS tolerance, int bitPerPixel)
 

Protected Member Functions

override void Dispose (bool disposing)
 Clean up any resources being used. More...
 

Properties

Pen Pen [get, set]
 
ColorS Tolerance [get]
 

Detailed Description

Definition at line 4 of file FloodTool.cs.

Constructor & Destructor Documentation

◆ FloodTool() [1/2]

BioImager.Graphics.FloodTool.FloodTool ( )

Definition at line 47 of file FloodTool.cs.

48 {
49 InitializeComponent();
50 UpdateGUI();
51 }

◆ FloodTool() [2/2]

BioImager.Graphics.FloodTool.FloodTool ( Pen  p,
ColorS  tolerance,
int  bitPerPixel 
)

Definition at line 52 of file FloodTool.cs.

53 {
54 InitializeComponent();
55 pen = p;
56 bitsPerPixel = bitPerPixel;
57 if (bitsPerPixel == 8)
58 {
59 rBar.Maximum = 255;
60 gBar.Maximum = 255;
61 bBar.Maximum = 255;
62 redBox.Maximum = 255;
63 greenBox.Maximum = 255;
64 blueBox.Maximum = 255;
65 }
66 if (rBar.Maximum <= p.color.R)
67 rBar.Value = rBar.Maximum;
68 if (gBar.Maximum <= p.color.G)
69 gBar.Value = gBar.Maximum;
70 if (bBar.Maximum <= p.color.B)
71 bBar.Value = bBar.Maximum;
72 this.tolerance = tolerance;
73 tolRBox.Value = (decimal)tolerance.R;
74 tolGBox.Value = (decimal)tolerance.G;
75 tolBBox.Value = (decimal)tolerance.B;
76 SetColor();
77 UpdateGUI();
78 }

Member Function Documentation

◆ Dispose()

override void BioImager.Graphics.FloodTool.Dispose ( bool  disposing)
protected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.

Definition at line 14 of file FloodTool.Designer.cs.

15 {
16 if (disposing && (components != null))
17 {
18 components.Dispose();
19 }
20 base.Dispose(disposing);
21 }

◆ SetColor()

void BioImager.Graphics.FloodTool.SetColor ( )

Definition at line 41 of file FloodTool.cs.

42 {
43 rBar.Value = pen.color.R;
44 gBar.Value = pen.color.G;
45 bBar.Value = pen.color.B;
46 }

◆ UpdateGUI()

void BioImager.Graphics.FloodTool.UpdateGUI ( )

Definition at line 29 of file FloodTool.cs.

30 {
31 pen.color = new ColorS((ushort)redBox.Value, (ushort)greenBox.Value, (ushort)blueBox.Value);
32 colorPanel.BackColor = System.Drawing.Color.FromArgb(pen.color.R,pen.color.G,pen.color.B);
33 if (rBar.Value != redBox.Value)
34 redBox.Value = rBar.Value;
35 if (gBar.Value != greenBox.Value)
36 greenBox.Value = gBar.Value;
37 if (bBar.Value != blueBox.Value)
38 blueBox.Value = bBar.Value;
39 }

Property Documentation

◆ Pen

Pen BioImager.Graphics.FloodTool.Pen
getset

Definition at line 8 of file FloodTool.cs.

9 {
10 get
11 {
12 return pen;
13 }
14 set
15 {
16 pen = value;
17 }
18 }

◆ Tolerance

ColorS BioImager.Graphics.FloodTool.Tolerance
get

Definition at line 21 of file FloodTool.cs.

22 {
23 get
24 {
25 return tolerance;
26 }
27 }

The documentation for this class was generated from the following files: