FrameLogger

public class FrameLogger extends AbstractLogger

Reports the positions of all fluorophores visible in each frame in a file The FrameLogger is a singleton.

Author:Baptiste Ottino

Methods

getBrightness

public ArrayList<Double> getBrightness()

getFrame

public ArrayList<Integer> getFrame()

getFrameInfo

public ArrayList<FrameInfo> getFrameInfo()

Returns all the logged arrays in a single data structure. This method is provided for convenience when all frame information is required.

Returns:A FramInfo data structure containing all the logged data.

getId

public ArrayList<Integer> getId()

getInstance

public static FrameLogger getInstance()
Returns:An instance of the singleton.

getLogCurrentFrameOnly

public boolean getLogCurrentFrameOnly()

Indicates whether only the current frame or all frames are logged.

Returns:If return value is true, only information about the current frame is returned.

getTimeOn

public ArrayList<Double> getTimeOn()

getX

public ArrayList<Double> getX()

getY

public ArrayList<Double> getY()

getZ

public ArrayList<Double> getZ()

logFrame

public void logFrame(int frame, int id, double x, double y, double z, double brightness, double timeOn)

Logs emitter information for each full frame. Correct operation of this method when logCurrentFrameOnly is true assumes that values for the frame argument either are the same as previous calls to this method or monotonically increasing.

Parameters:
  • frame – The current frame
  • id – The emitter’s unique ID.
  • x – x-position of the emitter
  • y – y-position of the emitter
  • z – z-position of the emitter
  • brightness – the apparent brightness of the fluorophore on the frame in number of photons
  • timeOn – the amount of time the emitter “id” stays on in the current frame

reset

public void reset()

Resets the logger to its initial state.

saveLogFile

public void saveLogFile()

Saves the state of the logger to a file.

Throws:
  • IOException

setLogCurrentFrameOnly

public void setLogCurrentFrameOnly(boolean logCurrentFrame)

Toggles whether only the current frame or all frames should be logged. Setting this to true will erase any information already held by the FrameLogger.

Parameters:
  • logCurrentFrame – If true, only information on the current frame is retained.