Package gov.nih.mipav.model.algorithms
Class AlgorithmSM2
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmSM2
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Based on the document provided by Daniel Reich: Notes on DCE with SM2 (standard model, aka Tofts model,
2-compartment) 3 model parameters are fit for each voxel in 3D: 1) K_trans in [1.0E-5, 5.0] in /min On input ktrans
is converted from /min to /sec and on output ktrans is converted from /sec to /min. 2) ve in [1.0E-5, 0.99] 3) f_vp
in [0, 0.99]
srcImage is a dynamic "4D volume" of MRI signal (3D over time). The equation used here is virtually identical to
equation 10.3 in T1-w DCE-MRI. Ct(t) = vpCp(t) + ktrans*integral from 0 to t of Cp(t') * exp[-ktrans*(t - t')/ve]dt'
(10.3) Cp is the concentration of agent in the vascular plasma space, vp. ve is the volume of the extravascular
extracellular space per unit volume of tissue. ktrans is the volume transfer constant between vp and ve. Ct is the
tracer concentration in the tissue as a whole. Our equation is: R1(t) - R10 = (vp * [R1,p(t) - R10,p] +
ktrans*integral from 0 to t of [R1,p(tau) - R10,p]*exp[-ktrans*(t - tau)/ve]d(tau))/(1 - h) where R10 is the tissue
R1 map in the absence of contrast material, a 3D volume R1(tj) is the tissue R1 map during contrast infusion, a 4D
data set. h = hematocrit with a default value of 0.4. With the sagittal sinus VOI: Average over this VOI to extract
the constant R10,p from the R10 map. Average over this VOI to extract the time series R1,p(tj) from the R1(tj) 4D
data set. tj is a vector of the center times for each volume, where j = 1,...,n and n is the number of post-contrast
volumes.
Solve the equation numerically assuming piecewise linearity and using the trapezoid rule.
The pre-injection volumes are actually averaged together to generate the R10 map. So you're right, they wouldn't
provide any additional information, and we don't need to fit them. After injection (t=t1), the first volume usually
has no contrast in it. That's because the contrast has to circulate to the brain. So R1,p(t1) should be the same as
R10,p, but in our scheme R1,p(t1) wasn't used to generate the R10 map. Any differences should be due to noise. Does
that help explain things?
For monomeric gadolinium chelates, Ktrans for the normal blood brain barrier is approximately 10^-4 min^-1 (from the
legend to Fig 5 of Li, Rooney, and Springer (MRM, 2005)). So a lower bound of 10^-5 should be ok. If R1,p(t1) = R10,p
except for noise, then R1,p(t1) - R10,p is purely noise and contains no useful information
References: 1.) "A Unified Magnetic Resonance Imaging Pharmacokinetic Theory: Intravascular and Extracellular
Contrast Reagents" by Xin Li, William D. Rooney, and Charles S. Springer, Jr., Magnetic Resonance in Medicine, Vol.
54, 2005, pp. 1351-1359. 2.) Erratum: Magnetic Resonance in Medicine, Vol. 55, 2006, p.1217. 3.) Quantitative MRI of
the Brain, Edited by Paul Tofts, 2003, John Wiley invalid input: '&' Sons, Ltd., ISBN: 0-47084721-2, Chapter 10, T1-w DCE-MRI:
T1-weighted Dynamic Contrast-enhanced MRI by Geoff J. M. Parker and Anwar R. Padhani, pp. 341-364. 4.) Larsson HBW,
Courivaud F, Rostrup E, Hansen AE. Measurement of brain perfusion, blood volume, and blood-brain barrier
permeability, using dynamic contrast-enhanced T1-weighted MRI at 3 tesla. Magnetic Resonance in Medicine 2009;
62(5):1270-1281. 5.) Li X, Rooney WD, Springer CS. A unified magnetic resonance imaging pharmacokinetic theory:
intravascular and extracellular contrast reagents. Magnetic Resonance in Medicine 2005 Dec; 54(6): 1351-1359. 6.)
Tofts PS, Modeling tracer kinetics in dynamic Gd-DPTA MR imaging. Journal of Magnetic Resonance Imaging, 1997, 7(1),
pp. 91-101. 7.) Tofts PS, Brix G, Buckley DL, Evelhoch JL, Henderson E, Knopp MV, Larsson HB, Mayr NA, Parker GJ,
Port RE, Taylor J, Weisskoff RM. Estimating kinetic parameters from dynamic contrast-enhanced T(1)-weighted MRI of a
diffusable tracer: standardized quantitites and symbols. J. Magn. Reson Imaging 1999 Sep; 10(3), pp. 223-232.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) class(package private) class(package private) class(package private) class(package private) class(package private) class(package private) class(package private) classclassNested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate BitSetprivate float[][]private int[]private ModelImage[]private final intprivate int[]private double[][]private final intprivate final doubleprivate intprivate double[]private doubleprivate doubleprivate double[]private double[]private final intprivate intprivate final int[]private final double[]private final double[]private final int[]private intprivate intprivate doubleprivate double[]private double[]private double[]private final intprivate intprivate double[]A vector of center times for each volumeprivate ModelImageprivate double[]private double[]private double[]private intprivate doubleprivate intprivate longprivate doubleprivate booleanprivate intprivate intprivate double[]private intFields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmSM2(ModelImage[] destImage, ModelImage srcImage, double[] min_constr, double[] max_constr, double[] initial, ModelImage tissueImage, double[] timeVals, double h, int sagittalSinusIndex, int processRegionIndex) Creates a new AlgorithmDEMRI3 object. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares this class for destruction.voidinput(double[] y_array, int i) voidoutput(double[] params, double paramSecs0, int i, int exitBits, float chi_squared) voidstarts the algorithm.private voidstatusMessage(int status) private voidstatusMessageNL2sol(int status, int numParam) Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
destImage
-
timeVals
private double[] timeValsA vector of center times for each volume -
r1t0
private double[] r1t0 -
r1tj
private double[] r1tj -
r1pt0
private double r1pt0 -
r1ptj
private double[] r1ptj -
min_constr
private double[] min_constr -
max_constr
private double[] max_constr -
h
private final double h -
sagittalSinusIndex
private final int sagittalSinusIndex -
processRegionIndex
private int processRegionIndex -
ymodel
private double[] ymodel -
i
private int i -
xDim
private int xDim -
yDim
private int yDim -
zDim
private int zDim -
tDim
private int tDim -
volSize
private int volSize -
initial
private double[] initial -
trapezoidMidpoint
private double[] trapezoidMidpoint -
trapezoidConstant
private double[] trapezoidConstant -
trapezoidSlope
private double[] trapezoidSlope -
ktransDivVe
private double ktransDivVe -
exparray
private double[][] exparray -
exitStatus
private int[] exitStatus -
paramNaN
private final int[] paramNaN -
paramInf
private final int[] paramInf -
paramMin
private final double[] paramMin -
paramMax
private final double[] paramMax -
processors
private int processors -
destArray
private float[][] destArray -
destExitStatusArray
private int[] destExitStatusArray -
voxelsProcessed
private long voxelsProcessed -
barMarker
private int barMarker -
oldBarMarker
private int oldBarMarker -
tissueImage
-
bitMask
-
validVoxels
private int validVoxels -
ktransTotal
private double ktransTotal -
veTotal
private double veTotal -
vpTotal
private double vpTotal -
wholeImage
private boolean wholeImage -
elsuncEngine
private final int elsuncEngine- See Also:
-
nl2solEngine
private final int nl2solEngine- See Also:
-
fittingEngine
private final int fittingEngine- See Also:
-
-
Constructor Details
-
AlgorithmSM2
public AlgorithmSM2(ModelImage[] destImage, ModelImage srcImage, double[] min_constr, double[] max_constr, double[] initial, ModelImage tissueImage, double[] timeVals, double h, int sagittalSinusIndex, int processRegionIndex) Creates a new AlgorithmDEMRI3 object.
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()starts the algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-
statusMessage
private void statusMessage(int status) -
statusMessageNL2sol
private void statusMessageNL2sol(int status, int numParam) -
input
public void input(double[] y_array, int i) -
output
public void output(double[] params, double paramSecs0, int i, int exitBits, float chi_squared)
-