jvx.imageDisplay

## Class PiImageSource

- java.lang.Object
- - jv.object.PsObject
  - - jvx.imageDisplay.PiImageSource

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsUpdateIf

      public abstract class PiImageSource
      extends PsObject

  Abstract class for images computed from a function over the xy-plane. The image should be considered as lying above a rectangular region of the xy-plane. The pixel images are assigned by subclasses based on the function values.
  See Also:
    Serialized Form
  Author:
    Konrad Polthier
  Version:
    09.06.13, 1.50 revised (kp) Code completed.
    24.03.11, 1.00 created (kp)

- - ### Field Summary

    - ### Fields inherited from class jv.object.PsObject

      `HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PiImageSource()` Constructor.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `compute()` Compute an image in the complex plane and update the corresponding images.
    `void` | `computeColors()` Compute colors based on a previously computed function values.
    `java.awt.Image` | `createImage(java.awt.Component comp, int width, int height)` Set size of image and, if changed, create an new image.
    `int` | `getBlockSize()` Get block size of image which determines a square block of equally rendered pixels.
    `PdVector` | `getDomainBounds()` Set the domain of the image in the Euclidean plane.
    `PdVector` | `getDomainPosition(java.awt.Point loc)` Converts a point (u,v) in the complex plane to its position in the image.
    `java.awt.Image` | `getImage()` Get image of this object, will automatically be updated whenever computeColors() is called.
    `int` | `getImagePosition(double u, double v)` Converts a point (u,v) in the plane to its position in the image.
    `void` | `init()` Initialization.
    `void` | `setBlockSize(int blockSize)` Set block size of image which determines a square block of equally rendered pixels.
    `void` | `setDomainBounds(double[] bounds)` Set the domain of the image in the Euclidean plane.
    `void` | `setDomainBounds(double xMin, double yMin, double xMax, double yMax)` Set the domain of the image in the Euclidean plane.
    `void` | `setDomainBounds(PdVector bounds)` Set the domain of the image in the Euclidean plane.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

    - ### Methods inherited from class jv.object.PsObject

      `addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PiImageSource

          public PiImageSource()

      Constructor.

  - ### Method Detail

    - #### init

          public void init()

      Initialization.
      Overrides:
        `init` in class `PsObject`

    - #### update

          public boolean update(java.lang.Object event)

      Update the class whenever a child has changed. Method is usually invoked from the children.
      Specified by:
        `update` in interface `PsUpdateIf`
      Overrides:
        `update` in class `PsObject`
      Parameters:
        `event` - carries a lot of information
      Returns:
        true if event has been handled, otherwise false
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### getImage

          public java.awt.Image getImage()

      Get image of this object, will automatically be updated whenever computeColors() is called.

    - #### createImage

          public java.awt.Image createImage(java.awt.Component comp,
                                            int width,
                                            int height)

      Set size of image and, if changed, create an new image.

    - #### compute

          public abstract void compute()

      Compute an image in the complex plane and update the corresponding images.

    - #### computeColors

          public void computeColors()

      Compute colors based on a previously computed function values.

    - #### getImagePosition

          public int getImagePosition(double u,
                                      double v)

      Converts a point (u,v) in the plane to its position in the image.
      Parameters:
        `u` - real value of complex position
        `v` - imaginary value of complex position
      Returns:
        index in the pixel array

    - #### getDomainPosition

          public PdVector getDomainPosition(java.awt.Point loc)

      Converts a point (u,v) in the complex plane to its position in the image.
      Parameters:
        `loc` - Integer location in image
      Returns:
        2d double coordinates of location in domain of image.

    - #### getDomainBounds

          public PdVector getDomainBounds()

      Set the domain of the image in the Euclidean plane.

      Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.

    - #### setDomainBounds

          public void setDomainBounds(PdVector bounds)

      Set the domain of the image in the Euclidean plane.

      Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.

    - #### setDomainBounds

          public void setDomainBounds(double[] bounds)

      Set the domain of the image in the Euclidean plane.

      Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.

    - #### setDomainBounds

          public void setDomainBounds(double xMin,
                                      double yMin,
                                      double xMax,
                                      double yMax)

      Set the domain of the image in the Euclidean plane.

      Parameters determine a rectangle in the complex plane in which the Mandelbrot set is computed.

    - #### getBlockSize

          public int getBlockSize()

      Get block size of image which determines a square block of equally rendered pixels. Block size 1 means every pixel is computed (default), which larger values will lead to pixelization effects while speeding up calculations.

    - #### setBlockSize

          public void setBlockSize(int blockSize)

      Set block size of image which determines a square block of equally rendered pixels. Block size 1 means every pixel is computed (default), which larger values will lead to pixelization effects while speeding up calculations.

"

The software JavaView? is copyright protected. All Rights Reserved.
"