BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
BioImager.LightSource Class Reference

Public Types

enum  Type
 

Public Member Functions

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

Public Attributes

double position
 
Type type
 

Detailed Description

Definition at line 651 of file Microscope.cs.

Member Enumeration Documentation

◆ Type

enum BioImager.LightSource.Type

Definition at line 653 of file Microscope.cs.

654 {
655 HXP,
656 RL,
657 TL
658 }

Constructor & Destructor Documentation

◆ LightSource()

BioImager.LightSource.LightSource ( )

Definition at line 662 of file Microscope.cs.

663 {
664 }

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 668 of file Microscope.cs.

669 {
670 if (Properties.Settings.Default.LibPath.Contains("MTB"))
671 {
672 if (type == Type.HXP)
673 {
674 BioImager.MicroscopeConsole.Command com = BioImager.MicroscopeConsole.RunCommand
676 return (short)com.doubles[0];
677 }
678 else if(type == Type.RL)
679 {
680 BioImager.MicroscopeConsole.Command com = BioImager.MicroscopeConsole.RunCommand
682 return (short)com.doubles[0];
683 }
684 else if (type == Type.TL)
685 {
686 BioImager.MicroscopeConsole.Command com = BioImager.MicroscopeConsole.RunCommand
688 return (short)com.doubles[0];
689 }
690 }
691 return position;
692 }

◆ 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 697 of file Microscope.cs.

698 {
699 if (Recorder.recordMicroscope)
700 Recorder.AddLine("Microscope.LightSource.SetPosition(" + f + ");");
701 if (Properties.Settings.Default.LibPath.Contains("MTB"))
702 {
703 if (type == Type.HXP)
704 {
705 BioImager.MicroscopeConsole.RunCommand(
706 new BioImager.MicroscopeConsole.Command(BioImager.MicroscopeConsole.Command.Type.SetHXP, new double[] { f }));
707 }
708 else if(type == Type.RL)
709 {
710 BioImager.MicroscopeConsole.RunCommand(
711 new BioImager.MicroscopeConsole.Command(BioImager.MicroscopeConsole.Command.Type.SetRLHalogen, new double[] { f }));
712 }
713 else if (type == Type.TL)
714 {
715 BioImager.MicroscopeConsole.RunCommand(
716 new BioImager.MicroscopeConsole.Command(BioImager.MicroscopeConsole.Command.Type.SetTLHalogen, new double[] { f }));
717 }
718 }
719 }

◆ ToString()

override string BioImager.LightSource.ToString ( )

Definition at line 720 of file Microscope.cs.

721 {
722 return name;
723 }

Member Data Documentation

◆ position

double BioImager.LightSource.position

◆ type

Type BioImager.LightSource.type

Definition at line 660 of file Microscope.cs.

Referenced by microscope.stages.linkam._CommsInfo.view_of_info().


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