|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.mri.SpinSignalDifference
public class SpinSignalDifference
Class SpinSignalDifference provides an object that computes the difference between a measured spin signal and a model spin signal. Class SpinSignalDifference implements interface VectorFunction.
An instance of class SpinSignalDifference is constructed with two data series, each an instance of class Series. The first data series contains the measurement times ti. The second data series contains the measured spin signals S(ti). The vector function's result vector length, M, is the same as the length of the data series.
The vector function's argument vector x gives parameters for the model spin signal. The argument vector consists of one or more pairs of consecutive values. Each pair of consecutive values corresponds to one tissue. The first value of the pair is ρj, the spin density for tissue j. The second value of the pair is Rj, the spin relaxation rate for tissue j. The number of tissues is specified as a constructor parameter. The vector function's argument vector length, N, is twice the number of tissues.
The vector function is calculated as follows. For each i, 0 <= i <= M−1:
The model spin signal is defined as follows:
To find the model spin signal parameters x that best fit the measured spin signal, use an instance of class SpinSignalDifference with the nonlinear least squares algorithm in class NonLinearLeastSquares.
| Constructor Summary | |
|---|---|
SpinSignalDifference(Series t_series,
Series S_series,
int L)
Construct a new spin signal difference function. |
|
SpinSignalDifference(XYSeries data_series,
int L)
Construct a new spin signal difference function. |
|
| Method Summary | |
|---|---|
int |
argumentLength()
Returns the length of the argument vector, N. |
void |
df(double[] x,
double[][] dydx)
Calculate this function's Jacobian matrix with the given argument vector. |
void |
f(double[] x,
double[] y)
Evaluate this function with the given argument vector. |
int |
resultLength()
Returns the length of the result vector, M. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpinSignalDifference(XYSeries data_series,
int L)
data_series - X-Y series of measured time values (X) and measured
spin signal values (Y).L - Number of tissues in the model spin signal.
NullPointerException - (unchecked exception) Thrown if data_series is null.
IllegalArgumentException - (unchecked exception) Thrown if the series' length is 0. Thrown if
L <= 0.
public SpinSignalDifference(Series t_series,
Series S_series,
int L)
t_series - Series of measured time values.S_series - Series of measured spin signal values.L - Number of tissues in the model spin signal.
NullPointerException - (unchecked exception) Thrown if t_series is null or
S_series is null.
IllegalArgumentException - (unchecked exception) Thrown if either series' length is 0. Thrown if
the two series have different lengths. Thrown if L <= 0.| Method Detail |
|---|
public int resultLength()
resultLength in interface VectorFunctionpublic int argumentLength()
argumentLength in interface VectorFunction
public void f(double[] x,
double[] y)
f in interface VectorFunctionx - Argument vector (input). Must be an N-element array.y - Result vector (output). Must be an M-element array.
DomainException - (unchecked exception) Thrown if any argument in x is outside
the allowed set of values for this function.
RangeException - (unchecked exception) Thrown if any element of the result vector is
outside the range of type double.
public void df(double[] x,
double[][] dydx)
df in interface VectorFunctionx - Argument vector (input). Must be an N-element array.dydx - Jacobian matrix (output). Must be an
M×N-element matrix.
DomainException - (unchecked exception) Thrown if any argument in x is outside
the allowed set of values for this function.
RangeException - (unchecked exception) Thrown if any element of the Jacobian matrix is
outside the range of type double.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||