jvx.geom

## Class PwReeb

- java.lang.Object
- - jv.object.PsObject
  - - jvx.project.PjWorkshop
    - - jvx.geom.PwReeb

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

      public class PwReeb
      extends PjWorkshop

  Workshop to compute and work with the Reeb graph of triangulated surfaces. Includes methods to find and visualize irregular vertices of a piecewise linear function on a surface.
  See Also:
    Serialized Form
  Author:
    Klaus Hildebrandt
  Version:
    00.07.02, 1.00 created (kh)

- - ### 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`

    - ### Fields inherited from interface jv.project.PjWorkshopIf

      `MODE_BUG, MODE_STANDARD, MODE_VALIDATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PwReeb()` Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancel()` Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.
    `PgPolygonSet` | `computeReebGraph()` Compute the Reeb graph using the actual function.
    `PdVector` | `getFunction(PdVector scalar)` Get actual function the computation of the Reeb graph will based on.
    `static PiVector` | `getIrregularVerticesOfMorseFunction(PgElementSet geom, PdVector scalar)` Method returns the irregular vertices of geom with respect to the given function scalar.
    `static int` | `getVertexIndicesOfMorseFunction(PgElementSet geom, PdVector scalar, PiVector indices)` Method computes the discrete index of every vertex of a given geometry and a given scalar function.
    `static int` | `getVertexIndicesOfMorseFunction(PgElementSet geom, PiVector scalar, PiVector indices)` Method computes the discrete index of every vertex of a given geometry and a given scalar function.
    `void` | `init()` Method is called after constructors of super classes are called.
    `static PgPolygonSet` | `makeIsocurves(PgElementSet geom, PdVector levels, PgPolygonSet isoCurves, PdVector scalar)` Computes a set of isoCurves of a scalar field on a triangulated surface.
    `void` | `setDijkstraDistanceFunction(PiVector front)` Set the function the computation of the Reeb graph will be based on to be the Dijkstra distance with respect to the vertices given as a parameter.
    `void` | `setFunction(PdVector scalar)` Specify function used to compute the Reeb graph.
    `void` | `setGeometry(PgElementSet geom)` Reeb graph of the given geometry is generated.
    `void` | `setHeightFunction()` Use the height function with regard to the z-coordinate as the function the computation of the Reeb graph will be based on.
    `void` | `setHeightFunction(PdVector dir)` Use the height function with regard to the direction given as argument as the function the computation of the Reeb graph will be based on.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

    - ### Methods inherited from class jvx.project.PjWorkshop

      `close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, reset, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer`

    - ### 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`

    - ### Methods inherited from interface jv.object.PsUpdateIf

      `getFather, getName, setParent`

- - ### Constructor Detail

    - #### PwReeb

          public PwReeb()

      Constructor.

  - ### Method Detail

    - #### init

          public void init()

      Method is called after constructors of super classes are called.
      Overrides:
        `init` in class `PjWorkshop`

    - #### setGeometry

          public void setGeometry(PgElementSet geom)

      Reeb graph of the given geometry is generated. If geometry is not a triangulation, geometry is triangulated. A copy of geometry is cached, the method `cancel()` returns the original geometry.
      Parameters:
        `geom` - Compute Reeb graph of geom.

    - #### cancel

          public void cancel()

      Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.

      If necessary, the duplicate of the original geometry is restored into the geometry.

      Overrides:
        `cancel` in class `PjWorkshop`

    - #### 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 `PjWorkshop`
      Parameters:
        `event` - sender of this update.
      Returns:
        true if update was correctly handled by superclass.
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### getVertexIndicesOfMorseFunction

          public static int getVertexIndicesOfMorseFunction(PgElementSet geom,
                                                            PiVector scalar,
                                                            PiVector indices)

      Method computes the discrete index of every vertex of a given geometry and a given scalar function. If vertices are mapped on the same value by the given scalar function, these vertices are ordered by their indices in vertex array of geom. If a vertex is on the boundary the number of sign changes is doubled.
      Parameters:
        `scalar` - Scalar function on geom as a PdVector, assigning an integer to each vertex.
        `indices` - Method stores the index of each vertex.
      Returns:
        int Number of irregular Vertices.

    - #### getVertexIndicesOfMorseFunction

          public static int getVertexIndicesOfMorseFunction(PgElementSet geom,
                                                            PdVector scalar,
                                                            PiVector indices)

      Method computes the discrete index of every vertex of a given geometry and a given scalar function. If vertices are mapped on the same value by the given scalar function, these vertices are ordered by their indices in vertex array of geom. If a vertex is on the boundary the number of sign changes is doubled.
      Parameters:
        `scalar` - Scalar value at each vertex determines the PL function.
        `indices` - Method stores the index of each vertex.
      Returns:
        number of irregular vertices

    - #### getIrregularVerticesOfMorseFunction

          public static PiVector getIrregularVerticesOfMorseFunction(PgElementSet geom,
                                                                     PdVector scalar)

      Method returns the irregular vertices of geom with respect to the given function scalar. Vertices are ordered by ascending value of scalar.
      Parameters:
        `scalar` - Scalar function on geom as a PdVector, assigning a double to each vertex.
      Returns:
        Irregular vertices of geom with respect to scalar, ordered by ascending value of scalar.

    - #### setHeightFunction

          public void setHeightFunction()

      Use the height function with regard to the z-coordinate as the function the computation of the Reeb graph will be based on.

    - #### setHeightFunction

          public void setHeightFunction(PdVector dir)

      Use the height function with regard to the direction given as argument as the function the computation of the Reeb graph will be based on.
      Parameters:
        `dir` - direction of the height function

    - #### setDijkstraDistanceFunction

          public void setDijkstraDistanceFunction(PiVector front)

      Set the function the computation of the Reeb graph will be based on to be the Dijkstra distance with respect to the vertices given as a parameter.
      Parameters:
        `front` - indices of those vertices that will have Dijstra Distance zero.

    - #### setFunction

          public void setFunction(PdVector scalar)

      Specify function used to compute the Reeb graph. Function is specified by a function value for each vertex. We interpolate in the element.
      Parameters:
        `scalar` - Vector containing the function values of each vertex. The ordering of the values must be the same as the ordering of the vertices.

    - #### getFunction

          public PdVector getFunction(PdVector scalar)

      Get actual function the computation of the Reeb graph will based on. Function is specified by a function value for each vertex and linear interpolation in the elements. The ordering of the values is be the same as the ordering of the vertices.

    - #### computeReebGraph

          public PgPolygonSet computeReebGraph()

      Compute the Reeb graph using the actual function. The Reeb graph is visualized as a polygon set. This polygon set is shown in the display (associated to the workshop) and returned.
      Returns:
        PgPolygonSet Visualization of the Reeb Graph as a polygon set

    - #### makeIsocurves

          public static PgPolygonSet makeIsocurves(PgElementSet geom,
                                                   PdVector levels,
                                                   PgPolygonSet isoCurves,
                                                   PdVector scalar)

      Computes a set of isoCurves of a scalar field on a triangulated surface. The function is given as a PdVector. Each double of the vector is regarded as the function value of the vertex of the surface with the corresponding index. In the interior of elements the function is linearly interpolated. The isoCurves are returned as a list of polygons each consisting of only one edge. The isovalue of each polygon is given as a PdVector. To simplify the polygon set see `PuCleanMesh.identifyVertices(PgGeometry)` and `PwCleanMesh.joinPolygons`.
      Parameters:
        `geom` - Base surface must consist of triangles only.
        `levels` - List of values sorted by increasing value, determines the computed isoCurves.
        `isoCurves` - Isocurves which will be computed.
        `scalar` - Scalar values at each vertex of the base geometry.
      Since:
        JavaView 2.65.000
      Version:
        20.03.03, 1.10 created (ep) Body inherited from original non-static method makeIsocurves. 00.07.02, 1.00 created (kh) Original body of method.

"

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