Class AlgorithmCircularSectorToRectangle
- All Implemented Interfaces:
ActionListener,WindowListener,Runnable,EventListener
Let z4z1 be on the real axis, let the straight line z2z3 be inclined at an angle alpha*PI, 0 invalid input: '<' alpha invalid input: '<'= 1, z3 and z4 are both on the radius rmin, and z1 and z2 are both on the radius rmax. For the conformal mapping we require that rmax > 1 and 0 invalid input: '<' rmin invalid input: '<' 1. So divide all the distances by sqrt(rmax * rmin). Then the radii go from sqrt(rmin/rmax) to sqrt(rmax/rmin).
To go from a circular sector to a rectangle use the transformation w = f(z) = u + iv = log(z)/(i*alpha*PI) Let z = r*exp(i*theta) Then, w = log(r*exp(i*theta))/(i*alpha*PI) = theta/(alpha*PI) - i*log(r)/(alpha*PI) so u = theta/(alpha*PI), v = -log(r)/(alpha*PI)
For conformal mapping we require that f(z) be analytic - the Cauchy-Riemann equations must be satisfied and f'(z) must not equal zero. The Cauchy-Riemann equations in polar form are: du/dr = (1/r)(dv/dtheta); (1/r)du/dtheta = -dv/dr The first equation gives zero on both sides and the second equation gives (alpha*PI)/r on both sides, so the Cauchy Riemann equations hold. f'(z) = 1/(i*alpha*PI*z) does not equal zero.
In the first mapping: rmin -> sqrt(rmin/rmax) -> log(sqrt(rmin/rmax))/(i*alpha*PI) = i*log(sqrt(rmax/rmin))/(alpha*PI) rmin*exp(i*alpha*PI) -> sqrt(rmin/rmax)*exp(i*alpha*PI) -> 1 + i*log(sqrt(rmax/rmin))/(alpha*PI) rmax -> sqrt(rmax/rmin) -> log(sqrt(rmax/rmin))/(i*alpha*PI) = -i*log(sqrt(rmax/rmin))/(alpha*PI) rmax*exp(i*alpha*PI) -> sqrt(rmax/rmin)*exp(i*alpha*PI) -> 1 - i*log(sqrt(rmax/rmin))/(alpha*PI)
Now do a simple linear transformation where both the x axis is inverted and both axes are scaled to obtain: z1" = xDim-1, 0 z2" = 0, 0 z3" = 0, yDim-1 z4" = xDim - 1, yDim-1
x" = (1 - x')*(xDim - 1) Let var = log(sqrt(rmax/rmin))/(alpha*PI) y" = (y' + var)* (yDim - 1)/(2 * var)
A similar transformation is performed in Conformal Mapping by Zeev Nehari Chapter VI Mapping Properties of Special Functions 2. Exponential and Trigonometric Functios pp. 273-280. Nehari states that "the transformation w = exp(z) maps the boundary of any rectangle in the z-plane whose sides are parallel to the axes onto a closed contour consisting of two circular arcs about the origin and two linear segments pointing at the origin."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.) "A Domain Decomposition Method for Conformal Mapping onto a Rectangle", N. Papamichael and N. S. Stylianopoulos, Constructive Approximation, Vol. 7, 1991, pp. 349-379. Relevant result is given in Remark 4.7 on pages 374-375.
3.) Conformal Mapping by Zeev Nehari Chapter VI Mapping Properties of Special Functions 2. Exponential and Trigonometric Functions pp. 273-280.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate intprivate final intprivate final intprivate double[]DOCUMENT ME!private double[]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, threadStoppedFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionAlgorithmCircularSectorToRectangle - default constructor.AlgorithmCircularSectorToRectangle(ModelImage destImg, ModelImage srcImg, double[] x, double[] y) AlgorithmCircularSectorToRectangle. -
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
-
x
private double[] xDOCUMENT ME! -
y
private double[] yDOCUMENT ME! -
testOrientation
private int testOrientation -
testTop
private final int testTop- See Also:
-
testBottom
private final int testBottom- See Also:
-
testRight
private final int testRight- See Also:
-
testLeft
private final int testLeft- See Also:
-
-
Constructor Details
-
AlgorithmCircularSectorToRectangle
public AlgorithmCircularSectorToRectangle()AlgorithmCircularSectorToRectangle - default constructor. -
AlgorithmCircularSectorToRectangle
public AlgorithmCircularSectorToRectangle(ModelImage destImg, ModelImage srcImg, double[] x, double[] y) AlgorithmCircularSectorToRectangle.- Parameters:
destImg- DOCUMENT ME!srcImg- DOCUMENT ME!x- array with x coordinates of 4 sector boundary pointsy- array with y coordinates of 4 sector boundary points
-
-
Method Details
-
finalize
public void finalize()finalize -- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
selfTest
private void selfTest() -
selfTest2
private void selfTest2() -
selfTest3
private void selfTest3()
-