Class PixelAnalysis
- java.lang.Object
-
- edu.rit.mri.PixelAnalysis
-
public class PixelAnalysis extends java.lang.ObjectClass PixelAnalysis provides a routine for doing a spin relaxometry analysis on one pixel of a magnetic resonance image.The input to the analysis is a measured spin signal expressed as two Series objects, a time series ti and a spin signal series S(ti). Another input is a series of fixed spin-lattice relaxation rates R1j. These rates are chosen to cover the range of likely rates for the magnetic resonance image being analyzed.
The routine first does a nonnegative, linear least squares fit of the input data to a model consisting of a group of tissues with the input fixed spin-lattice relaxation rates R1j. Peaks in the linear least squares fit determine the number of tissues and the approximate spin density and spin-lattice relaxation rate for each tissue.
The routine then does a nonlinear least squares fit of the input data to a model consisting of the number of tissues determined in the previous step. The nonlinear least squares fit "polishes up" the spin densities and spin-lattice relaxation rates determined in the previous step, which are only approximate.
The routine checks the nonlinear least squares fit for plausibility. To be plausible:
- All spin densities and spin-lattice relaxation rates must be positive. (If this is not the case, it's likely the nonlinear least squares fit is trying to fit the data to too many parameters, resulting in nonsensical parameter values.)
- All the spin-lattice relaxation rates must be sufficiently far apart. Specifically, the relative difference between any two rates must be greater than 0.001. (If the rates are closer together than that, it's likely they represent the same tissue.)
- The sum of the spin densities must agree with the asymptotic spin signal for large values of t. Specifically, the sum must be within 20% of the average of the last seven spin signal values. (If this is not the case, it's likely that two spurious "tissues," one with a very large relaxation rate, one with a very small relaxation rate, are canceling each other out, and there really should be only one tissue.)
The output of the analysis is a list of the tissues' computed spin densities and a list of the tissues' computed spin-lattice relaxation rates.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidanalyze(Series t_series, Series S_series, Series R1_series, double[][] A, java.util.List<java.lang.Double> rho_list, java.util.List<java.lang.Double> R1_list)Do a spin relaxometry analysis.
-
-
-
Method Detail
-
analyze
public static void analyze(Series t_series, Series S_series, Series R1_series, double[][] A, java.util.List<java.lang.Double> rho_list, java.util.List<java.lang.Double> R1_list)
Do a spin relaxometry analysis.- Parameters:
t_series- Series of measured time values, of length M (input).S_series- Series of measured spin signal values, of length M (input).R1_series- Series of fixed spin-lattice relaxation rates for the linear part of the analysis, of length N (input).A- Design matrix for the linear part of the analysis (input). This must be an M×N-element matrix such that Ai,j = 1 − 2 exp(−R1j ti). (The design matrix is supplied as an argument because the same design matrix is typically used for every pixel in an image, and calculating the design matrix just once outside this routine saves time.)rho_list- List in which to store the computed spin densities (output). The size of the list is the number of tissues. If the routine could not find a solution, the size of the list is 0.R1_list- List in which to store the computed spin-lattice relaxation rates (output). The size of the list is the number of tissues. If the routine could not find a solution, the size of the list is 0.
-
-
DMelt 3.0 © DataMelt by jWork.ORG