retina
Class OIDProcessor

java.lang.Object
  |
  +--retina.OIDProcessor

public class OIDProcessor
extends java.lang.Object

Optical Imaging frame sequence analysis. Many methods to aggregate and analyze the frames in epochs acoording to different methods. (c) 2003 Michael Abramoff. All rights reserved.


Field Summary
 float[][] aggregate
          The processed OID images.
 float[][] aggregateRegistration
          Registration parameters for aggregate, null if no registration was performed.
protected  boolean aggregating
           
protected static float BLINKDEV
          Number of standarddeviations from average eye-motion to qualify as abnormal or blink.
static int BLOCK
           
static int CONTRAST
           
static int DIVISION
           
protected  boolean doAvg
           
protected  boolean doLinearCorrect
           
protected  boolean doRegistration
           
protected  boolean doSmooth
           
protected  boolean doSubOpp
           
 int end
          Other parameters describing the layout of aggregate.
protected  java.lang.String[] epochNames
           
protected  ij.io.FileInfo fi
           
protected  java.lang.String firstFrameDescription
           
protected  OIDHeader header
           
 int length
          Other parameters describing the layout of aggregate.
protected  int nrFrames
          Counter for number of frames.
protected  int nrSuspectRegistrations
          Counter for suspect registrations.
 int nrUniqueConditions
          Other parameters describing the layout of aggregate.
protected  float scale
           
protected  float scaling
           
static int SEPARATE
           
 int start
          Other parameters describing the layout of aggregate.
protected  java.util.Vector stimuli
           
protected  java.lang.String stimulusDescriptor
           
static int SUBTRACT
           
 
Constructor Summary
OIDProcessor()
          Start an OIDProcessor.
OIDProcessor(ij.io.FileInfo fi, java.lang.String[] epochNames)
          Start an OIDProcessor for the FileInfo fi and epochNames, an array of file names.
 
Method Summary
protected  void aggregateEpochs()
          Aggregate the frames in any number of epochs and return as a float[][].
 java.lang.String getFullTitle()
           
 java.lang.String getFullTitle(java.lang.String name)
           
protected static float[][] linearCorrect(float[][] a, float[] mask)
          Do linear correction on the ROI of all images in the sequence.
protected  float[][] registerEpoch(Register reg, ij.ImagePlus epochimp, float[][] epoch, int width, float[] reference, int k)
          Register the frames in the k'th epoch (in epochimp) to reference.
 void setHeader(OIDHeader header)
          Set the OID header obtained from OID info.
 void setOptions(boolean doRegistration, boolean doLinearCorrect, boolean doAvg, boolean doSubOpp, boolean doLast2, float scale, float scaling, int length, int start, int end, int nrUniqueConditions)
          Set the options for this OIDProcessor.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aggregate

public float[][] aggregate
The processed OID images.

aggregateRegistration

public float[][] aggregateRegistration
Registration parameters for aggregate, null if no registration was performed.

start

public int start
Other parameters describing the layout of aggregate.

end

public int end
Other parameters describing the layout of aggregate.

length

public int length
Other parameters describing the layout of aggregate.

nrUniqueConditions

public int nrUniqueConditions
Other parameters describing the layout of aggregate.

BLINKDEV

protected static final float BLINKDEV
Number of standarddeviations from average eye-motion to qualify as abnormal or blink.

doLinearCorrect

protected boolean doLinearCorrect

doSmooth

protected boolean doSmooth

doSubOpp

protected boolean doSubOpp

doRegistration

protected boolean doRegistration

doAvg

protected boolean doAvg

scaling

protected float scaling

scale

protected float scale

header

protected OIDHeader header

fi

protected ij.io.FileInfo fi

epochNames

protected java.lang.String[] epochNames

aggregating

protected boolean aggregating

nrFrames

protected int nrFrames
Counter for number of frames.

nrSuspectRegistrations

protected int nrSuspectRegistrations
Counter for suspect registrations.

stimuli

protected java.util.Vector stimuli

firstFrameDescription

protected java.lang.String firstFrameDescription

stimulusDescriptor

protected java.lang.String stimulusDescriptor

SUBTRACT

public static final int SUBTRACT

DIVISION

public static final int DIVISION

CONTRAST

public static final int CONTRAST

SEPARATE

public static final int SEPARATE

BLOCK

public static final int BLOCK
Constructor Detail

OIDProcessor

public OIDProcessor()
Start an OIDProcessor.

OIDProcessor

public OIDProcessor(ij.io.FileInfo fi,
                    java.lang.String[] epochNames)
Start an OIDProcessor for the FileInfo fi and epochNames, an array of file names.
Parameters:
fi - the FileInfo object that contains all header information about the files in epochNames.
epochNames - a Strin array with the names of files representing epochs.
Method Detail

setHeader

public void setHeader(OIDHeader header)
Set the OID header obtained from OID info.
Parameters:
header - an OIDHeader

setOptions

public void setOptions(boolean doRegistration,
                       boolean doLinearCorrect,
                       boolean doAvg,
                       boolean doSubOpp,
                       boolean doLast2,
                       float scale,
                       float scaling,
                       int length,
                       int start,
                       int end,
                       int nrUniqueConditions)
Set the options for this OIDProcessor.
Parameters:
are - still too volatile to describe.

aggregateEpochs

protected void aggregateEpochs()
Aggregate the frames in any number of epochs and return as a float[][]. MODIFIES
 nrSuspectRegistrations the number of supect registrations.
 aggregateRegistration where the registrations for each frame go
 stimuli contains all stimuli
 firstFrameDescription descrption of first frame in first epoch
 

registerEpoch

protected float[][] registerEpoch(Register reg,
                                  ij.ImagePlus epochimp,
                                  float[][] epoch,
                                  int width,
                                  float[] reference,
                                  int k)
Register the frames in the k'th epoch (in epochimp) to reference. Modifies nrSuspectRegistrations.
Parameters:
reg - the registration class (type).
epochimp - an ImagePlus containing the epochs, used to get the FOV/ROI frame for registration (same size as reference).
epoch - a float[][] matrix with the epoch frames.
width - the width of the image sin epoch.
reference - image to register to.
k - the number of the epoch.
Returns:
a float[][] with the registration parameters.

getFullTitle

public java.lang.String getFullTitle()

getFullTitle

public java.lang.String getFullTitle(java.lang.String name)

linearCorrect

protected static float[][] linearCorrect(float[][] a,
                                         float[] mask)
Do linear correction on the ROI of all images in the sequence. This means computing the average of the second and next to last slice in the sequence, computing the average differential for each slice, and adding the differential average from each slice (so that the histogram is flat). This corrects for linearly increasing or decreasing intensity changes in a sequence.
Parameters:
a - matrix of images.
roi - a Region of Interest.