Analyzer

public interface Analyzer

Processes an image or series of images. Analyzers compute quantities from an image or series of images that are relevant for real-time control. These quantities can include, for example, the number of fluorescent molecules or the resolution.

Author:Marcel Stefko

Methods

dispose

public void dispose()

Close all windows that were opened and are owned by this analyzer.

getBatchOutput

public double getBatchOutput()

Returns the output of the analyzer for Controller input. If no output can be provided (such as when there are no new analyzed images), Double.NaN should be returned. This method can also modify the internal state of the analyzer (such as flushing the intermittent value cache).

Returns:The analyzer’s current output value for use by the controller

See also: ch.epfl.leb.alica.interfaces.Controller

getIntermittentOutput

public double getIntermittentOutput()

Returns the intermittent output of the analyzer. This is used to read the current output of the analyzer; its internal state is unchanged. getBatchOutput() should be used to obtain output that will be passed to the controller.

Returns:The analyzer’s current output value.

getName

public String getName()

Returns a unique name for the analyzer.

Returns:The analyzer’s name.

getShortReturnDescription

public String getShortReturnDescription()

Returns a short description of the values returned by the analyzer.

Returns:A short description of the values returned by the analyzer.

getStatusPanel

public AnalyzerStatusPanel getStatusPanel()

Returns the analyzer’s status panel that will be displayed in the GUI. If no panel is implemented, this method should return null. In this case, the corresponding space in the MonitorGUI will appear blank.

Returns:The status panel of the analyzer, or null.

processImage

public void processImage(Object image, int image_width, int image_height, double pixel_size_um, long time_ms)

Processes an image and adjust the analyzer’s internal state to reflect the results of the calculation. This method is called after each new image acquisition by the AnalysisWorker. You can use the synchronized(this) statement within the body of an implementation of an Analyzer to ensure that no output readout happens during code execution. When implementing new Analyzers, try to keep the computation time as short as possible.

Parameters:
  • image – The image to be processed as 1D raw pixel data.
  • image_width – Image width in pixels.
  • image_height – Image height in pixels.
  • pixel_size_um – Length of a side of a square pixel in micrometers.
  • time_ms – Image acquisition time in milliseconds.

setROI

public void setROI(Roi roi)

Sets the region of interest in the image so that only a portion of the whole image is analyzed.

Parameters:
  • roi – The Roi object corresponding to the region.

See also: ij.gui.Roi