edu.jhu.ece.iacl.algorithms.manual_label.simulation
Class SurfaceRater

java.lang.Object
  extended by edu.jhu.ece.iacl.algorithms.manual_label.simulation.SurfaceRater

public class SurfaceRater
extends java.lang.Object

Simulates a random surface rater characterized by their 1) Probability of error 2) Probability of boundary error (vs global error) 3) Confusion Matrix (for global error) 4) Probability that boundary errors will occur on particular boundaries 5) Probability that the boundary will "shrink" or "grow". Note: A boundary between label i and j (i!=j, i

Author:
John Bogovic

Constructor Summary
SurfaceRater(EmbeddedSurface truthsurf)
           
SurfaceRater(EmbeddedSurface truthsurf, float[][] confusion, float[] perError, float totReliability, int offset)
           
SurfaceRater(EmbeddedSurface truthsurf, float[] perError, float totReliability, int offset)
           
SurfaceRater(EmbeddedSurface truthsurf, float totReliability, java.util.ArrayList<Point2i> boundaries, float[] boundErrProb, float[] growPerProb, int offset)
           
SurfaceRater(EmbeddedSurface truthsurf, float totReliability, float[][] confusion, java.util.ArrayList<Point2i> boundaries, float[] boundErrProb, float[] growPerProb, int offset)
           
SurfaceRater(EmbeddedSurface truthsurf, float totReliability, int[] labels, float[][] confusion, int offset)
           
 
Method Summary
 void computeBoundaryInformation()
          Computes boundaries, and boundary vertices
static java.util.ArrayList<Point2i> findBoundaries(EmbeddedSurface surf, int offset)
          Find all boundaries that exist on a surface.
 EmbeddedSurface genConfRaterSurface()
          Calls genConfusionRater using this class's data
static EmbeddedSurface genConfusionRater(EmbeddedSurface surf, ConfusionMatrix confusion, int offset, int[] labels)
          Returns a rater surface by passing the label at each vertex through a confusion matrix.
static EmbeddedSurface genPerimRaterOld(EmbeddedSurface surf, float[] perimparam, int[] labels, float totreliability, int offset)
          Returns a rater surface by modifying boundary vertex labels until
 EmbeddedSurface genPerimRaterSurface()
          Returns a simulated rater surface
static int[] getLabelList(EmbeddedSurface surf, int offset)
          Gets a list of all of the labels (stored as an int array) that are present on an input surface
 void reset()
          clean up everything related to the rater data to prepare to create a new rater
 void setName(java.lang.String name)
           
 void setNeighborTable(int[][] table)
           
 void setoffset(int offset)
           
 void setSeed(long seed)
           
 java.io.File writeRaterSurface(java.io.File f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SurfaceRater

public SurfaceRater(EmbeddedSurface truthsurf)

SurfaceRater

public SurfaceRater(EmbeddedSurface truthsurf,
                    float totReliability,
                    int[] labels,
                    float[][] confusion,
                    int offset)

SurfaceRater

public SurfaceRater(EmbeddedSurface truthsurf,
                    float[] perError,
                    float totReliability,
                    int offset)

SurfaceRater

public SurfaceRater(EmbeddedSurface truthsurf,
                    float[][] confusion,
                    float[] perError,
                    float totReliability,
                    int offset)

SurfaceRater

public SurfaceRater(EmbeddedSurface truthsurf,
                    float totReliability,
                    java.util.ArrayList<Point2i> boundaries,
                    float[] boundErrProb,
                    float[] growPerProb,
                    int offset)

SurfaceRater

public SurfaceRater(EmbeddedSurface truthsurf,
                    float totReliability,
                    float[][] confusion,
                    java.util.ArrayList<Point2i> boundaries,
                    float[] boundErrProb,
                    float[] growPerProb,
                    int offset)
Method Detail

setoffset

public void setoffset(int offset)

setName

public void setName(java.lang.String name)

setNeighborTable

public void setNeighborTable(int[][] table)

reset

public void reset()
clean up everything related to the rater data to prepare to create a new rater


setSeed

public void setSeed(long seed)

computeBoundaryInformation

public void computeBoundaryInformation()
Computes boundaries, and boundary vertices


genConfRaterSurface

public EmbeddedSurface genConfRaterSurface()
Calls genConfusionRater using this class's data

Returns:
the simulated rater surface

genPerimRaterSurface

public EmbeddedSurface genPerimRaterSurface()
Returns a simulated rater surface

Returns:
the simulated rater surface

findBoundaries

public static java.util.ArrayList<Point2i> findBoundaries(EmbeddedSurface surf,
                                                          int offset)
Find all boundaries that exist on a surface. A boundary is represented by an integer pair. {i,j}=={j,i}

Parameters:
surf - The labeled surface
offset - The data offset
Returns:
List of boundaries

genPerimRaterOld

public static EmbeddedSurface genPerimRaterOld(EmbeddedSurface surf,
                                               float[] perimparam,
                                               int[] labels,
                                               float totreliability,
                                               int offset)
Returns a rater surface by modifying boundary vertex labels until

Parameters:
surf - 'true' labeled surface
perimparam - parameter controlling
offset - data offset
Returns:
the rater surface

genConfusionRater

public static EmbeddedSurface genConfusionRater(EmbeddedSurface surf,
                                                ConfusionMatrix confusion,
                                                int offset,
                                                int[] labels)
Returns a rater surface by passing the label at each vertex through a confusion matrix.

Parameters:
surf - 'true' labeled surface
confusion - confusion matrix
offset - offset of label data
Returns:
the same surface with the rater data

getLabelList

public static int[] getLabelList(EmbeddedSurface surf,
                                 int offset)
Gets a list of all of the labels (stored as an int array) that are present on an input surface

Parameters:
surf - labeled surface
offset - offset of label data
Returns:

writeRaterSurface

public java.io.File writeRaterSurface(java.io.File f)