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

Public Types

enum  PlotType { Bar , Scatter }
 

Public Member Functions

 Plot (double[] vals, string name, PlotType typ)
 
void UpdateImage ()
 

Protected Member Functions

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

Properties

PlotType Type [get, set]
 
static Dictionary< string, PlotPlots [get]
 
List< double[]> Data [get, set]
 
Bitmap Image [get, set]
 
ScottPlot.Plot Model [get, set]
 

Detailed Description

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

Member Enumeration Documentation

◆ PlotType

enum BioImager.Plot.PlotType

Definition at line 33 of file Plot.cs.

34 {
35 Bar,
36 Scatter
37 }

Constructor & Destructor Documentation

◆ Plot()

BioImager.Plot.Plot ( double[] vals,
string name,
PlotType typ )

Definition at line 22 of file Plot.cs.

23 {
24 InitializeComponent();
25 model = new ScottPlot.Plot();
26 data.Add(vals);
27 if (typ == PlotType.Scatter)
28 InitScatter();
29 else
30 if (typ == PlotType.Bar)
31 InitBars();
32 }

Member Function Documentation

◆ Dispose()

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

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

◆ UpdateImage()

void BioImager.Plot.UpdateImage ( )

The function updates an image by saving it as a PNG file, setting the window title, creating a new Pixbuf object from the file, and redrawing the image.

Definition at line 69 of file Plot.cs.

70 {
71 model.SavePng(file, Width, Height);
72 this.Text = name;
73 bitmap = (Bitmap)Bitmap.FromFile(file);
74 }

Property Documentation

◆ Data

List<double[]> BioImager.Plot.Data
getset

Definition at line 50 of file Plot.cs.

51 {
52 get { return data; }
53 set { data = value; UpdateImage(); }
54 }
void UpdateImage()
Definition Plot.cs:69

◆ Image

Bitmap BioImager.Plot.Image
getset

Definition at line 56 of file Plot.cs.

57 {
58 get { return bitmap; }
59 set { bitmap = value; }
60 }

◆ Model

ScottPlot.Plot BioImager.Plot.Model
getset

Definition at line 62 of file Plot.cs.

63 {
64 get { return model; }
65 set { model = value; UpdateImage(); }
66 }

◆ Plots

Dictionary<string, Plot> BioImager.Plot.Plots
staticget

Definition at line 45 of file Plot.cs.

46 {
47 get { return plots; }
48 }

◆ Type

PlotType BioImager.Plot.Type
getset

Definition at line 40 of file Plot.cs.

41 {
42 get { return type; }
43 set { type = value; }
44 }

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