BioImager  4.9.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
BioImager.LightSource Class Reference

Public Types

enum  Type { HXP , RL , TL }
 

Public Member Functions

double GetPosition ()
 
void SetPosition (double f)
 
override string ToString ()
 

Public Attributes

double position
 
Type type
 

Detailed Description

Definition at line 662 of file Microscope.cs.

Member Enumeration Documentation

◆ Type

enum BioImager.LightSource.Type

Definition at line 664 of file Microscope.cs.

665 {
666 HXP,
667 RL,
668 TL
669 }

Constructor & Destructor Documentation

◆ LightSource()

BioImager.LightSource.LightSource ( )

Definition at line 673 of file Microscope.cs.

674 {
675 }

Member Function Documentation

◆ GetPosition()

double BioImager.LightSource.GetPosition ( )

If the microscope is a MTB, then get the position of the light source.

Returns
The position of the light source.

Definition at line 679 of file Microscope.cs.

680 {
681 if (Properties.Settings.Default.LibPath.Contains("MTB"))
682 {
683 if (type == Type.HXP)
684 {
685 BioImager.MicroscopeConsole.Command com = BioImager.MicroscopeConsole.RunCommand
687 return (short)com.doubles[0];
688 }
689 else if(type == Type.RL)
690 {
691 BioImager.MicroscopeConsole.Command com = BioImager.MicroscopeConsole.RunCommand
693 return (short)com.doubles[0];
694 }
695 else if (type == Type.TL)
696 {
697 BioImager.MicroscopeConsole.Command com = BioImager.MicroscopeConsole.RunCommand
699 return (short)com.doubles[0];
700 }
701 }
702 return position;
703 }

◆ SetPosition()

void BioImager.LightSource.SetPosition ( double f)

The function takes a double as an argument and then calls the SetPosition function of the light source object

Parameters
fthe position of the light source

Definition at line 708 of file Microscope.cs.

709 {
710 if (Recorder.recordMicroscope)
711 Recorder.AddLine("Microscope.LightSource.SetPosition(" + f + ");");
712 if (Properties.Settings.Default.LibPath.Contains("MTB"))
713 {
714 if (type == Type.HXP)
715 {
716 BioImager.MicroscopeConsole.RunCommand(
717 new BioImager.MicroscopeConsole.Command(BioImager.MicroscopeConsole.Command.Type.SetHXP, new double[] { f }));
718 }
719 else if(type == Type.RL)
720 {
721 BioImager.MicroscopeConsole.RunCommand(
722 new BioImager.MicroscopeConsole.Command(BioImager.MicroscopeConsole.Command.Type.SetRLHalogen, new double[] { f }));
723 }
724 else if (type == Type.TL)
725 {
726 BioImager.MicroscopeConsole.RunCommand(
727 new BioImager.MicroscopeConsole.Command(BioImager.MicroscopeConsole.Command.Type.SetTLHalogen, new double[] { f }));
728 }
729 }
730 }

◆ ToString()

override string BioImager.LightSource.ToString ( )

Definition at line 731 of file Microscope.cs.

732 {
733 return name;
734 }

Member Data Documentation

◆ position

double BioImager.LightSource.position

Definition at line 670 of file Microscope.cs.

◆ type

Type BioImager.LightSource.type

Definition at line 671 of file Microscope.cs.


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