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.ColorTool Class Reference
Inheritance diagram for BioImager.ColorTool:

Public Member Functions

void UpdateGUI ()
 It updates the GUI. More...
 
 ColorTool (ColorS col, int bitPerPixel)
 

Protected Member Functions

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

Properties

ColorS Color [get, set]
 

Detailed Description

Definition at line 13 of file ColorTool.cs.

Constructor & Destructor Documentation

◆ ColorTool() [1/2]

BioImager.ColorTool.ColorTool ( )

Definition at line 43 of file ColorTool.cs.

44 {
45 InitializeComponent();
46 UpdateGUI();
47 }
void UpdateGUI()
It updates the GUI.
Definition: ColorTool.cs:31

◆ ColorTool() [2/2]

BioImager.ColorTool.ColorTool ( ColorS  col,
int  bitPerPixel 
)

Definition at line 49 of file ColorTool.cs.

50 {
51 InitializeComponent();
52 this.bitsPerPixel = bitPerPixel;
53 if(bitsPerPixel == 8)
54 {
55 rBar.Maximum = 255;
56 gBar.Maximum = 255;
57 bBar.Maximum = 255;
58 redBox.Maximum = 255;
59 greenBox.Maximum = 255;
60 blueBox.Maximum = 255;
61 }
62 if (rBar.Maximum <= col.R)
63 rBar.Value = rBar.Maximum;
64 if (gBar.Maximum <= col.G)
65 gBar.Value = gBar.Maximum;
66 if (bBar.Maximum <= col.B)
67 bBar.Value = bBar.Maximum;
68 UpdateGUI();
69 }

Member Function Documentation

◆ Dispose()

override void BioImager.ColorTool.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 ColorTool.Designer.cs.

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

◆ UpdateGUI()

void BioImager.ColorTool.UpdateGUI ( )

It updates the GUI.

Definition at line 31 of file ColorTool.cs.

32 {
33 color = new ColorS((ushort)redBox.Value, (ushort)greenBox.Value, (ushort)blueBox.Value);
34 colorPanel.BackColor = System.Drawing.Color.FromArgb(color.R / ushort.MaxValue,color.G / ushort.MaxValue,color.B / ushort.MaxValue);
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

◆ Color

ColorS BioImager.ColorTool.Color
getset

Definition at line 18 of file ColorTool.cs.

19 {
20 get
21 {
22 return color;
23 }
24 set
25 {
26 color = value;
27 }
28 }

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