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

Public Types

enum  PlotType
 

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. More...
 

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 14 of file Plot.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 65 of file Plot.cs.

66 {
67 model.SavePng(file, Width, Height);
68 this.Text = name;
69 bitmap = (Bitmap)Bitmap.FromFile(file);
70 }

Property Documentation

◆ Data

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

Definition at line 48 of file Plot.cs.

49 {
50 get { return data; }
51 set { data = value; UpdateImage(); }
52 }
void UpdateImage()
Definition: Plot.cs:65

◆ Image

Bitmap BioImager.Plot.Image
getset

Definition at line 53 of file Plot.cs.

54 {
55 get { return bitmap; }
56 set { bitmap = value; }
57 }

◆ Model

ScottPlot.Plot BioImager.Plot.Model
getset

Definition at line 58 of file Plot.cs.

59 {
60 get { return model; }
61 set { model = value; UpdateImage(); }
62 }

◆ Plots

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

Definition at line 44 of file Plot.cs.

45 {
46 get { return plots; }
47 }

◆ Type

PlotType BioImager.Plot.Type
getset

Definition at line 39 of file Plot.cs.

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

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