Defcon

public class Defcon implements Analyzer

A fluorescent spot counter derived from the DEFCoN package.

Author:Kyle M. Douglass

See also: DEFCoN-ImageJ

Constructors

Defcon

public Defcon(String pathToModel)

Initializes the DEFCoN analyzer.

Parameters:
  • pathToModel – The path to the DEFCoN network model.

Methods

dispose

public void dispose()

Cleans up the analyzer when it’s finished.

finalize

protected void finalize()

Failsafe in case the predictor has not been closed at the point of garbage collection.

Throws:

getBatchOutput

public double getBatchOutput()

Returns the averaged DEFCoN count value since the last call. Double.NaN is returned if there is no new count since the previous call.

Returns:The averaged DEFCoN count.

getBoxSize

public int getBoxSize()

Returns the current square kernel size for maximum local counts.

Returns:The kernel size for computing the maximum local count.

getIntermittentOutput

public double getIntermittentOutput()

Returns the intermittent output of the analyzer.

Returns:The analyzer’s current output value.

getName

public String getName()

Returns the name of the DEFCoN analyzer.

Returns:The name of the DEFCoN analyzer.

getShortReturnDescription

public String getShortReturnDescription()

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

Returns:A short description of the values returned by the DEFCoN 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 DEFCoN analyzer or null.

isLiveModeOn

public boolean isLiveModeOn()

True if live mode is on, false otherwise.

Returns:True if live mode is on, false otherwise

isMaxLocalCount

public boolean isMaxLocalCount()

True if the analyzer is computing the maximum local count.

Returns:True if the analyzer is computing the maximum local count.

liveModeOff

public void liveModeOff()

Turns off the live view of the density map.

liveModeOn

public void liveModeOn()

Turns on the live view of the density map.

maxLocalCountOff

public void maxLocalCountOff()

Turns off the live view of the density map.

maxLocalCountOn

public void maxLocalCountOn()

Turns on the live view of the density map.

processImage

public void processImage(Object image, int width, int height, double pixelSizeUm, long timeMs)

Processes an image and adjusts 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.

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

setBoxSize

public void setBoxSize(int boxSize)

Sets the square kernel size for computing the maximum local count.

Parameters:
  • boxSize – The kernel size for computing the maximum local count.

setROI

public void setROI(Roi roi)

updateLiveView

public void updateLiveView()

Updates the live viewer.