Package gov.nih.mipav.model.algorithms
Class AlgorithmEllipseToRectangle
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmEllipseToRectangle
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class AlgorithmEllipseToRectangle extends AlgorithmBase
This program performs the conformal mapping of an ellipse to a rectangle. Consider the original ellipse as having a tilt theta with the x axis. From problem 9 in Nehari: w = sin z maps the rectangle -pi/2 < Re |z| < pi/2, -c < Im |z| < c onto the interior of the ellipse u**2/(cosh c)**2 + v**2/(sinh c)**2 = 1 which has been cut along the linear segments -cosh c <= w <= -1, 1 <= w <= cosh c Then the conformal mapping is done in 3 steps. 1.) Translate the center of the rectangular image to the origin, and divide down the rectangle size by ((xDim - 1)/3.1). 2.) Map from the rectangle to a standard ellipse on the x axis with foci at +- 1 and with the same major axis/minor axis ratio as the original ellipse. 3.) Map from the standard ellipse to the original ellipse by rotating, scaling, and translating.References: 1.) Advanced Calculus For Applications Second Edition by F. B. Hildebrand, Section 10.4 Analytic Functions of a Complex Variable pages 550-554 and Section 11.4 Conformal Mapping pages 628-632, Prentice-Hall, Inc., 1976. 2.) Conformal Mapping from Zeev Nehari, Chapter VI, Mapping Properties of Special Functions, Section 2, Exponential and Trigonometric Functions, pp. 273-280. See Porblem 9 on page 279.
-
-
Field Summary
Fields Modifier and Type Field Description private ModelImage
resultImage
private int
xDimDest
-
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 AlgorithmEllipseToRectangle()
AlgorithmEllipseToRectangle - default constructor.AlgorithmEllipseToRectangle(ModelImage srcImg, int xDimDest)
AlgorithmEllipseToRectangle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalize()
finalize -ModelImage
getResultImage()
void
runAlgorithm()
Starts the program.private void
selfTest()
-
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
-
xDimDest
private int xDimDest
-
resultImage
private ModelImage resultImage
-
-
Constructor Detail
-
AlgorithmEllipseToRectangle
public AlgorithmEllipseToRectangle()
AlgorithmEllipseToRectangle - default constructor.
-
AlgorithmEllipseToRectangle
public AlgorithmEllipseToRectangle(ModelImage srcImg, int xDimDest)
AlgorithmEllipseToRectangle.- Parameters:
srcImg
- DOCUMENT ME!xDimDest
-
-
-
Method Detail
-
finalize
public void finalize()
finalize -- Overrides:
finalize
in classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithm
in classAlgorithmBase
-
getResultImage
public ModelImage getResultImage()
-
selfTest
private void selfTest()
-
-