Microscope

public class Microscope implements Serializable

Integrates all the components into one microscope.

Constructors

Microscope

public Microscope(DefaultCamera.Builder cameraBuilder, DefaultLaser.Builder laserBuilder, DefaultObjective.Builder objectiveBuilder, PSFBuilder psfBuilder, DefaultStage.Builder stageBuilder, FluorophoreCommandBuilder fluorBuilder, FluorophoreDynamicsBuilder fluorDynamicsBuilder, ObstructorCommandBuilder obstructorBuilder, BackgroundCommandBuilder backgroundBuilder, IlluminationBuilder illuminationBuilder)

Initializes the microscope for simulations.

Parameters:
  • cameraBuilder
  • laserBuilder
  • objectiveBuilder
  • psfBuilder
  • stageBuilder
  • fluorBuilder – Positions fluorophore’s within the field of view.
  • fluorDynamicsBuilder
  • obstructorBuilder – Creates the obstructors, e.g. fiducials.
  • backgroundBuilder – Creates the background signal on the image.
  • illuminationBuilder – Creates the illumination profile.

Methods

getFluorophores

public List<Fluorophore> getFluorophores()

Returns references to the fluorophores in the sample.

Returns:The sample’s Fluorophore objects.

getFovSize

public double getFovSize()

Returns the size of the field-of-view in object space units.

Returns:size of current FOV in object space units.

getLaserPower

public double getLaserPower()

Return current power of the laser.

Returns:laser power

getObjectSpacePixelSize

public double getObjectSpacePixelSize()

The size of a pixel after division by the objective magnification.

Returns:Length of one pixel side in object space units

getOnEmitterCount

public double getOnEmitterCount()

Returns the number of currently active emitters.

Returns:number of shining emitters

getResolution

public int[] getResolution()

Return the number of camera pixels in x and y.

Returns:2D array with number of pixels in x and y.

setLaserPower

public void setLaserPower(double laserPower)

Modifies the laser power to desired value.

Parameters:
  • laserPower – new laser power

simulateFrame

public ImageS simulateFrame()

Generates a new frame and moves the device state forward. First the obstructors are drawn on the frame, then the fluorophores, and finally noise.

Returns:A simulated image of the next camera frame.

toJsonCamera

public JsonElement toJsonCamera()

Returns information about the camera.

Returns:A JsonElement containing information about the camera.

toJsonFluorescence

public JsonElement toJsonFluorescence()

Returns information about the sample fluorophores.

Returns:A JsonObject containing information about the fluorophores.

toJsonLaser

public JsonElement toJsonLaser()

Returns information about the laser.

Returns:A JsonElement containing information about the laser.

toJsonObjective

public JsonElement toJsonObjective()

Returns information about the objective.

Returns:A JsonElement containing information about the stage.

toJsonStage

public JsonElement toJsonStage()

Returns information about the stage.

Returns:A JsonElement containing information about the stage.