edu.jhu.ece.iacl.algorithms.manual_label.atlasing
Class LogOdds

java.lang.Object
  extended by edu.jhu.ece.iacl.algorithms.manual_label.atlasing.LogOdds

public class LogOdds
extends java.lang.Object

Author:
John Bogovic

Constructor Summary
LogOdds()
           
 
Method Summary
static int[] getNonNormalizedVector(int numlabs, int indNorm)
          Helper method used in Logit and iLogit methods
static float[][][][] InvLogit(float[][][][] logodds, int indNorm, boolean fourthDimLab)
          Computes the probability map corresponding to a point in Log-Odds space The probabilities for each label should be stored in the 4th dimension of the input array.
static ImageDataFloat InvLogit(ImageData logodds, int indNorm, boolean fourthDimLab, java.lang.String name)
          Computes the probability map corresponding to a point in Log-Odds space The probabilities for each label should be stored in the 4th dimension of the input array.
static float[][][][] Logit(float[][][][] probAtlas, int indNorm, float eps, boolean fourthDimLab)
          Computes the Log-Odds of probability maps of labels.
static ImageDataFloat Logit(ImageData probAtlas, int indNorm, float eps, boolean fourthDimLab, java.lang.String name, java.io.File dir)
          Computes the Log-Odds of probability maps of labels.
static void normalize(ImageData a, boolean fourthDim)
           
static void zeroToEpsilon(ImageData a, float epsilon, boolean fourthDim)
          Converts all zeros in an image data to epsilon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogOdds

public LogOdds()
Method Detail

Logit

public static float[][][][] Logit(float[][][][] probAtlas,
                                  int indNorm,
                                  float eps,
                                  boolean fourthDimLab)
Computes the Log-Odds of probability maps of labels. The probabilities for each label should be stored in the 4th dimension of the input array.

Parameters:
probAtlas - The input Probability map
indNorm - Normalizing Index
fourthDimLab - Are the labels stored in the fourth dimension? If this is false, the method assumes that labels are stored across the first dimension.
Returns:
The point in Log-Odds space.

Logit

public static ImageDataFloat Logit(ImageData probAtlas,
                                   int indNorm,
                                   float eps,
                                   boolean fourthDimLab,
                                   java.lang.String name,
                                   java.io.File dir)
Computes the Log-Odds of probability maps of labels. The probabilities for each label should be stored in the 4th dimension of the input array.

Parameters:
probAtlas - The input Probability map
indNorm - Normalizing Index
fourthDimLab - Are the labels stored in the fourth dimension? If this is false, the method assumes that labels are stored across the first dimension.
Returns:
The point in Log-Odds space.

InvLogit

public static float[][][][] InvLogit(float[][][][] logodds,
                                     int indNorm,
                                     boolean fourthDimLab)
Computes the probability map corresponding to a point in Log-Odds space The probabilities for each label should be stored in the 4th dimension of the input array.

Parameters:
logodds - The input Log-Odds
indNorm - Normalizing Index
fourthDimLab - Are the labels stored in the fourth dimension? If this is false, the method assumes that labels are stored across the first dimension.
Returns:
The corresponding probability map

InvLogit

public static ImageDataFloat InvLogit(ImageData logodds,
                                      int indNorm,
                                      boolean fourthDimLab,
                                      java.lang.String name)
Computes the probability map corresponding to a point in Log-Odds space The probabilities for each label should be stored in the 4th dimension of the input array.

Parameters:
logodds - The input Log-Odds
indNorm - Normalizing Index
fourthDimLab - Are the labels stored in the fourth dimension? If this is false, the method assumes that labels are stored across the first dimension.
Returns:
The corresponding probability map

getNonNormalizedVector

public static int[] getNonNormalizedVector(int numlabs,
                                           int indNorm)
Helper method used in Logit and iLogit methods

Parameters:
numlabs - total number of labels
indNorm - index of label used as normalizer
Returns:
ordered vector of label indices that were normalized by the indNorm label

zeroToEpsilon

public static void zeroToEpsilon(ImageData a,
                                 float epsilon,
                                 boolean fourthDim)
Converts all zeros in an image data to epsilon. Ensures that the 'labe-wise' probability maps are properly normalized.

Parameters:
a - the input ImageData

normalize

public static void normalize(ImageData a,
                             boolean fourthDim)