Class AlgorithmNearlyCircleToCircle

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmNearlyCircleToCircle
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, EventListener

public class AlgorithmNearlyCircleToCircle extends AlgorithmBase
This program performs the conformal mapping of a nearly circular region to a circle. The conformal mapping is done in 3 steps: 1.) Translate the circle from the center of the square image to the origin and convert to a unit disc by dividing the distance from the center by the radius. 2.) Map from the unit circle to a unit nearly circular region at the origin. 3.) Map from the unit nearly circlular region at the origin to the original nearly circular region by 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 by Zeev Nehari, Dover Publications, Inc., 1952, Chapter V, Conformal Mapping of Simply Connected Domains, Section 11, Conformal Mapping of Nearly Circular Domains, pp. 263 - 265. 3.) "On the Conformal Mapping of Nearly-Circular Domains" by Zeev Nehari and Vikramaditya Singh, Proceedings of the American Mathematical Society, 1956, pp. 370-378. According to the Nehari book: The function: F(z) = z + ((eps*z)/(2*PI))*Integral from 0 to 2*PI of ((exp(i*theta) + z)/(exp(i*theta) - z))*p(theta)d(theta) maps abs(z) invalid input: '<' 1 onto the nearly circular domain whose boundary has the polar equation r = 1 + eps*p(theta), where p(theta) is bounded and piecewise continuous and eps is a small positive parameter. The Nehari article further assumes: p(theta) > 0. Multiply both the numerator and the denominator of the integral by (exp(i*theta) - z)* = (exp(-i*theta) - z*) to create a real denominator denom = 1 - 2xcos(theta) - 2ysin(theta) + x**2 + y**2 The real part of the integral equals: Integral from 0 to 2*PI of ((1 - x**2 - y**2)/denom)p(theta)d(theta) The imaginary part of the integral equals: Integral from 0 to 2*PI of ((-2xsin(theta) + 2ycos(theta))/denom)p(theta)d(theta) 0 to 2*PI direction would be counterclockwise. Suppose curve is clockwise, then the theta increments are negative. So both a counterclockwise integral and the negative of the clockwise integral are realized by taking the absolute value of the theta angle increment.

  • Constructor Details

    • AlgorithmNearlyCircleToCircle

      public AlgorithmNearlyCircleToCircle()
      AlgorithmNearlyCircleToCircle - default constructor.
    • AlgorithmNearlyCircleToCircle

      public AlgorithmNearlyCircleToCircle(ModelImage destImg, ModelImage srcImg)
      AlgorithmNearlyCircleToCircle.
      Parameters:
      destImg - DOCUMENT ME!
      srcImg - DOCUMENT ME!
  • Method Details

    • finalize

      public void finalize()
      finalize -
      Overrides:
      finalize in class AlgorithmBase
    • runAlgorithm

      public void runAlgorithm()
      Starts the program.
      Specified by:
      runAlgorithm in class AlgorithmBase
    • zmlt

      private void zmlt(double ar, double ai, double br, double bi, double[] cr, double[] ci)
      complex multiply c = a * b.
      Parameters:
      ar - double
      ai - double
      br - double
      bi - double
      cr - double[]
      ci - double[]
    • selfTest

      private void selfTest()