BioLib  4.3.0
A GUI-less version of Bio .NET library for editing & annotating various microscopy image formats.
Loading...
Searching...
No Matches
BioLib.Microscope Class Reference

Public Types

enum  Actions {
  StageUp , StageRight , StageDown , StageLeft ,
  StageFieldUp , StageFieldRight , StageFieldDown , StageFieldLeft ,
  FocusUp , FocusDown , TL , RL ,
  Acquisition , Locate
}
 

Static Public Member Functions

static void Initialize ()
 
static Point3D GetPosition ()
 
static void SetPosition (Point3D p)
 
static void SetPosition (PointD p)
 
static void OpenRL ()
 If the shutter is closed, open it.
 
static void OpenTL ()
 If the shutter is closed, open it.
 
static void CloseRL ()
 If the shutter is open, then we close it.
 
static void CloseTL ()
 If the shutter is open, then we close it.
 
static void SetTL (uint tl)
 
static void SetRL (uint tr)
 
static int GetTL ()
 
static int GetRL ()
 
static void MoveUp (double d)
 
static void MoveRight (double d)
 
static void MoveDown (double d)
 
static void MoveLeft (double d)
 
static void MoveFieldUp ()
 Move the field up by the height of the current objective.
 
static void MoveFieldRight ()
 Move the field right by the width of the view.
 
static void MoveFieldDown ()
 Move the field down by the height of the objective.
 
static void MoveFieldLeft ()
 Move the field left by the width of the view.
 
static void SetFocus (double d)
 
static double GetFocus ()
 

Static Public Attributes

static bool redraw = false
 
static Focus Focus = null
 
static Stage Stage = null
 
static Objectives Objectives = null
 
static TLShutter TLShutter = null
 
static RLShutter RLShutter = null
 
static double UpperLimit
 
static double LowerLimit
 
static double fInterVal
 
static object CmdSetMode = null
 
static bool initialized = false
 
static bool ArrowKeysEnabled = true
 
static Point3D defaultPos = new Point3D(30000, 30000, 23900)
 
static Assembly dll = null
 
static Dictionary< string, Type > Types = new Dictionary<string, Type>()
 
static object root = null
 

Member Enumeration Documentation

◆ Actions

Enumerator
StageUp 
StageRight 
StageDown 
StageLeft 
StageFieldUp 
StageFieldRight 
StageFieldDown 
StageFieldLeft 
FocusUp 
FocusDown 
TL 
RL 
Acquisition 
Locate 

Member Function Documentation

◆ CloseRL()

static void BioLib.Microscope.CloseRL ( )
static

If the shutter is open, then we close it.

383 {
384 //If shutter is open then we close it.
385 if (RLShutter.GetPosition() == 0)
387 }
static RLShutter RLShutter
Definition Microscope.cs:307
short GetPosition()
Definition Microscope.cs:272
void SetPosition(int p)
Definition Microscope.cs:276

◆ CloseTL()

static void BioLib.Microscope.CloseTL ( )
static

If the shutter is open, then we close it.

391 {
392 //If shutter is open then we close it.
393 if (TLShutter.GetPosition() == 0)
395 }
static TLShutter TLShutter
Definition Microscope.cs:306
short GetPosition()
Definition Microscope.cs:253
void SetPosition(int p)
Definition Microscope.cs:257

◆ GetFocus()

static double BioLib.Microscope.GetFocus ( )
static

It returns the current focus of the camera

Returns
The focus of the camera.
497 {
498 return Focus.GetFocus();
499 }
double GetFocus()
Definition Microscope.cs:128
static Focus Focus
Definition Microscope.cs:303

◆ GetPosition()

static Point3D BioLib.Microscope.GetPosition ( )
static

Get the current position of the stage and the current focus position, and return a Point3D object containing the X, Y, and Z coordinates

Returns
A Point3D object.
338 {
339 if (Stage == null)
340 return new Point3D(0,0,0);
342 double f = Focus.GetFocus();
343 return new Point3D(p.X, p.Y, f);
344 }
AForge.PointD PointD
Definition Bio.cs:60
static Stage Stage
Definition Microscope.cs:304
PointD GetPosition()
Definition Microscope.cs:82

◆ GetRL()

static int BioLib.Microscope.GetRL ( )
static

It returns the position of the RLShutter object

Returns
The position of the RLShutter.
426 {
427 return RLShutter.GetPosition();
428 }

◆ GetTL()

static int BioLib.Microscope.GetTL ( )
static

GetTL() returns the position of the TLShutter object.

Returns
The position of the shutter.
418 {
419 return TLShutter.GetPosition();
420 }

◆ Initialize()

static void BioLib.Microscope.Initialize ( )
static

It sets the limits of the stage and focus, and then creates new instances of the stage, focus, objectives, and shutters

Returns
The return value is the value of the last expression evaluated in the function.
321 {
322 if (initialized)
323 return;
325 PointD.SetLimits(Stage.minX, Stage.maxX, Stage.minY, Stage.maxY);
326 Focus = new Focus();
327 Stage = new Stage();
328 Objectives = new Objectives();
329 TLShutter = new TLShutter();
330 RLShutter = new RLShutter();
331 initialized = true;
332 }
static double upperLimit
Definition Microscope.cs:119
static double lowerLimit
Definition Microscope.cs:120
static bool initialized
Definition Microscope.cs:310
static Objectives Objectives
Definition Microscope.cs:305
static double maxY
Definition Microscope.cs:26
static double maxX
Definition Microscope.cs:24
static double minX
Definition Microscope.cs:23
static double minY
Definition Microscope.cs:25

◆ MoveDown()

static void BioLib.Microscope.MoveDown ( double d)
static

Move the stage down by the specified distance

Parameters
dThe distance to move down.
450 {
451 Stage.MoveDown(d);
452 }
void MoveDown(double m)
Definition Microscope.cs:91

◆ MoveFieldDown()

static void BioLib.Microscope.MoveFieldDown ( )
static

Move the field down by the height of the objective.

475 {
477 }
double ViewHeight
Definition Microscope.cs:174
Objective GetObjective()
Definition Microscope.cs:212

◆ MoveFieldLeft()

static void BioLib.Microscope.MoveFieldLeft ( )
static

Move the field left by the width of the view.

481 {
483 }
double ViewWidth
Definition Microscope.cs:173
void MoveLeft(double m)
Definition Microscope.cs:101

◆ MoveFieldRight()

static void BioLib.Microscope.MoveFieldRight ( )
static

Move the field right by the width of the view.

469 {
471 }
void MoveRight(double m)
Definition Microscope.cs:96

◆ MoveFieldUp()

static void BioLib.Microscope.MoveFieldUp ( )
static

Move the field up by the height of the current objective.

463 {
465 }
void MoveUp(double m)
Definition Microscope.cs:86

◆ MoveLeft()

static void BioLib.Microscope.MoveLeft ( double d)
static

Move the stage left by the specified distance

Parameters
dThe distance to move the stage in mm.
458 {
459 Stage.MoveLeft(d);
460 }

◆ MoveRight()

static void BioLib.Microscope.MoveRight ( double d)
static

MoveRight(double d) moves the stage right by d

Parameters
dThe distance to move the stage in millimeters.
442 {
443 Stage.MoveRight(d);
444 }

◆ MoveUp()

static void BioLib.Microscope.MoveUp ( double d)
static

Move the stage up by a distance d

Parameters
dThe distance to move the stage up.
434 {
435 Stage.MoveUp(d);
436 }

◆ OpenRL()

static void BioLib.Microscope.OpenRL ( )
static

If the shutter is closed, open it.

367 {
368 //If shutter is closed we open it.
369 if (RLShutter.GetPosition() == 0)
371 }

◆ OpenTL()

static void BioLib.Microscope.OpenTL ( )
static

If the shutter is closed, open it.

375 {
376 //If shutter is closed we open it.
377 if (TLShutter.GetPosition() == 0)
379 }

◆ SetFocus()

static void BioLib.Microscope.SetFocus ( double d)
static

It sets the focus of the camera to the distance specified by the parameter

Parameters
dThe control to focus on.
489 {
490 Focus.SetFocus(d);
491 }
void SetFocus(double f)
Definition Microscope.cs:125

◆ SetPosition() [1/2]

static void BioLib.Microscope.SetPosition ( Point3D p)
static

It sets the position of the stage and focus to the values in the Point3D object

Parameters
Point3Da class that contains 3 doubles, X, Y, and Z.
350 {
351 Stage.SetPosition(p.X,p.Y);
352 Focus.SetFocus(p.Z);
353 Microscope.redraw = true;
354 }
void SetPosition(double px, double py)
Definition Microscope.cs:57

◆ SetPosition() [2/2]

static void BioLib.Microscope.SetPosition ( PointD p)
static

The function SetPosition() takes a PointD object as an argument and sets the position of the stage to the X and Y coordinates of the PointD object

Parameters
PointD
361 {
362 Stage.SetPosition(p.X, p.Y);
363 Microscope.redraw = true;
364 }

◆ SetRL()

static void BioLib.Microscope.SetRL ( uint tr)
static

The function takes a uint (unsigned integer) as an argument and sets the position of the RLShutter to the value of the argument

Parameters
trthe position of the shutter
410 {
411 RLShutter.SetPosition((short)tr);
412 }

◆ SetTL()

static void BioLib.Microscope.SetTL ( uint tl)
static

Set the position of the shutter to the value of the variable tl

Parameters
tlThe position of the shutter.
401 {
402 TLShutter.SetPosition((short)tl);
403 }

Member Data Documentation

◆ ArrowKeysEnabled

bool BioLib.Microscope.ArrowKeysEnabled = true
static

◆ CmdSetMode

object BioLib.Microscope.CmdSetMode = null
static

◆ defaultPos

Point3D BioLib.Microscope.defaultPos = new Point3D(30000, 30000, 23900)
static

◆ dll

Assembly BioLib.Microscope.dll = null
static

◆ fInterVal

double BioLib.Microscope.fInterVal
static

◆ Focus

Focus BioLib.Microscope.Focus = null
static

◆ initialized

bool BioLib.Microscope.initialized = false
static

◆ LowerLimit

double BioLib.Microscope.LowerLimit
static

◆ Objectives

Objectives BioLib.Microscope.Objectives = null
static

◆ redraw

bool BioLib.Microscope.redraw = false
static

◆ RLShutter

RLShutter BioLib.Microscope.RLShutter = null
static

◆ root

object BioLib.Microscope.root = null
static

◆ Stage

Stage BioLib.Microscope.Stage = null
static

◆ TLShutter

TLShutter BioLib.Microscope.TLShutter = null
static

◆ Types

Dictionary<string, Type> BioLib.Microscope.Types = new Dictionary<string, Type>()
static

◆ UpperLimit

double BioLib.Microscope.UpperLimit
static

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