public abstract class DW_Scheme
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static double |
GAMMA
Gyromagnetic ratio of protons in water, in units of s^{-1} T^{-1}.
|
static int[] |
gradXYZ
may be passed to gradOrder method to get X, Y, Z ordering of the gradient directions.
|
static int[] |
gradXZY
may be passed to gradOrder method to get X, Z, Y ordering of the gradient directions.
|
static int[] |
gradYXZ
may be passed to gradOrder method to get Y, X, Z ordering of the gradient directions.
|
static int[] |
gradYZX
may be passed to gradOrder method to get Y, Z, X ordering of the gradient directions.
|
static int[] |
gradZXY
may be passed to gradOrder method to get Z, X, Y ordering of the gradient directions.
|
static int[] |
gradZYX
may be passed to gradOrder method to get Z, Y, X ordering of the gradient directions.
|
Modifier and Type | Method and Description |
---|---|
abstract DW_Scheme |
flipX()
Negates the X component of the gradient directions.
|
abstract DW_Scheme |
flipY()
Negates the Y component of the gradient directions.
|
abstract DW_Scheme |
flipZ()
Negates the Z component of the gradient directions.
|
double |
geoMeanZeroMeas(double[] data)
Computes the geometric mean of the b=0 measurements.
|
RealMatrix |
getB_Matrix()
The B-matrix B is defined as follows.
|
abstract double |
getB_Value(int i)
Gets the b-value for measurement i.
|
double[] |
getG_Dir(int i)
Gets a copy of the i-th gradient direction.
|
double[] |
getNonZeroB_Values() |
double[][] |
getNonZeroG_Dirs() |
abstract DW_Scheme |
getSubsetScheme(int[] indices)
Gets a scheme composed of a subset of the measurements in this scheme.
|
abstract DW_Scheme |
gradOrder(int[] order)
Reorders the gradient directions.
|
double[] |
normalizeData(double[] data)
Normalizes a voxel set of measurements acquired with this
sequence by the geometric mean of the b=0 measurements.
|
double[] |
normalizeData(double[] data,
double normC)
Normalizes a voxel set of measurements acquired with this
sequence.
|
double[] |
normalizeData(double[] data,
int[] indices)
Normalizes a voxel set of measurements acquired with this sequence by the geometric mean
of a specified set of measurements.
|
static double[][] |
normalizeGradDirs(double[][] g)
Returns gradient directions as vectors normalized to unit length if non-zero.
|
static DW_Scheme |
nullScheme()
This static method simply returns a default scheme for
various applications that require a scheme object without
actually using it.
|
int |
numMeasurements()
Gets the number of measurements in each voxel.
|
int |
numZeroMeasurements()
Gets the number of zero (b=0) measurements in each voxel.
|
static DW_Scheme |
readScheme(java.lang.String filename)
Reads a scheme from a scheme file.
|
boolean |
zero(int i)
Determines whether a measurement has zero diffusion weighting.
|
public static final double GAMMA
public static final int[] gradXYZ
public static final int[] gradXZY
public static final int[] gradYXZ
public static final int[] gradYZX
public static final int[] gradZXY
public static final int[] gradZYX
public static DW_Scheme nullScheme()
public int numMeasurements()
public int numZeroMeasurements()
public final double[] getG_Dir(int i)
public final double[][] getNonZeroG_Dirs()
public final double[] getNonZeroB_Values()
public final double[] normalizeData(double[] data)
data
- unnormalized set of measurements.public final double[] normalizeData(double[] data, int[] indices)
data
- unnormalized set of measurements.indices
- the integer indices of the measurements to use for the normalization.public final double[] normalizeData(double[] data, double normC)
data
- unnormalized set of measurements.normC
- the normalization constant, which must be positive.public final double geoMeanZeroMeas(double[] data)
data
- unnormalized set of measurements.public boolean zero(int i)
public final RealMatrix getB_Matrix()
public abstract double getB_Value(int i)
public abstract DW_Scheme flipX()
public abstract DW_Scheme flipY()
public abstract DW_Scheme flipZ()
public abstract DW_Scheme getSubsetScheme(int[] indices)
indices
- integer indices of the measurements to include in the subset.public abstract DW_Scheme gradOrder(int[] order)
order
- the new order of the gradients, where x=0, y=1, z=2. The original order is
[0 1 2], the new order may be any combination of x,y,z. Convenience variables grad___ are
provided by the DW_Scheme
class.gradXYZ and related variables.
public static final DW_Scheme readScheme(java.lang.String filename)
public static final double[][] normalizeGradDirs(double[][] g)