igeo

## Class IMap

- java.lang.Object
- - igeo.IMap

- Direct Known Subclasses:
    IAddMap, IConstantMap, IDoubleMap, IInvertMap, IMaxMap, IMinMap, IMultiplyMap, IScaleMap, ISubMap, ISubtractMap, ISurfaceDensityMap, ISurfaceDepthMap, IUFlipMap, IULinearMap, IUSineMap, IUStripeShiftMap, IVFlipMap, IVLinearMap, IVSineMap, IVStripeShiftMap

      public class IMap
      extends java.lang.Object

  A base class of map classes to provide mapping function to set values on a 2D map and extract value out of the map. The value contained on the map is double in the range of 0.0 - 1.0.
  Author:
    Satoru Sugihara

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `defaultDensityHeight`
    `static int` | `defaultDensityWidth`
    `static int` | `defaultExportHeight`
    `static int` | `defaultExportWidth`
    `static double` | `densityMinDelta`
    `IDoubleMap` | `uIntegration`
    `IDoubleMap` | `vIntegration`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IMap()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.image.BufferedImage` | `createImage()`
    `java.awt.image.BufferedImage` | `createImage(int imgWidth, int imgHeight)`
    `IMap` | `flipU()` to be defined in sub class
    `IMap` | `flipV()` to be defined in sub class
    `double` | `get(double u, double v)` A main method to get a value of the map.
    `double` | `get(IVec2I v)`
    `IMap` | `initDensityMapU()`
    `IMap` | `initDensityMapU(int width, int height)`
    `IMap` | `initDensityMapV()`
    `IMap` | `initDensityMapV(int width, int height)`
    `IMap` | `matchUDensityWithMap(IMap map, double u, double v)`
    `IMap` | `matchUDensityWithMap(IMap map, double u1, double u2, double v)`
    `IMap` | `matchVDensityWithMap(IMap map, double u, double v)`
    `IMap` | `matchVDensityWithMap(IMap map, double u, double v1, double v2)`
    `IVec2` | `project(double u, double v)`
    `double` | `projectU(double u, double v)`
    `double` | `projectV(double u, double v)`
    `void` | `saveAsJPEG(java.lang.String filePath)`
    `void` | `saveAsJPEG(java.lang.String filePath, int imgWidth, int imgHeight)`
    `void` | `saveAsPNG(java.lang.String filePath)`
    `void` | `saveAsPNG(java.lang.String filePath, int imgWidth, int imgHeight)`
    `IMap` | `scaleDensityMapU(double factor)`
    `IMap` | `scaleDensityMapV(double factor)`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### defaultDensityWidth

          public static int defaultDensityWidth

    - #### defaultDensityHeight

          public static int defaultDensityHeight

    - #### defaultExportWidth

          public static int defaultExportWidth

    - #### defaultExportHeight

          public static int defaultExportHeight

    - #### densityMinDelta

          public static final double densityMinDelta

      See Also:
        Constant Field Values

    - #### uIntegration

          public IDoubleMap uIntegration

    - #### vIntegration

          public IDoubleMap vIntegration

  - ### Constructor Detail

    - #### IMap

          public IMap()

  - ### Method Detail

    - #### get

          public double get(double u,
                            double v)

      A main method to get a value of the map. This method should be overwritten by child classes to have preferable behavior returning value of the map ranging 0.0 - 1.0.
      Parameters:
        `u` - u coordinates ranges 0.0 - 1.0
        `v` - v coordinates ranges 0.0 - 1.0
      Returns:
        value of the map.

    - #### get

          public double get(IVec2I v)

    - #### initDensityMapU

          public IMap initDensityMapU()

    - #### initDensityMapV

          public IMap initDensityMapV()

    - #### initDensityMapU

          public IMap initDensityMapU(int width,
                                      int height)

    - #### initDensityMapV

          public IMap initDensityMapV(int width,
                                      int height)

    - #### scaleDensityMapU

          public IMap scaleDensityMapU(double factor)

    - #### scaleDensityMapV

          public IMap scaleDensityMapV(double factor)

    - #### matchUDensityWithMap

          public IMap matchUDensityWithMap(IMap map,
                                           double u,
                                           double v)

    - #### matchUDensityWithMap

          public IMap matchUDensityWithMap(IMap map,
                                           double u1,
                                           double u2,
                                           double v)

    - #### matchVDensityWithMap

          public IMap matchVDensityWithMap(IMap map,
                                           double u,
                                           double v)

    - #### matchVDensityWithMap

          public IMap matchVDensityWithMap(IMap map,
                                           double u,
                                           double v1,
                                           double v2)

    - #### saveAsJPEG

          public void saveAsJPEG(java.lang.String filePath)

    - #### saveAsJPEG

          public void saveAsJPEG(java.lang.String filePath,
                                 int imgWidth,
                                 int imgHeight)

    - #### saveAsPNG

          public void saveAsPNG(java.lang.String filePath)

    - #### saveAsPNG

          public void saveAsPNG(java.lang.String filePath,
                                int imgWidth,
                                int imgHeight)

    - #### createImage

          public java.awt.image.BufferedImage createImage()

    - #### createImage

          public java.awt.image.BufferedImage createImage(int imgWidth,
                                                          int imgHeight)

    - #### projectU

          public double projectU(double u,
                                 double v)

      Parameters:
        `u` - range 0-1
        `v` - range 0-1

    - #### projectV

          public double projectV(double u,
                                 double v)

      Parameters:
        `u` - range 0-1
        `v` - range 0-1

    - #### project

          public IVec2 project(double u,
                               double v)

      Parameters:
        `u` - range 0-1
        `v` - range 0-1

    - #### flipU

          public IMap flipU()

      to be defined in sub class

    - #### flipV

          public IMap flipV()

      to be defined in sub class