BioCore  5.0.0
A Windows .NET microscopy library and application for viewing, editing, and annotating images.
Loading...
Searching...
No Matches
BioCore.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 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 current 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
 

Detailed Description

Definition at line 302 of file Microscope.cs.

Member Enumeration Documentation

◆ Actions

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

Definition at line 304 of file Microscope.cs.

Member Function Documentation

◆ CloseRL()

static void BioCore.Microscope.CloseRL ( )
static

If the shutter is open, then close it.

Definition at line 403 of file Microscope.cs.

404 {
405 //If shutter is open then we close it.
406 if (RLShutter.GetPosition() == 0)
408 }
static RLShutter RLShutter
void SetPosition(int p)

◆ CloseTL()

static void BioCore.Microscope.CloseTL ( )
static

If the shutter is open, then we close it.

Definition at line 411 of file Microscope.cs.

412 {
413 //If shutter is open then we close it.
414 if (TLShutter.GetPosition() == 0)
416 }
static TLShutter TLShutter
void SetPosition(int p)

◆ GetFocus()

static double BioCore.Microscope.GetFocus ( )
static

It returns the current focus of the camera

Returns
The focus of the camera.

Definition at line 516 of file Microscope.cs.

517 {
518 return Focus.GetFocus();
519 }
double GetFocus()
static Focus Focus

◆ GetPosition()

static Point3D BioCore.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.

Definition at line 356 of file Microscope.cs.

357 {
358 if (Stage == null)
359 return new Point3D(0, 0, 0);
360 PointD p = Stage.GetPosition();
361 double f = Focus.GetFocus();
362 return new Point3D(p.X, p.Y, f);
363 }
static Stage Stage
PointD GetPosition()
Definition Microscope.cs:90

◆ GetRL()

static int BioCore.Microscope.GetRL ( )
static

It returns the position of the RLShutter object

Returns
The position of the RLShutter.

Definition at line 445 of file Microscope.cs.

446 {
447 return RLShutter.GetPosition();
448 }

◆ GetTL()

static int BioCore.Microscope.GetTL ( )
static

This function returns the position of the TL shutter

Returns
The position of the shutter.

Definition at line 437 of file Microscope.cs.

438 {
439 return TLShutter.GetPosition();
440 }

◆ Initialize()

static void BioCore.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.

Definition at line 339 of file Microscope.cs.

340 {
341 if (initialized)
342 return;
344 PointD.SetLimits(Stage.minX, Stage.maxX, Stage.minY, Stage.maxY);
345 Focus = new Focus();
346 Stage = new Stage();
347 Objectives = new Objectives();
348 TLShutter = new TLShutter();
349 RLShutter = new RLShutter();
350 initialized = true;
351 }
static double upperLimit
static double lowerLimit
static bool initialized
static Objectives Objectives
static double minY
Definition Microscope.cs:13
static double maxX
Definition Microscope.cs:12
static double minX
Definition Microscope.cs:11
static double maxY
Definition Microscope.cs:14

◆ MoveDown()

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

Move the stage down by the specified amount

Parameters
dThe distance to move the stage down.

Definition at line 469 of file Microscope.cs.

470 {
471 Stage.MoveDown(d);
472 }
void MoveDown(double m)

◆ MoveFieldDown()

static void BioCore.Microscope.MoveFieldDown ( )
static

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

Definition at line 494 of file Microscope.cs.

◆ MoveFieldLeft()

static void BioCore.Microscope.MoveFieldLeft ( )
static

Move the field left by the width of the view.

Definition at line 500 of file Microscope.cs.

◆ MoveFieldRight()

static void BioCore.Microscope.MoveFieldRight ( )
static

Move the field right by the width of the view.

Definition at line 488 of file Microscope.cs.

489 {
491 }
void MoveRight(double m)

◆ MoveFieldUp()

static void BioCore.Microscope.MoveFieldUp ( )
static

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

Definition at line 482 of file Microscope.cs.

483 {
485 }
void MoveUp(double m)
Definition Microscope.cs:97

◆ MoveLeft()

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

Move the stage left by the specified distance

Parameters
dThe distance to move the stage in mm.

Definition at line 477 of file Microscope.cs.

478 {
479 Stage.MoveLeft(d);
480 }

◆ MoveRight()

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

MoveRight(double d) moves the stage right by d

Parameters
dThe distance to move the stage in millimeters.

Definition at line 461 of file Microscope.cs.

462 {
463 Stage.MoveRight(d);
464 }

◆ MoveUp()

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

Move the stage up by a distance d

Parameters
dThe distance to move the stage up.

Definition at line 453 of file Microscope.cs.

454 {
455 Stage.MoveUp(d);
456 }

◆ OpenRL()

static void BioCore.Microscope.OpenRL ( )
static

If the shutter is closed, open it.

Definition at line 387 of file Microscope.cs.

388 {
389 //If shutter is closed we open it.
390 if (RLShutter.GetPosition() == 0)
392 }

◆ OpenTL()

static void BioCore.Microscope.OpenTL ( )
static

If the shutter is closed, open it.

Definition at line 395 of file Microscope.cs.

396 {
397 //If shutter is closed we open it.
398 if (TLShutter.GetPosition() == 0)
400 }

◆ SetFocus()

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

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

Parameters
dThe distance to focus on.

Definition at line 508 of file Microscope.cs.

509 {
510 Focus.SetFocus(d);
511 }
void SetFocus(double f)

◆ SetPosition() [1/2]

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

Set the position of the stage and focus to the values in the Point3D object

Parameters
Point3DA class that contains 3D coordinates.

Definition at line 368 of file Microscope.cs.

369 {
370 Stage.SetPosition(p.X, p.Y);
371 Focus.SetFocus(p.Z);
372 Microscope.redraw = true;
373 }
void SetPosition(double px, double py)
Definition Microscope.cs:50

◆ SetPosition() [2/2]

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

The function SetPosition() is a public static function that takes a PointD object as an argument. The function then calls the SetPosition() function of the Stage class, passing the X and Y coordinates of the PointD object as arguments. The function then sets the redraw variable of the Microscope class to true

Parameters
PointD

Definition at line 381 of file Microscope.cs.

382 {
383 Stage.SetPosition(p.X, p.Y);
384 Microscope.redraw = true;
385 }

◆ SetRL()

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

This function sets the position of the RLShutter to the value of tr

Parameters
trthe position of the shutter

Definition at line 429 of file Microscope.cs.

430 {
431 RLShutter.SetPosition((short)tr);
432 }

◆ SetTL()

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

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

Parameters
tlThe position of the shutter.

Definition at line 421 of file Microscope.cs.

422 {
423 TLShutter.SetPosition((short)tl);
424 }

Member Data Documentation

◆ ArrowKeysEnabled

bool BioCore.Microscope.ArrowKeysEnabled = true
static

Definition at line 330 of file Microscope.cs.

◆ CmdSetMode

object BioCore.Microscope.CmdSetMode = null
static

Definition at line 328 of file Microscope.cs.

◆ defaultPos

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

Definition at line 331 of file Microscope.cs.

◆ dll

Assembly BioCore.Microscope.dll = null
static

Definition at line 332 of file Microscope.cs.

◆ fInterVal

double BioCore.Microscope.fInterVal
static

Definition at line 327 of file Microscope.cs.

◆ Focus

Focus BioCore.Microscope.Focus = null
static

Definition at line 322 of file Microscope.cs.

◆ initialized

bool BioCore.Microscope.initialized = false
static

Definition at line 329 of file Microscope.cs.

◆ LowerLimit

double BioCore.Microscope.LowerLimit
static

Definition at line 327 of file Microscope.cs.

◆ Objectives

Objectives BioCore.Microscope.Objectives = null
static

Definition at line 324 of file Microscope.cs.

◆ redraw

bool BioCore.Microscope.redraw = false
static

Definition at line 321 of file Microscope.cs.

◆ RLShutter

RLShutter BioCore.Microscope.RLShutter = null
static

Definition at line 326 of file Microscope.cs.

◆ root

object BioCore.Microscope.root = null
static

Definition at line 334 of file Microscope.cs.

◆ Stage

Stage BioCore.Microscope.Stage = null
static

Definition at line 323 of file Microscope.cs.

◆ TLShutter

TLShutter BioCore.Microscope.TLShutter = null
static

Definition at line 325 of file Microscope.cs.

◆ Types

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

Definition at line 333 of file Microscope.cs.

◆ UpperLimit

double BioCore.Microscope.UpperLimit
static

Definition at line 327 of file Microscope.cs.


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