public class PointSetToScheme extends Executable
Constructor and Description |
---|
PointSetToScheme(java.lang.String[] args) |
Modifier and Type | Method and Description |
---|---|
void |
execute(OutputManager om)
abstract method execution for commands
|
static double[] |
getPointModulus(double[][] points)
Gets the modulus of the vector from (0, 0, 0) to the point.
|
void |
initDefaultVals()
initialise the default values of class-level
fields, as they would be at declaration.
|
void |
initOptions(java.lang.String[] args)
default commandline parsing and initialisation
|
void |
initVariables()
abstract initialisation method for commands
|
static double[][] |
normalizePoints(double[][] points)
Normalizes points to unit length.
|
static java.lang.String |
pointSetToB_VectorScheme(double[][] points,
boolean useGradMod,
double[] dwPars)
Converts a point set and imaging parameters to a String representation of a
B_VectorScheme . |
static java.lang.String |
pointSetToRectGradSteTanScheme(double[][] points,
double[] dwPars)
Converts a point set and imaging parameters to a String representation of a
RectGradStejskalTannerScheme . |
static java.lang.String |
pointSetToRectGradTRSE_Scheme(double[][] points,
double[] dwPars)
Converts a point set and imaging parameters to a String representation of a
RectGradTRSE_Scheme . |
static double[][] |
readPoints(java.lang.String filename)
Reads points in the format
numPoints |
static double[][] |
readPoints(java.lang.String filename,
boolean flipX,
boolean flipY,
boolean flipZ)
Reads points in the format
numPoints |
public void initDefaultVals()
Executable
initDefaultVals
in class Executable
public void initOptions(java.lang.String[] args)
Executable
initOptions
in class Executable
public void initVariables()
Executable
initVariables
in class Executable
public void execute(OutputManager om)
Executable
execute
in class Executable
public static java.lang.String pointSetToRectGradSteTanScheme(double[][] points, double[] dwPars)
RectGradStejskalTannerScheme
.points
- the gradient directions, including zero gradients.dwPars
- diffusion weighting parameters: {|G|, DELTA, delta, TE}. All of these
parameters except TE will be set to zero for any measurement where the gradient direction is zero.RectGradSteTanScheme
public static java.lang.String pointSetToB_VectorScheme(double[][] points, boolean useGradMod, double[] dwPars)
B_VectorScheme
.points
- - the gradient directions, including zero gradients.useGradMod
- - if true, use the gradient direction modulus to scale the b-value.dwPars
- diffusion weighting parameters: {b}. The b-value will be set to zero
for any measurement with a zero gradient direction.B_VectorScheme
public static java.lang.String pointSetToRectGradTRSE_Scheme(double[][] points, double[] dwPars)
RectGradTRSE_Scheme
.points
- the gradient directions, including zero gradients.dwPars
- diffusion weighting parameters: {|G|, delta1, t_delta1, delta2, t_delta2,
delta3, t_tdelta4, TE}. All of these parameters except TE will be set to zero for any measurement
where the gradient direction is zero.imaging.RectGradTRSE_Scheme.
public static double[][] readPoints(java.lang.String filename) throws java.io.IOException
numPoints
x y z
x y z
...
or in the format
numPoints
x
y
z
x
...
from a text file. If the points are not unit vectors, they are normalized.filename
- the name of the file to read from. If null
, the method reads
from the standard input.java.io.IOException
public static double[][] readPoints(java.lang.String filename, boolean flipX, boolean flipY, boolean flipZ) throws java.io.IOException
numPoints
x y z
x y z
...
or in the format
numPoints
x
y
z
x
...
or
x y z
x y z
...
from a text file. Does not normalize points to unity, call normalizePoints
to do that.filename
- the name of the file to read from. If null
, the method reads
from the standard input.java.io.IOException
public static double[] getPointModulus(double[][] points)
public static double[][] normalizePoints(double[][] points)