BioImager  5.0.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
Series.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Threading.Tasks;
9using System.Windows.Forms;
10using BioLib;
11namespace BioImager
12{
13 public partial class Series : Form
14 {
15 public Series()
16 {
17 InitializeComponent();
19 }
20
22 public void UpdateItems()
23 {
24 imagesBox.Items.Clear();
25 foreach (BioImage item in Images.images)
26 {
27 imagesBox.Items.Add(item);
28 }
29 }
30
38 private void addBut_Click(object sender, EventArgs e)
39 {
40 if (imagesBox.SelectedIndices.Count == 0)
41 return;
42 foreach (BioImage item in imagesBox.SelectedItems)
43 {
44 seriesBox.Items.Add(item);
45 }
46 }
47
53 private void removeBut_Click(object sender, EventArgs e)
54 {
55 if (seriesBox.SelectedIndices.Count == 0)
56 return;
57 foreach (BioImage item in imagesBox.SelectedItems)
58 {
59 seriesBox.Items.Remove(item);
60 }
61 }
62
67 private void Series_Activated(object sender, EventArgs e)
68 {
70 }
71
72 private void saveOMEToolStripMenuItem_Click(object sender, EventArgs e)
73 {
74 if (saveFileDialog.ShowDialog() != DialogResult.OK)
75 return;
76 int i = 0;
77 List<BioImage> sts = new List<BioImage>();
78 foreach (BioImage item in seriesBox.Items)
79 {
80 sts.Add(item);
81 item.series = i;
82 i++;
83 }
84 BioImage.SaveOMESeries(sts.ToArray() , saveFileDialog.FileName, Properties.Settings.Default.Planes);
85 }
86
87 private void addAllBut_Click(object sender, EventArgs e)
88 {
89 foreach (BioImage item in imagesBox.Items)
90 {
91 seriesBox.Items.Add(item);
92 }
93 }
94
95 private void removeAllBut_Click(object sender, EventArgs e)
96 {
97 seriesBox.Items.Clear();
98 }
99
100 private void Series_FormClosing(object sender, FormClosingEventArgs e)
101 {
102 this.Hide();
103 e.Cancel = true;
104 }
105 }
106}
BioLib.BioImage BioImage
Definition TabsView.cs:15
void UpdateItems()
It clears the listbox and then adds all the items in the Images class to the listbox.
Definition Series.cs:22