BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
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.
 

Properties

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

Detailed Description

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

Constructor & Destructor Documentation

◆ FloodTool() [1/2]

BioImager.Graphics.FloodTool.FloodTool ( )

Definition at line 49 of file FloodTool.cs.

50 {
51 InitializeComponent();
52 UpdateGUI();
53 }

◆ FloodTool() [2/2]

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

Definition at line 54 of file FloodTool.cs.

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

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 43 of file FloodTool.cs.

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

◆ UpdateGUI()

void BioImager.Graphics.FloodTool.UpdateGUI ( )

Definition at line 31 of file FloodTool.cs.

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

Property Documentation

◆ Pen

Pen BioImager.Graphics.FloodTool.Pen
getset

Definition at line 10 of file FloodTool.cs.

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

◆ Tolerance

ColorS BioImager.Graphics.FloodTool.Tolerance
get

Definition at line 23 of file FloodTool.cs.

24 {
25 get
26 {
27 return tolerance;
28 }
29 }

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