Simulator¶
-
public interface
Simulator
¶ The interface that defines everything that a Simulator should do.
Author: Marcel Stefko, Kyle M. Douglass
Methods¶
getCameraJsonName¶
getControlSignal¶
-
public double
getControlSignal
()¶ Returns currently set control signal of the generator (e.g. laser power settings).
Returns: control signal value
getCustomParameters¶
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.
getFluorescenceJsonName¶
getId¶
-
public int
getId
()¶ Returns the unique ID assigned to this simulator.
Returns: The integer ID of this simulator.
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.
getLaserJsonName¶
getMessages¶
-
public List<Message>
getMessages
()¶ Returns messages about changes in the simulation state. Unlike
getSimulationState()
, which returns information about the current state of the simulation, this method returns the messages from individual components that contain information about changes in their state that have occurred since the last time this method was called.Returns: A list containing the state change messages.
getMicroscope¶
-
public Microscope
getMicroscope
()¶ Returns a copy of the Microscope that is controlled by this simulation. The copy that is returned is a deep copy of the
Microscope
that the simulation was initialized with.Returns: A copy of the Microscope object controlled by this simulation.
getNextImage¶
getObjectSpacePixelSize¶
-
public double
getObjectSpacePixelSize
()¶ Returns the size of a pixel in object space units. The units of this quantity are determined by those of the camera’s pixels. The value is the magnitude of the camera’s pixel size divided by the objective’s magnification.
Returns: length of one pixel side in object space units.
getObjectiveJsonName¶
getShortTrueSignalDescription¶
getStack¶
getStageJsonName¶
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.
saveMessages¶
saveStack¶
saveState¶
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¶
toJsonMessages¶
-
public JsonElement
toJsonMessages
()¶ Returns messages about changes in the simulation state as a JSON object. Unlike
toJsonState()
, which returns information about the current state of the simulation, this method returns the messages from individual simulation components that contain information about changes in their state that have occurred since the last time this method was called.Returns: A JSON object containing the simulation messages.
toJsonState¶
-
public JsonElement
toJsonState
()¶ Returns information on the simulation’s current state as a JSON object. Unlike
toJsonMessages()
, which returns information about previous changes in the simulation’s state, this method reports on the current state of the simulation.Returns: A JSON object containing information on the simulation state.