Class AlgorithmTwoMRIImagesSNR
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmTwoMRIImagesSNR
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmTwoMRIImagesSNR extends AlgorithmBase
This module implements the National Electrical Manufacturers Association (NEMA) standard for SNR estimation in diagnostic MRI. This method requires a perfect geometrical registration of 2 MRI images scanned sequentailly with less than five minutes elapsed time from the end of the first scan to the beginning of the second scan. A simple 2 step process is used: 1.) Determine the standard deviation of the difference image over the same VOI region used for the signal mean difference variance = (1/(VOI pixel number - 1)) * sum over VOI region of (image[i] - image2[i])**2 difference standard deviation = square root(difference variance)2.) SNR for a signal VOI = square root(2) * (voi mean)/difference standard deviation The factor square root(2) is required because the standard deviation used is from the difference image rather than one of the original images The contrast to noise ratio is simply SNR for VOI 1 - SNR for VOI 2.
An optional registration may be performed before SNR. In this registration image2 is registered to image. AlgorithmRegOAR2D is used with the cost function being the only registration parameter the user can vary in the dialog box. Correlation ratio is the default cost function, but the user can also select least squares, normalized cross correlation, or normalized mutual information. The SNR will be performed with the registered image2 rather than on the original prebleached image.
Note that even for 2 perfectly aligned images the results differ substantially for processing without and with registration. In 1 example for 2 aligned images without registration the standard deviation equalled 12.3 and the SNR equalled 8.44. With registration the standard deviation equalled 7.66 and the SNR equalled 13.6.
The code here assumes the presence of 1 or 2 VOI regions - a required signal region and optional second signal region. The VOIs must all be placed in the the same image. Radio buttons in the dialog box are used to select a red signal 1 or a green signal 2 VOI. Either an ellipse VOI, rectangle VOI, or polyline VOI will be selected from the top MIPAV toolbar. There is no need to hit the NEW_VOI button.
Reference: 1.) PhD. Thesis Signal and Noise Estimation From Magnetic Resonance Images by Jan Sijbers, Universiteit Antwerpen, Department Natuurkunde, Section 7.1.2 The NEMA standard, p. 49.
2.) Acceptance Testing of Magnetic Resonance Imaging Systems, AAPM Report No. 34, Published by the American Assoication of Physicists in Medicine by the American Institute of Physics, March, 1992 (Reprinted from Medical Physics, Vol. 19, Issue 1, 1992).
-
-
Field Summary
Fields Modifier and Type Field Description private int
cost
DOCUMENT ME!private boolean
createRegImage
DOCUMENT ME!private ModelImage
image2
private ModelImage srcImage;.private boolean
register
DOCUMENT ME!private int
signal2Index
DOCUMENT ME!private int
signalImage
DOCUMENT ME!private int
signalIndex
DOCUMENT ME!private ViewUserInterface
UI
DOCUMENT ME!-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmTwoMRIImagesSNR(ModelImage image, ModelImage image2, int signalIndex, int signalImage, int signal2Index, boolean register, int cost, boolean createRegImage)
Creates a new AlgorithmTwoMRIImagesSNR object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
Prepares this class for destruction.void
runAlgorithm()
starts the algorithm.-
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, windowOpened
-
Methods 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, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
cost
private int cost
DOCUMENT ME!
-
createRegImage
private boolean createRegImage
DOCUMENT ME!
-
image2
private ModelImage image2
private ModelImage srcImage;.
-
register
private boolean register
DOCUMENT ME!
-
signal2Index
private int signal2Index
DOCUMENT ME!
-
signalImage
private int signalImage
DOCUMENT ME!
-
signalIndex
private int signalIndex
DOCUMENT ME!
-
UI
private ViewUserInterface UI
DOCUMENT ME!
-
-
Constructor Detail
-
AlgorithmTwoMRIImagesSNR
public AlgorithmTwoMRIImagesSNR(ModelImage image, ModelImage image2, int signalIndex, int signalImage, int signal2Index, boolean register, int cost, boolean createRegImage)
Creates a new AlgorithmTwoMRIImagesSNR object.- Parameters:
image
- First MRI imageimage2
- Second MRI imagesignalIndex
- the index of the signal VOIsignalImage
- image the signal VOI belongs to; 1 if image, 2 if image 2signal2Index
- the index of the second signal VOI if >= 0register
- If true register the image2 to the image before SNRcost
- Cost function used in registrationcreateRegImage
- If register = true and createRegImage = true, then create a frame with the registered image
-
-
Method Detail
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
starts the algorithm.- Specified by:
runAlgorithm
in classAlgorithmBase
-
-