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:
ActionListener,WindowListener,Runnable,EventListener
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intprivate doubleprivate doubleprivate intprivate doubleprivate doubleprivate doubleprivate intprivate intprivate doublestatic final intstatic final intprivate intprivate intFields 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
ConstructorsConstructorDescriptionAlgorithmEllipseGeneration - 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
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
-
RANDOM
public static final int RANDOM- See Also:
-
AGGREGATED
public static final int AGGREGATED- See Also:
-
REGULAR
public static final int REGULAR- See Also:
-
CONSTRAINED
public static final int CONSTRAINED- See Also:
-
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 Details
-
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:
semiMajorAxis- Ellipse semi-major 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 CONSTRAINEDsrcImg- Blank source image in which circles will be drawnsemiMajorAxis- Ellipse semi-minor axishighestRegeneerationNNDistance- Used in CONSTRAINED
-
-
Method Details
-
finalize
public void finalize()finalize -- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-