Class AlgorithmTwoMRIImagesSNR
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
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).
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intDOCUMENT ME!private booleanDOCUMENT ME!private ModelImageprivate ModelImage srcImage;.private booleanDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private intDOCUMENT ME!private ViewUserInterfaceDOCUMENT 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, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmTwoMRIImagesSNR(ModelImage image, ModelImage image2, int signalIndex, int signalImage, int signal2Index, boolean register, int cost, boolean createRegImage) Creates a new AlgorithmTwoMRIImagesSNR object. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinalize()Prepares this class for destruction.voidstarts 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, 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
-
cost
private int costDOCUMENT ME! -
createRegImage
private boolean createRegImageDOCUMENT ME! -
image2
private ModelImage srcImage;. -
register
private boolean registerDOCUMENT ME! -
signal2Index
private int signal2IndexDOCUMENT ME! -
signalImage
private int signalImageDOCUMENT ME! -
signalIndex
private int signalIndexDOCUMENT ME! -
UI
DOCUMENT ME!
-
-
Constructor Details
-
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 Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()starts the algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-