|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.ece.iacl.algorithms.dti.DTEMRLTensor
public class DTEMRLTensor
This class is used to minimize the least likelihood estimator from data from diffusion weighted imaging. It appears that all the algorithms but Line Search using Newton's method are very stable. The Line Searches are fairly slow since they have to iterate through the optimizer so many times. Both Downhill Simplex and LM are very fast, with Downhill Simplex only slightly faster with this function. With nicer functions LM can be significantly faster than Downhill Simplex as demonstrated by the optimization of simpler functions in TestNDOptimizations.
Field Summary | |
---|---|
static double |
PLUS_EPSILON
|
Constructor Summary | |
---|---|
DTEMRLTensor()
|
Method Summary | |
---|---|
void |
baseInit(Matrix imgMatrix,
double b0,
double sigma,
double[] obsB0,
double[] obsDW,
double[] kspaceAverages)
|
double |
getB0()
Gets the value of b0 |
Matrix |
getD()
Gets the D matrix |
int |
getIterations()
Gets the number of iterations required to calculate the result. |
double |
getSigma()
Gets the value of sigma. |
void |
init(Matrix imgMatrix,
double b0,
double sigma,
double[] obsB0,
double[] obsDW,
double[] dInit,
double[] kspaceAverages)
Initializes MLTensor with these parameters |
void |
init(Matrix imgMatrix,
double b0,
double sigma,
double[] obsB0,
double[] obsDW,
float[] dInit,
double[] kspaceAverages)
|
double |
LLvalue()
Calculates the log-likelihood (LL) value |
static void |
LLvalue(double[] modelTruth,
double sigma,
double[] obs,
double[] swap,
double[] result)
|
boolean |
optimize6D2D()
Lets you specify which algorithm to use and the maximum number of iterations. |
boolean |
optimize6D2D(int method)
|
boolean |
optimize6D2D(int method,
int maxIter)
|
boolean |
optimize8D()
Lets you specify which algorithm to use to optimize all 8 parameters at once. |
boolean |
optimize8D(int method)
|
void |
setB0(double b0)
|
void |
setD(double[] dInit)
|
void |
setD(float[] dInit)
|
void |
setDFactor(double d)
Sets the scaling factor for D. |
void |
setDomain(double[] min,
double[] max)
Sets the domain minimum and maximum values. |
void |
setLikelihoodThreshold(double t)
|
void |
setMethod(int m)
Sets the method used to calculate the derivatives. |
void |
setNoiseLevelPrior(double mean,
double std)
|
void |
setNoiseLevelPriorOff()
|
void |
setSigma(double s)
|
void |
setSigmaFactor(double s)
Sets the scaling factor for sigma. |
void |
setStepSize(double s)
Sets the step size used in calculating derivatives. |
void |
setTolerance(double t)
Sets the tolerance. |
void |
setUseDirectTensorRepresentation(boolean useDirect)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static double PLUS_EPSILON
Constructor Detail |
---|
public DTEMRLTensor()
Method Detail |
---|
public void setLikelihoodThreshold(double t)
public void setNoiseLevelPriorOff()
public void setNoiseLevelPrior(double mean, double std)
public void setUseDirectTensorRepresentation(boolean useDirect)
public void init(Matrix imgMatrix, double b0, double sigma, double[] obsB0, double[] obsDW, double[] dInit, double[] kspaceAverages)
imgMatrix
- image matrixb0
- initial b0sigma
- initial standard deviationobsB0
- observed b0'sobsDW
- observed diffusion weighted tensorpublic void init(Matrix imgMatrix, double b0, double sigma, double[] obsB0, double[] obsDW, float[] dInit, double[] kspaceAverages)
public void baseInit(Matrix imgMatrix, double b0, double sigma, double[] obsB0, double[] obsDW, double[] kspaceAverages)
public boolean optimize8D()
method
- 0 - Downhill Simplex; 1 - LM; 2 - Line Search using Golden Section Search
3 - Line Search using Brent's Method; 4 - Line Search using Newton
public boolean optimize8D(int method)
public boolean optimize6D2D()
method
- 0 - Downhill Simplex; 1 - LM; 2 - Line Search using Golden Section Search
3 - Line Search using Brent's; 4 - Line Search using NewtonmaxIter
- maximum number of iterations
public boolean optimize6D2D(int method)
public boolean optimize6D2D(int method, int maxIter)
public double LLvalue()
public static void LLvalue(double[] modelTruth, double sigma, double[] obs, double[] swap, double[] result)
public double getB0()
public void setB0(double b0)
public double getSigma()
public void setSigma(double s)
public Matrix getD()
public void setD(double[] dInit)
public void setD(float[] dInit)
public void setSigmaFactor(double s)
s
- number to scale sigma bypublic void setDFactor(double d)
d
- number to scale D bypublic void setTolerance(double t)
t
- tolerancepublic void setStepSize(double s)
s
- step sizepublic void setMethod(int m)
m
- methodpublic void setDomain(double[] min, double[] max)
min
- domain minimum array of size 8max
- domain maximum array of size 8public int getIterations()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |