ImageJSimulator

public class ImageJSimulator extends DefaultSimulator

The default simulator that is run as, for example, the ImageJ plugin.

Author:Marcel Stefko

Fields

TIMEPERFRAME

protected final long TIMEPERFRAME

The time duration of each frame. This is here only for compatibility with ALICA’s analyzers, which require a time argument.

analyzer

protected final Analyzer analyzer

Analyzer which analyzes generated images

controller

protected final Controller controller

Takes the output of a single analyzer, processes it, and outputs a signal to the generator, for feedback loop control.

history

protected HashMap<Integer, JSONObject> history

Records of values of output of analyzer, controller.

image_count

protected int image_count

Number of already-generated images.

Constructors

ImageJSimulator

public ImageJSimulator(Microscope microscope, Analyzer analyzer, Controller controller)

Initialize the simulator from user-specified components.

Parameters:
  • microscope – The microscope to be simulated.
  • analyzer – An analyzer for processing images from the microscope.
  • controller – A controller that adjusts the state of the microscope.

Methods

execute

public ImageS execute(int no_of_images, int controller_refresh_rate, String csv_save_path, String tiff_save_path)

An example simulation

Parameters:
  • no_of_images
  • controller_refresh_rate
  • csv_save_path
  • tiff_save_path

getImageCount

public int getImageCount()

Returns the number of generated images since simulation start.

Returns:number of generated images

incrementCounter

public void incrementCounter()

Increments image counter in case an image was generated outside of this class.

saveStack

public void saveStack(File tiff_file)

Save current ImageStack to TIFF file

Parameters:
  • tiff_file – file to save to

saveToCsv

public void saveToCsv(File file)

Saves the data for generator, analyzer and controller for each frame into a .csv file

Parameters:
  • file – destination csv file