retina
Class OIDPCAAnalyzer

java.lang.Object
  |
  +--retina.OIDPCAAnalyzer
All Implemented Interfaces:
OIDBaseAnalyzer

public class OIDPCAAnalyzer
extends java.lang.Object
implements OIDBaseAnalyzer

Does PCA analysis on OID files. PCA analysis, showing it in TIFF files, one for each PCA. Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.


Field Summary
static java.lang.String functionName
           
protected static ScriptProcessor scriptProcessor
           
 
Constructor Summary
OIDPCAAnalyzer()
           
OIDPCAAnalyzer(ScriptProcessor scriptProcessor)
           
 
Method Summary
 void analyze(float[][] a, float[][] regEstimates, int frameWidth, java.lang.String directory, java.lang.String name)
          Analyze a series of OID frames a.
 void exit(int total, int frameWidth, int frameHeight, java.lang.String directory, java.lang.String name)
          Hook for exit.
 void init(ScriptProcessor fileProcessor)
           
 boolean prefersRegistration()
           
 void printInfo()
           
static boolean save(float[][] m, int width, java.lang.String directory, java.lang.String name)
          Dump the matrix m as a raw float stack to disk.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

scriptProcessor

protected static ScriptProcessor scriptProcessor

functionName

public static java.lang.String functionName
Constructor Detail

OIDPCAAnalyzer

public OIDPCAAnalyzer()

OIDPCAAnalyzer

public OIDPCAAnalyzer(ScriptProcessor scriptProcessor)
Method Detail

prefersRegistration

public boolean prefersRegistration()
Specified by:
prefersRegistration in interface OIDBaseAnalyzer

init

public void init(ScriptProcessor fileProcessor)
Specified by:
init in interface OIDBaseAnalyzer

analyze

public void analyze(float[][] a,
                    float[][] regEstimates,
                    int frameWidth,
                    java.lang.String directory,
                    java.lang.String name)
             throws java.lang.IllegalArgumentException
Analyze a series of OID frames a. In this case PCA.
Specified by:
analyze in interface OIDBaseAnalyzer
Parameters:
a - a float[][] with the reflectance frames.
regEstimates - a float [][] with the estimates of alignment for each frame with a[0].
frameWidth - the width in pixels of the frames in a
directory - the name of the directory where the result should go.
name - the name(s) of the file(s) on which a is based

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

save

public static boolean save(float[][] m,
                           int width,
                           java.lang.String directory,
                           java.lang.String name)
Dump the matrix m as a raw float stack to disk. Uses ImageJ routines. Nothing convenient about this, just WILL save my day if a big computation crashes.
Parameters:
m - the float[][] matrix
width - the width of each image in pixels.
directory - a String with the directory where to save.
name - a String with the name to save.
Returns:
true if succesful, false if Exception.

printInfo

public void printInfo()

exit

public void exit(int total,
                 int frameWidth,
                 int frameHeight,
                 java.lang.String directory,
                 java.lang.String name)
Hook for exit. Called at the end of all file processing (after last call to analyze).
Specified by:
exit in interface OIDBaseAnalyzer