public void Input(TifFileInfo fi, Transmiter t) { this.t = t; this.fi = fi; //Main entrance if (fi == null || !fi.loaded) { MessageBox.Show("There is no loaded image!"); return; } if (fi.sizeZ > 1 || fi.bitsPerPixel != 16 || fi.sizeC > 1) { MessageBox.Show("This plugin is currently avaliable only for 16 bit grayscale image time saries of one focal plane!"); return; } if (this.myForm != null) { myForm.Dispose(); } this.myForm = new MyForm(fi); this.myForm.Show(); this.myForm.BringToFront(); }
/* * private void ApplyChanges() * { * //Apply changes and reload image * t.ReloadImage(); * } */ public void Input(TifFileInfo fi, Transmiter t) { //this.t = t; this.fi = fi; Start(); //ApplyChanges(); }
private void OnDispose() { fi = null; t = null; ordImg = null; disordImg = null; GPImg = null; GP = null; GPc = null; }
public Form_Di_anepp(TifFileInfo fi, Transmiter t) { InitializeComponent(); this.fi = fi; this.t = t; this.FormClosing += Form_Closing; this.Panel_Border.Resize += Panel_Border_Resize; LoadSettings(); }
//private Transmiter t; //private TifFileInfo fi; /* * private void ApplyChanges() * { * t.ReloadImage(); * } * * private void CreateDialog() * { * * Form form1 = new Form(); * form1.Text = "PlugIn"; * * Button btn = new Button(); * btn.Text = "Start"; * form1.Controls.Add(btn); * * btn.Click += new EventHandler(delegate (object sender, EventArgs a) { * ApplyChanges(); * }); * * form1.Show(); * * } */ public void Input(TifFileInfo fi, Transmiter t) { //this.t = t; //this.fi = fi; string dir = ""; if (fi != null) { dir = fi.Dir; } //CreateDialog(); ProcessWorkDirectory(dir); }
public void Input(TifFileInfo fi, Transmiter t) { this.t = t; this.fi = fi; //Main entrance if (fi == null) { System.Windows.Forms.MessageBox.Show( "There is no opened image!"); return; } if (fi.bitsPerPixel != 8) { System.Windows.Forms.MessageBox.Show( "Convert the image to 8-bit!"); return; } if (fi.sizeT != 1) { System.Windows.Forms.MessageBox.Show( "The image must contain only 1 time slice!"); return; } if (fi.sizeZ != 1) { System.Windows.Forms.MessageBox.Show( "The image must contain only 1 Z slice!"); return; } if (fi.sizeC < 2) { System.Windows.Forms.MessageBox.Show( "The image must contain at least 1 ordered and 1 disordered channel!"); return; } Form_Di_anepp myForm = new Form_Di_anepp(fi, t); myForm.Show(); }
public void Input(TifFileInfo fi, Transmiter t) { this.t = t; this.fi = fi; //Main entrance if (fi == null) { return; } if (!fi.available || !fi.loaded) { MessageBox.Show("Image is not avaliable!"); return; } if (fi.sizeC <= 1) { MessageBox.Show("The image must have more then 1 color channels!"); return; } if (fi.sizeC > 2) { MessageBox.Show("The image must have 2 color channels!"); return; } if (fi.sizeZ > 1) { MessageBox.Show("The image must not be Z stack!"); return; } MainForm form1 = new MainForm(fi); form1.Show(); }
private void PlugIn_Load(string path) { TifFileInfo oldFI = null; try { oldFI = IA.TabPages.TabCollections[IA.TabPages.SelectedIndex].tifFI; } catch { } CellToolDK.TifFileInfo fi = FItoCellToolDK(oldFI); var DLL = Assembly.LoadFile(path); foreach (Type type in DLL.GetExportedTypes()) { try { Transmiter e = new Transmiter(); e.Changed += new TransmiterEventHandler(delegate(object o, TransmiterEventArgs a) { try { if (fi != null && oldFI != null) { if (fi.sizeC != oldFI.sizeC) { oldFI.sizeC = fi.sizeC; FI_reduseC(fi); FI_reduseC(oldFI); } CellToolDKtoFI(fi, oldFI); if (oldFI.sizeZ > 1) { IA.TabPages.zTrackBar.Refresh(oldFI.zValue + 1, 1, oldFI.sizeZ); IA.TabPages.zTrackBar.Panel.Visible = true; } else { IA.TabPages.zTrackBar.Panel.Visible = false; } if (oldFI.sizeT > 1) { IA.TabPages.tTrackBar.Refresh(oldFI.frame + 1, 1, oldFI.sizeT); IA.TabPages.tTrackBar.Panel.Visible = true; } else { IA.TabPages.tTrackBar.Panel.Visible = false; } } } catch { MessageBox.Show("Error with reporting back!"); } IA.ReloadImages(); }); var c = Activator.CreateInstance(type); try { type.InvokeMember("Input", BindingFlags.InvokeMethod, null, c, new object[] { fi, e }); } catch { MessageBox.Show("Input void is not avaliable!"); } break; } catch { } } }