Package gov.nih.mipav.model.algorithms
Class AlgorithmFacetModel
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmFacetModel
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.WindowListener,java.lang.Runnable,java.util.EventListener
public class AlgorithmFacetModel extends AlgorithmBase
-
-
Field Summary
Fields Modifier and Type Field Description private doublealphaprivate intblockHalfprivate intblockSideprivate double[]bufferstatic intCORNER_DETECTORstatic intFACET_BASED_PEAK_NOISE_REMOVALstatic intGRADIENT_BASED_FACET_EDGE_DETECTIONprivate doublegradientDirectionThresholdstatic intINTEGRATED_DIRECTIONAL_DERIVATIVE_ANGLEstatic intINTEGRATED_DIRECTIONAL_DERIVATIVE_MAGNITUDEstatic intITERATED_FACET_MODELprivate double[]resultprivate introutineprivate intxDimprivate intyDimstatic intZERO_CROSSING_EDGE_DETECTOR-
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 AlgorithmFacetModel(ModelImage srcImg, int routine, int blockSide, double alpha, double gradientDirectionThreshold)AlgorithmFacetModel(ModelImage destImg, ModelImage srcImg, int routine, int blockSide, double alpha, double gradientDirectionThreshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidbivariateCubicCoefficients(int x, int y, double[] k1, double[] k2, double[] k3, double[] k4, double[] k5, double[] k6, double[] k7, double[] k8, double[] k9, double[] k10, double[] sinAngle, double[] cosAngle, double[] gradientAngle)private voidbivariateCubicCoefficients5By5(int x, int y, double[] k1, double[] k2, double[] k3, double[] k4, double[] k5, double[] k6, double[] k7, double[] k8, double[] k9, double[] k10, double[] sinAngle, double[] cosAngle, double[] gradientAngle)private doublecolumnDerivativeMask5By5(int x, int y)private doublecolumnDerivativeMask7By7(int x, int y)private voidcornerDetector()private voiddirectionalDerivatives(double k1, double k2, double k3, double k4, double k5, double k6, double k7, double k8, double k9, double k10, double sinAngle, double cosAngle, double rho, double[] firstDirectionalDerivative, double[] secondDirectionalDerivative, double[] thirdDirectionalDerivative)private voidfacetBasedPeakNoiseRemoval()private voidgradientBasedFacetEdgeDetection()private voidintegratedDirectionalDerivative()private booleanisEdgePixel(double k1, double k2, double k3, double k4, double k5, double k6, double k7, double k8, double k9, double k10, double sinAngle, double cosAngle, double[] rho)private voiditeratedFacetModel()private doublerowDerivativeMask5By5(int x, int y)private doublerowDerivativeMask7By7(int x, int y)voidrunAlgorithm()Starts the program.private voidtestBivariateCubicCoefficients5By5()private voidzeroCrossingEdgeDetector()-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, 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
-
FACET_BASED_PEAK_NOISE_REMOVAL
public static final int FACET_BASED_PEAK_NOISE_REMOVAL
- See Also:
- Constant Field Values
-
ITERATED_FACET_MODEL
public static final int ITERATED_FACET_MODEL
- See Also:
- Constant Field Values
-
GRADIENT_BASED_FACET_EDGE_DETECTION
public static final int GRADIENT_BASED_FACET_EDGE_DETECTION
- See Also:
- Constant Field Values
-
ZERO_CROSSING_EDGE_DETECTOR
public static final int ZERO_CROSSING_EDGE_DETECTOR
- See Also:
- Constant Field Values
-
INTEGRATED_DIRECTIONAL_DERIVATIVE_ANGLE
public static final int INTEGRATED_DIRECTIONAL_DERIVATIVE_ANGLE
- See Also:
- Constant Field Values
-
INTEGRATED_DIRECTIONAL_DERIVATIVE_MAGNITUDE
public static final int INTEGRATED_DIRECTIONAL_DERIVATIVE_MAGNITUDE
- See Also:
- Constant Field Values
-
CORNER_DETECTOR
public static final int CORNER_DETECTOR
- See Also:
- Constant Field Values
-
blockSide
private int blockSide
-
alpha
private double alpha
-
routine
private int routine
-
gradientDirectionThreshold
private double gradientDirectionThreshold
-
xDim
private int xDim
-
yDim
private int yDim
-
buffer
private double[] buffer
-
result
private double[] result
-
blockHalf
private int blockHalf
-
-
Constructor Detail
-
AlgorithmFacetModel
public AlgorithmFacetModel(ModelImage srcImg, int routine, int blockSide, double alpha, double gradientDirectionThreshold)
-
AlgorithmFacetModel
public AlgorithmFacetModel(ModelImage destImg, ModelImage srcImg, int routine, int blockSide, double alpha, double gradientDirectionThreshold)
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
facetBasedPeakNoiseRemoval
private void facetBasedPeakNoiseRemoval()
-
iteratedFacetModel
private void iteratedFacetModel()
-
gradientBasedFacetEdgeDetection
private void gradientBasedFacetEdgeDetection()
-
isEdgePixel
private boolean isEdgePixel(double k1, double k2, double k3, double k4, double k5, double k6, double k7, double k8, double k9, double k10, double sinAngle, double cosAngle, double[] rho)
-
directionalDerivatives
private void directionalDerivatives(double k1, double k2, double k3, double k4, double k5, double k6, double k7, double k8, double k9, double k10, double sinAngle, double cosAngle, double rho, double[] firstDirectionalDerivative, double[] secondDirectionalDerivative, double[] thirdDirectionalDerivative)
-
testBivariateCubicCoefficients5By5
private void testBivariateCubicCoefficients5By5()
-
bivariateCubicCoefficients
private void bivariateCubicCoefficients(int x, int y, double[] k1, double[] k2, double[] k3, double[] k4, double[] k5, double[] k6, double[] k7, double[] k8, double[] k9, double[] k10, double[] sinAngle, double[] cosAngle, double[] gradientAngle)
-
bivariateCubicCoefficients5By5
private void bivariateCubicCoefficients5By5(int x, int y, double[] k1, double[] k2, double[] k3, double[] k4, double[] k5, double[] k6, double[] k7, double[] k8, double[] k9, double[] k10, double[] sinAngle, double[] cosAngle, double[] gradientAngle)
-
zeroCrossingEdgeDetector
private void zeroCrossingEdgeDetector()
-
cornerDetector
private void cornerDetector()
-
integratedDirectionalDerivative
private void integratedDirectionalDerivative()
-
rowDerivativeMask5By5
private double rowDerivativeMask5By5(int x, int y)
-
columnDerivativeMask5By5
private double columnDerivativeMask5By5(int x, int y)
-
rowDerivativeMask7By7
private double rowDerivativeMask7By7(int x, int y)
-
columnDerivativeMask7By7
private double columnDerivativeMask7By7(int x, int y)
-
-