Create an instance of a SEYR channel
private static SEYR.Session.Channel SEYRCh = null;
private void openDirectoryToolStripMenuItem_Click(object sender, EventArgs e)
{
SEYR.Session.Channel channel = SEYR.Session.Channel.OpenSEYR();
if (channel != null)
{
SEYRCh = channel;
SEYRCh.SetPixelsPerMicron(1.303f);
}
}
Add some UI elements
private void openComposerToolStripMenuItem_Click(object sender, EventArgs e)
{
SEYRCh.OpenComposer(LastImage);
}
private async void forcePatternToolStripMenuItem_Click(object sender, EventArgs e)
{
await SEYRCh.NewImage(LastImage, true, "");
}
private async void reloadImageToolStripMenuItem_Click(object sender, EventArgs e)
{
await SEYRCh.NewImage(LastImage, false, "");
}
Send images to SEYR
private async Task<bool> Run()
{
if (SEYRCh == null) return false;
SEYRCh.ResetAll();
for (int i = 0; i < Points.Count; i++)
{
///Do something
double info = await SEYRCh.NewImage(LastImage, false, $"{i}\t{Points[i].X}\t{Points[i].Y}\t{Points[i].Info}");
GC.Collect();
}
SEYRCh.MakeArchive();
SEYRCh.SignalComplete();
bool test = true;
return test;
}
- Image processing must either be awaited or contain a while loop that waits until Channel.Working == false.
- Stamp inspection can be activated by passing
true
forstamp
inSEYRCh.NewImage
- Set stamp inspection params with
SEYRCh.InputParameters(bmp)