Class AlgorithmRegVOILandmark
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.registration.AlgorithmRegVOILandmark
-
- All Implemented Interfaces:
de.jtem.numericalMethods.calculus.function.RealFunctionOfSeveralVariables
,java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmRegVOILandmark extends AlgorithmBase implements de.jtem.numericalMethods.calculus.function.RealFunctionOfSeveralVariables
AlgorithmRegVOILandmark First slice is template (base image) to which subsequent slices are registered. Trace kidney in 1st slice using polygon VOI. Minimize cost = -sum of Gradient magnitude under propagated ROI in match image- Version:
- 1.0 June, 2000
- Author:
- Delia McGarry
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
AlgorithmRegVOILandmark.CostFunction
CostFunction - class for specifying optimization function for AlgorithmSimplexOpt slice - current fluoroscopy slice being operated on.
-
Field Summary
Fields Modifier and Type Field Description protected float
baseVOIGradMagSum
DOCUMENT ME!protected int
costFunc
DOCUMENT ME!static int
EXHAUSTIVEOPT
DOCUMENT ME!private AlgorithmRegVOILandmark.CostFunction
func
private AlgorithmGradientMagnitude
gradientMagAlgo
DOCUMENT ME!protected float[]
gradMagBuf
DOCUMENT ME!protected ModelImage
gradMagVol
DOCUMENT ME!private boolean
maskFlag
private double
maxRz
DOCUMENT ME!static int
MAXSUM
DOCUMENT ME!private double
maxTx
DOCUMENT ME!private double
maxTy
DOCUMENT ME!static int
MINDIFF
DOCUMENT ME!private double
minRz
DOCUMENT ME!private double
minTx
DOCUMENT ME!private double
minTy
DOCUMENT ME!protected int
opt
DOCUMENT ME!private float[]
sigmas
private int
simplexDim
DOCUMENT ME!static int
SIMPLEXOPT
DOCUMENT ME!protected int
sliceSize
DOCUMENT ME!private double
step
DOCUMENT ME!protected int
tdim
DOCUMENT ME!protected int
VOIlength
DOCUMENT ME!protected VOIBase
VOIposition
positions (x,y) of VOI in first sliceprotected int
volLength
DOCUMENT ME!protected ModelImage
volume
DOCUMENT ME!protected int
xdim
DOCUMENT ME!protected int
ydim
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 AlgorithmRegVOILandmark(ModelImage volume, ModelImage gradMagVol, float[] sigmas, boolean maskFlag, VOIBase position, double minTx, double maxTx, double minTy, double maxTy, double minRz, double maxRz, double step, int opt, int costFunc)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
eval(double[] x)
private void
exhaustiveSearch(double[] p, AlgorithmRegVOILandmark.CostFunction func)
Exhaustive search for global minimum.void
finalize()
finalize - prepares this class for destruction.int
getNumberOfVariables()
protected TransMatrix
getTransform(double[] x)
Converts row of p into 3x3 matrix.void
runAlgorithm()
Starts the program.private void
search()
Search.private void
transformSlice(int slice, TransMatrix xfrm, float[] imgBuf, float[] tImgBuf, WildMagic.LibFoundation.Mathematics.Vector3f center)
Transforms a slice.-
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
-
SIMPLEXOPT
public static final int SIMPLEXOPT
DOCUMENT ME!- See Also:
- Constant Field Values
-
EXHAUSTIVEOPT
public static final int EXHAUSTIVEOPT
DOCUMENT ME!- See Also:
- Constant Field Values
-
MINDIFF
public static final int MINDIFF
DOCUMENT ME!- See Also:
- Constant Field Values
-
MAXSUM
public static final int MAXSUM
DOCUMENT ME!- See Also:
- Constant Field Values
-
baseVOIGradMagSum
protected float baseVOIGradMagSum
DOCUMENT ME!
-
gradientMagAlgo
private AlgorithmGradientMagnitude gradientMagAlgo
DOCUMENT ME!
-
gradMagBuf
protected float[] gradMagBuf
DOCUMENT ME!
-
minTx
private double minTx
DOCUMENT ME!
-
maxTx
private double maxTx
DOCUMENT ME!
-
minTy
private double minTy
DOCUMENT ME!
-
maxTy
private double maxTy
DOCUMENT ME!
-
minRz
private double minRz
DOCUMENT ME!
-
maxRz
private double maxRz
DOCUMENT ME!
-
step
private double step
DOCUMENT ME!
-
opt
protected int opt
DOCUMENT ME!
-
costFunc
protected int costFunc
DOCUMENT ME!
-
simplexDim
private int simplexDim
DOCUMENT ME!
-
VOIlength
protected int VOIlength
DOCUMENT ME!
-
VOIposition
protected VOIBase VOIposition
positions (x,y) of VOI in first slice
-
volLength
protected int volLength
DOCUMENT ME!
-
sliceSize
protected int sliceSize
DOCUMENT ME!
-
volume
protected ModelImage volume
DOCUMENT ME!
-
gradMagVol
protected ModelImage gradMagVol
DOCUMENT ME!
-
xdim
protected int xdim
DOCUMENT ME!
-
ydim
protected int ydim
DOCUMENT ME!
-
tdim
protected int tdim
DOCUMENT ME!
-
sigmas
private float[] sigmas
-
maskFlag
private boolean maskFlag
-
func
private AlgorithmRegVOILandmark.CostFunction func
-
-
Constructor Detail
-
AlgorithmRegVOILandmark
public AlgorithmRegVOILandmark(ModelImage volume, ModelImage gradMagVol, float[] sigmas, boolean maskFlag, VOIBase position, double minTx, double maxTx, double minTy, double maxTy, double minRz, double maxRz, double step, int opt, int costFunc)
Constructor.- Parameters:
volume
- DOCUMENT ME!gradMagVol
- DOCUMENT ME!sigmas
- DOCUMENT ME!maskFlag
- DOCUMENT ME!position
- DOCUMENT ME!minTx
- DOCUMENT ME!maxTx
- DOCUMENT ME!minTy
- DOCUMENT ME!maxTy
- DOCUMENT ME!minRz
- DOCUMENT ME!maxRz
- DOCUMENT ME!step
- DOCUMENT ME!opt
- DOCUMENT ME!costFunc
- DOCUMENT ME!
-
-
Method Detail
-
finalize
public void finalize()
finalize - prepares this class for destruction.- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
exhaustiveSearch
private void exhaustiveSearch(double[] p, AlgorithmRegVOILandmark.CostFunction func)
Exhaustive search for global minimum.- Parameters:
p
- DOCUMENT ME!func
- DOCUMENT ME!
-
getTransform
protected TransMatrix getTransform(double[] x)
Converts row of p into 3x3 matrix.- Parameters:
x
- = row of p[][]- Returns:
- DOCUMENT ME!
-
search
private void search()
Search.
-
transformSlice
private void transformSlice(int slice, TransMatrix xfrm, float[] imgBuf, float[] tImgBuf, WildMagic.LibFoundation.Mathematics.Vector3f center)
Transforms a slice.- Parameters:
slice
- DOCUMENT ME!xfrm
- DOCUMENT ME!imgBuf
- DOCUMENT ME!tImgBuf
- DOCUMENT ME!
-
eval
public double eval(double[] x)
- Specified by:
eval
in interfacede.jtem.numericalMethods.calculus.function.RealFunctionOfSeveralVariables
-
getNumberOfVariables
public int getNumberOfVariables()
- Specified by:
getNumberOfVariables
in interfacede.jtem.numericalMethods.calculus.function.RealFunctionOfSeveralVariables
-
-