DefaultSimulator¶
-
public class
DefaultSimulator
extends AbstractSimulator¶ The basic simulation engine from which others may be derived.
Author: Marcel Stefko, Kyle M. Douglass
Constructors¶
DefaultSimulator¶
-
public
DefaultSimulator
(Microscope microscope)¶ Initialize the generator.
Parameters: - microscope –
Methods¶
getCameraJsonName¶
getFluorescenceJsonName¶
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: Length of one pixel side in object-space units.
getObjectiveJsonName¶
getStageJsonName¶
getStateListener¶
-
public DefaultSimulator.StateListener
getStateListener
()¶ Returns this instance’s StateListener. This method is primarily for testing purposes and is not exposed in the Simulator interface.
Returns: A reference to this instance’s StateListener.
incrementTimeStep¶
-
public void
incrementTimeStep
()¶ Advance the simulation by one time step (i.e. one frame). Simulates a frame but does not create an image.
saveMessages¶
saveState¶
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.