Class AlgorithmEllipseToRectangle

java.lang.Object
java.lang.Thread
gov.nih.mipav.model.algorithms.AlgorithmBase
gov.nih.mipav.model.algorithms.AlgorithmEllipseToRectangle
All Implemented Interfaces:
ActionListener, WindowListener, Runnable, 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 invalid input: '<' Re |z| invalid input: '<' pi/2, -c invalid input: '<' Im |z| invalid input: '<' 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 invalid input: '<'= w invalid input: '<'= -1, 1 invalid input: '<'= w invalid input: '<'= 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 Details

    • xDimDest

      private int xDimDest
    • resultImage

      private ModelImage resultImage
  • Constructor Details

    • AlgorithmEllipseToRectangle

      public AlgorithmEllipseToRectangle()
      AlgorithmEllipseToRectangle - default constructor.
    • AlgorithmEllipseToRectangle

      public AlgorithmEllipseToRectangle(ModelImage srcImg, int xDimDest)
      AlgorithmEllipseToRectangle.
      Parameters:
      srcImg - DOCUMENT ME!
      xDimDest -
  • 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
    • getResultImage

      public ModelImage getResultImage()
    • selfTest

      private void selfTest()