Package gov.nih.mipav.model.algorithms
Class AlgorithmMidsagittal
java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmMidsagittal
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Finds the midsagittal line of a brain MRI by:
- Flipping the image horizontally.
- Registering the flipped image against the original.
- Getting the angle that the registration rotated the image.
- Transforming the original image by half the registration rotation.
- Version:
- 0.1 Dec 29, 2004
- Author:
- Evan McCreedy
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intLimits the number of iterations of Powell's algorithm when registering the original image against the flipped image.private intThe coarse angle step to use in each dimension when registering the original image against the flipped image.private intThe cost function to use when registering the original image against the flipped image.private intThe number of degrees of freedom to use when registering the original image against the flipped image.private booleanprivate booleanWhether to use subsampling when registering the original image against the flipped image.private booleanWhether to skip searching of the parameter space when registering the original image against the flipped image.private intThe fine angle step to use in each dimension when registering the original image against the flipped image.private intThe interpolation method to use when registering the original image against the flipped image.private booleanWhether to use the maximum of the minimum resolutions of the 2 images when respampling during registration against the flipped image.private intNumber of minima from level 8 to test at level 4 when registering the original image against the flipped image.private intThe search angles to use in each dimension (from-searchAngletosearchAngle) when registering the original image against the flipped image.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
ConstructorsConstructorDescriptionAlgorithmMidsagittal(ModelImage srcImg) Construct the midsagittal algorithm. -
Method Summary
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
-
baseNumIter
private int baseNumIterLimits the number of iterations of Powell's algorithm when registering the original image against the flipped image. -
coarseAngle
private int coarseAngleThe coarse angle step to use in each dimension when registering the original image against the flipped image. -
costFunc
private int costFuncThe cost function to use when registering the original image against the flipped image. -
dof
private int dofThe number of degrees of freedom to use when registering the original image against the flipped image. -
doSubsample
private boolean doSubsampleWhether to use subsampling when registering the original image against the flipped image. -
doMultiThread
private boolean doMultiThread -
fastMode
private boolean fastModeWhether to skip searching of the parameter space when registering the original image against the flipped image. -
fineAngle
private int fineAngleThe fine angle step to use in each dimension when registering the original image against the flipped image. -
interp
private int interpThe interpolation method to use when registering the original image against the flipped image. -
maxOfMin
private boolean maxOfMinWhether to use the maximum of the minimum resolutions of the 2 images when respampling during registration against the flipped image. -
numMinima
private int numMinimaNumber of minima from level 8 to test at level 4 when registering the original image against the flipped image. -
searchAngle
private int searchAngleThe search angles to use in each dimension (from-searchAngletosearchAngle) when registering the original image against the flipped image.
-
-
Constructor Details
-
AlgorithmMidsagittal
Construct the midsagittal algorithm.- Parameters:
srcImg- source image model
-
-
Method Details
-
finalize
public void finalize()Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
getResultImage
Get the midsagittal aligned image.- Returns:
- the aligned image
-
runAlgorithm
public void runAlgorithm()Starts the algorithm.- Specified by:
runAlgorithmin classAlgorithmBase
-
calc
private void calc()Find the midsagittal line and transform the source image to align it along that line vertically. -
calc35D
private void calc35D()
-