Class AlgorithmSWI
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.filters.AlgorithmSWI
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
This class recalculates mo and dceFullTre to provide better estimates using the inverse Ernst equation
- Author:
- Justin Senseney (SenseneyJ@mail.nih.gov)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ModelImageDenotes which pixels undergo SWI processing.private ModelImageprivate ModelImageprivate ModelImageprivate booleanDenotes whether the algorithm is run in a script/JIST, if so showInterImages just stores images for later access.private ModelImageprivate ModelImageprivate ModelImageprivate doubleprivate intprivate ModelImageprivate ModelImageprivate booleanWhether intermediate images should be displayed during pipeline processingprivate intX dimension lengthprivate intprivate doubleprivate intY dimension lengthprivate intprivate doubleprivate intZ dimension lengthFields 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
ConstructorsConstructorDescriptionAlgorithmSWI(boolean inScript, ModelImage resultImage, ModelImage magImage, ModelImage phaseImage, double maskThreshold, int roFilterSize, int peFilterSize, int multFactor, boolean showInterImages) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcalc2D()private voidcalc3D()private ModelImageprivate ModelImagecreateiImage(double[] realData, double[] imagData) private ModelImagecreateKCenterImage(ModelImage kImage) private ModelImagecreatekImage(ModelImage iImage) voidfinalize()Prepares this class for destruction.private ModelImagegenerateIFinal(ModelImage iImage, ModelImage iCenterImage, BitSet brainMaskSet, double[] ixRealFinal, double[] ixImagFinal) private ModelImagegenerateMagEnhanced(double[] phaseMaskData, ModelImage magnitude) private ModelImagegeneratePhaseMask(BitSet brainMaskSet, double[] ixRealFinal, double[] ixImagFinal, double[] phaseMaskData) private voidrescaleToComplex(ModelImage magImage, ModelImage phaseImage, double[] realData, double[] imagData) voidStarts the algorithm.private ModelImageruniFFTonKCenter(ModelImage kCenterImage) 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
-
magImage
-
phaseImage
-
maskThreshold
private double maskThreshold -
xFilterSize
private int xFilterSize -
yFilterSize
private int yFilterSize -
multFactor
private int multFactor -
xDim
private int xDimX dimension length -
yDim
private int yDimY dimension length -
zDim
private int zDimZ dimension length -
xFilterTopLeft
private double xFilterTopLeft -
yFilterTopLeft
private double yFilterTopLeft -
showInterImages
private boolean showInterImagesWhether intermediate images should be displayed during pipeline processing -
kImage
-
iImage
-
brainMask
Denotes which pixels undergo SWI processing. -
kCenterImage
-
iFinal
-
phaseMask
-
inScript
private boolean inScriptDenotes whether the algorithm is run in a script/JIST, if so showInterImages just stores images for later access. -
iCenter
-
-
Constructor Details
-
AlgorithmSWI
public AlgorithmSWI(boolean inScript, ModelImage resultImage, ModelImage magImage, ModelImage phaseImage, double maskThreshold, int roFilterSize, int peFilterSize, int multFactor, boolean showInterImages) Constructor.- Parameters:
resultImage- Result image modelsrcImg- Source image model.
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Starts the algorithm. At the conclusion of this method, AlgorithmBase reports to any algorithm listeners that this algorithm has completed. This method is not usually called explicitly by a controlling dialog. Instead, see AlgorithmBase.run() or start().- Specified by:
runAlgorithmin classAlgorithmBase
-
calc2D
private void calc2D() -
calc3D
private void calc3D() -
generateMagEnhanced
-
generatePhaseMask
private ModelImage generatePhaseMask(BitSet brainMaskSet, double[] ixRealFinal, double[] ixImagFinal, double[] phaseMaskData) -
generateIFinal
private ModelImage generateIFinal(ModelImage iImage, ModelImage iCenterImage, BitSet brainMaskSet, double[] ixRealFinal, double[] ixImagFinal) -
runiFFTonKCenter
-
createKCenterImage
-
createkImage
-
createiImage
-
createBrainMask
-
rescaleToComplex
private void rescaleToComplex(ModelImage magImage, ModelImage phaseImage, double[] realData, double[] imagData) -
getkImage
-
getiImage
-
getBrainMask
-
getkCenterImage
-
getiFinal
-
getPhaseMask
-
getiCenter
-