public class WeightedLinearDT_Inversion extends DT_Inversion
LinearDT_Inversion
ITEMSPERVOX
Constructor and Description |
---|
WeightedLinearDT_Inversion(DW_Scheme imParams)
The constructor requires the details of the sequence used to generate the
data that will be processed.
|
Modifier and Type | Method and Description |
---|---|
void |
background()
In background voxels this inverter needs to output zero if there is a noise map.
|
void |
close()
Closes the noise map output stream, if open.
|
double |
computeNoiseVariance(RealMatrix[] weightedSolution)
Computes the noise variance \sigma^2 = (Y - XB)^T W^2 (Y - XB) / (DOF), where
DOF is the number of degrees of freedom in the model.
|
double[] |
computeResidualVector(RealMatrix[] weightedSolution) |
RealMatrix[] |
computeWeightedFit(double[] data)
Solves W*Y = W*X*B for B.
|
RealMatrix[] |
computeWeightedFit(double[] data,
double[] olsSolution)
Solves W*Y = W*X*B for B.
|
double[] |
invert(double[] data)
Fits the diffusion tensor.
|
getIndexedDT_Inversion, itemsPerVoxel
public WeightedLinearDT_Inversion(DW_Scheme imParams)
imParams
- The imaging sequence parameters.public double[] invert(double[] data)
If any of the data is bad (log of the data cannot be computed), the inversion attempts to compensate by giving bad measurements zero weight. If this fails, the unweighted linear fit is returned.
invert
in class DiffusionInversion
data
- The MRI data.public void close()
close
in class DiffusionInversion
public void background()
background
in class DiffusionInversion
public double[] computeResidualVector(RealMatrix[] weightedSolution)
weightedSolution
- array [Y, W, XB]. The array [Y, W, XB, B], returned from the
computeWeightedFit method, may also be used as the parameter (but B is not required).
The first three elements are used to compute the weighted residuals, where
Y = log of the DWI measurements, W = diag[exp(XB(i))], ie diagonal matrix containing
predicted DWI measurements, and XB = product of design matrix with parameter matrix.public double computeNoiseVariance(RealMatrix[] weightedSolution)
weightedSolution
- array [Y, W, XB]. The array [Y, W, XB, B], returned from the
computeWeightedFit method, may also be used as the parameter (but B is not required).
The first three elements are used to compute the noise variance, where
Y = log of the DWI measurements, W = diag[exp(XB(i))], ie diagonal matrix containing
predicted DWI measurements, and XB = product of design matrix with parameter matrix.public RealMatrix[] computeWeightedFit(double[] data) throws SVD_Exception
SVD_Exception
public RealMatrix[] computeWeightedFit(double[] data, double[] olsSolution) throws SVD_Exception
olsSolution
- the array returned by LinearDT_Inversion.invert(data). This solution is used to
initialize B, and hence W: W(i,i) = exp(XB(i)) for each measurement i.SVD_Exception