Simulator

public interface Simulator

The interface that defines everything that a Simulator should do.

Author:Marcel Stefko, Kyle M. Douglass

Methods

getControlSignal

public double getControlSignal()

Returns currently set control signal of the generator (e.g. laser power settings).

Returns:control signal value

getCustomParameters

public HashMap<String, Double> getCustomParameters()

Returns custom parameters of the generator.

Returns:map of custom parameters

getFOVSize

public double getFOVSize()
Returns:FOV size in square micrometers

getImageCount

public int getImageCount()

Returns the number of images simulated. Because the simulation can advance without generating an image, this value will be less than or equal to the number of simulation time steps. Use incrementTimeStep() to advance the simulation one time step without generating an image.

Returns:The number of images that have been simulated.

getNextImage

public ImageS getNextImage()

Generates a new image and adds it to the internal stack.

Returns:newly generated image

getObjectSpacePixelSize

public double getObjectSpacePixelSize()
Returns:length of one pixel side in micrometers

getShortTrueSignalDescription

public String getShortTrueSignalDescription()
Returns:A short description of the truth signal, typically its units.

getSimulationState

public String getSimulationState()

Retrieves the current state of the simulation. This returns the simulation’s current state, which includes all relevant properties. These may include, for example, the fluorescence state of every fluorophore.

Returns:JSON string encoding the simulation state.

getStack

public ImageS getStack()

Returns internal stack with all generated images.

Returns:internal stack

getTrueSignal

public double getTrueSignal(int image_no)

Returns the actual value of signal (if applicable) for given image.

Parameters:
  • image_no – 1-based image number in history
Returns:

value of signal (e.g. no. of active emitters)

incrementTimeStep

public void incrementTimeStep()

Increments the simulation by one time step without creating an image.

saveStack

public void saveStack(File selectedFile)

Saves .tif stack to selected file.

Parameters:
  • selectedFile – file to save to

setControlSignal

public void setControlSignal(double value)

Sets control signal of the generator (e.g. laser power). This should be used by the controller.

Parameters:
  • value – new value of the control signal

setCustomParameters

public void setCustomParameters(HashMap<String, Double> map)

Sets custom parameters of the generator.

Parameters:
  • map – map of custom parameters