Package gov.nih.mipav.model.algorithms
Class AlgorithmEllipseGeneration
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmEllipseGeneration
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmEllipseGeneration extends AlgorithmBase
This module draws uniformly randomly positioned ellipses with a specified semi-major axis, semi-minor axis, and angle phi between the x-axis and the major axis of the ellipse.
-
-
Field Summary
Fields Modifier and Type Field Description static int
AGGREGATED
static int
CONSTRAINED
private double
highestForbiddenNNDistance
private double
highestRegenerationNNDistance
private int
initialRandomEllipses
private double
lowestForbiddenNNDistance
private double
maximumNearestNeighborDistance
private double
minimumNearestNeighborDistance
private int
numEllipses
private int
pattern
private double
phi
static int
RANDOM
static int
REGULAR
private int
semiMajorAxis
private int
semiMinorAxis
-
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 AlgorithmEllipseGeneration()
AlgorithmEllipseGeneration - default constructor.AlgorithmEllipseGeneration(ModelImage srcImage, int semiMajorAxis, int semiMinorAxis, double phi, int numEllipses, int pattern, int initialRandomEllipses, double minimumNearestNeighborDistance, double maximumNearestNeighborDistance, double lowestForbiddenNNDistance, double highestForbiddenNNDistance, double highestRegenerationNNDistance)
AlgorithmEllipseGeneration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
finalize -void
runAlgorithm()
Starts the program.-
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
-
RANDOM
public static final int RANDOM
- See Also:
- Constant Field Values
-
AGGREGATED
public static final int AGGREGATED
- See Also:
- Constant Field Values
-
REGULAR
public static final int REGULAR
- See Also:
- Constant Field Values
-
CONSTRAINED
public static final int CONSTRAINED
- See Also:
- Constant Field Values
-
semiMajorAxis
private int semiMajorAxis
-
semiMinorAxis
private int semiMinorAxis
-
phi
private double phi
-
numEllipses
private int numEllipses
-
initialRandomEllipses
private int initialRandomEllipses
-
pattern
private int pattern
-
minimumNearestNeighborDistance
private double minimumNearestNeighborDistance
-
maximumNearestNeighborDistance
private double maximumNearestNeighborDistance
-
lowestForbiddenNNDistance
private double lowestForbiddenNNDistance
-
highestForbiddenNNDistance
private double highestForbiddenNNDistance
-
highestRegenerationNNDistance
private double highestRegenerationNNDistance
-
-
Constructor Detail
-
AlgorithmEllipseGeneration
public AlgorithmEllipseGeneration()
AlgorithmEllipseGeneration - default constructor.
-
AlgorithmEllipseGeneration
public AlgorithmEllipseGeneration(ModelImage srcImage, int semiMajorAxis, int semiMinorAxis, double phi, int numEllipses, int pattern, int initialRandomEllipses, double minimumNearestNeighborDistance, double maximumNearestNeighborDistance, double lowestForbiddenNNDistance, double highestForbiddenNNDistance, double highestRegenerationNNDistance)
AlgorithmEllipseGeneration.- Parameters:
srcImg
- Blank source image in which circles will be drawnsemiMajorAxis
- Ellipse semi-major axissemiMajorAxis
- Ellipse semi-minor axisphi
- Angle between the x-axis and the major axis of the ellipse in radiansnumEllipses
- Number of ellipses to be drawnpattern
- RANDOM, AGGREGATED, or REGULARinitialRandomEllipses
- Used in AGGREGATED. initialRandomEllipses are drawn randomly. The rest are drawn with nearestNeighborDistance less than or equal ot maximumNearestNeighborDistance.minimumNearestNeighborDistance
- Used in REGULARmaximumNearestNeighborDistance
- Used in AGGREGATED and REGULARlowestForbiddenNNDistance
- Used in CONSTRAINEDhighestForbiddenNNDistance
- Used in CONSTRAINEDhighestRegeneerationNNDistance
- Used in CONSTRAINED
-
-
Method Detail
-
finalize
public void finalize()
finalize -- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
-