jvx.vector

## Class PwLIC

- java.lang.Object
- - jv.object.PsObject
  - - jvx.project.PjWorkshop
    - - jvx.vector.PwLIC

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

      public class PwLIC
      extends PjWorkshop
      implements java.lang.Runnable

  Make Line Integral Convolution texture image to given vector field in a JavaView workshop. Uses the methods provided by class `jvx.numeric.PnLIC`.
  All computation is done in a separate thread. If you register as an update listener to this object, then you will receive an update whenever a LIC computation has been ended.

  Using this class:
  Tell it about the geometry with a vector field: `setGeometry(PgGeometry)`.
  Select a vector field: `setVectorFieldIndex(int)`.
  Configure LIC: `setConvolutionWidth(int)`, `setLICSize(int)`,`setFast(boolean)`, ...
  Compute LIC: `startLIC()`.

  When you want to get rid of an instance of this workshop you should call the `close()` method to clean up things.

  See Also:
    `PnLIC`, Serialized Form

- - ### 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
    `PwLIC()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Call this method to shutdown the workshop.
    `void` | `computeTextureSize()` Called from info panel.
    `double` | `getCoarseness()`
    `double` | `getContrast()`
    `int` | `getConvolutionWidth()`
    `boolean` | `getFast()` Get flag if 4th-order Runge-Kutta or Euler integration is used.
    `boolean` | `getIgnoreDirection()` Get flag is workshop makes LIC texture visible after every element.
    `int` | `getLICSize()`
    `int` | `getMinConvolutionWidth()`
    `PnLIC` | `getNumericLICInstance()` HACK:
    `boolean` | `getSendManyUpdates()`
    `double` | `getStepSize()`
    `java.awt.Dimension` | `getTextureSize()`
    `int` | `getVectorFieldIndex()` Get index of selected vector field.
    `void` | `init()` Resets all properties to default values.
    `boolean` | `isComputingLIC()` Checks whether workshop is currently working on a LIC texture.
    `void` | `run()`
    `void` | `setConvolutionWidth(int convWidth)` Sets the number of pixels that are convoluted in a neighbourhood of a pixel to compute the new value of that pixel.
    `void` | `setFast(boolean flag)` Set flag which determines if 4th-order Runge-Kutta or Euler integration will be used for integration along vector field.
    `void` | `setGeometry(PgGeometry geom)` Sets the triangulation.
    `void` | `setIgnoreDirection(boolean flag)` Ignores the direction of vertex based vector fields, i.e.
    `void` | `setLICSize(int aSize)` Sets the size that the longest edge of the triangulation will have in the texture image (in pixels).
    `void` | `setMinConvolutionWidth(int minconvwidth)` Sets the least number of pixels that are convoluted in a neighbourhood of a pixel to compute the new value of that pixel, even if the velocity of the vector field is zero (or very very small).
    `void` | `setSendManyUpdates(boolean flag)` Set flag is workshop makes LIC texture visible after every element.
    `void` | `setVectorFieldIndex(int vfIndex)` Set the vector field that will be visualized by index in the element set as set by `setGeometry(PgGeometry)`, beginning with index 0.
    `void` | `startLIC()` Starts a new thread that computes the LIC texture.
    `void` | `startLIC(boolean bPreview)` Starts a new thread that computes the LIC texture.
    `void` | `stopLIC()` Stops the LIC thread if it is currently running.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

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

      `cancel, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, reset, setDisplay, setDisplays, 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

    - #### PwLIC

          public PwLIC()

  - ### Method Detail

    - #### init

          public void init()

      Resets all properties to default values.
      Overrides:
        `init` in class `PjWorkshop`

    - #### setGeometry

          public void setGeometry(PgGeometry geom)

      Sets the triangulation. It must be a triangulation and should have at least one vector field (but that last point is not necessary; you may add vector fields later and send an update).
      The workshop adds himself as an update listener to the geometry. A call of close will remove this connection.

      Geometry is triangulated if it is no triangulation.

      Specified by:
        `setGeometry` in interface `PjWorkshopIf`
      Overrides:
        `setGeometry` in class `PjWorkshop`
      Parameters:
        `geom` - may be `null` to indicate that the geometry shall be removed from this workshop

    - #### getVectorFieldIndex

          public int getVectorFieldIndex()

      Get index of selected vector field.
      Returns:
        -1 if no vector field has been set

    - #### setVectorFieldIndex

          public void setVectorFieldIndex(int vfIndex)

      Set the vector field that will be visualized by index in the element set as set by `setGeometry(PgGeometry)`, beginning with index 0.
      Parameters:
        `vfIndex` - index of vector field that shall be visualized 0,...
      See Also:
        `setGeometry(PgGeometry)`

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

    - #### computeTextureSize

          public void computeTextureSize()

      Called from info panel.

    - #### setFast

          public void setFast(boolean flag)

      Set flag which determines if 4th-order Runge-Kutta or Euler integration will be used for integration along vector field.
      Parameters:
        `flag` - true: euler; false: 4th order r.-k.

    - #### getFast

          public boolean getFast()

      Get flag if 4th-order Runge-Kutta or Euler integration is used.

    - #### setIgnoreDirection

          public void setIgnoreDirection(boolean flag)

      Ignores the direction of vertex based vector fields, i.e. at each point there are two possible vectors: + and - the original vector.
      Since:
        JavaView 2.48.007

    - #### getIgnoreDirection

          public boolean getIgnoreDirection()

      Get flag is workshop makes LIC texture visible after every element.
      Since:
        JavaView 2.48.007

    - #### setSendManyUpdates

          public void setSendManyUpdates(boolean flag)

      Set flag is workshop makes LIC texture visible after every element.
      Since:
        JavaView 2.49.004

    - #### getSendManyUpdates

          public boolean getSendManyUpdates()

      Since:
        JavaView 2.49.004

    - #### setConvolutionWidth

          public void setConvolutionWidth(int convWidth)

      Sets the number of pixels that are convoluted in a neighbourhood of a pixel to compute the new value of that pixel. This number is multiplied with the velocity of the vector field at that point to get the actual convolution window.

    - #### getConvolutionWidth

          public int getConvolutionWidth()

    - #### getCoarseness

          public double getCoarseness()

      Since:
        JavaView 2.65.000

    - #### getStepSize

          public double getStepSize()

      Since:
        JavaView 2.65.000

    - #### setMinConvolutionWidth

          public void setMinConvolutionWidth(int minconvwidth)

      Sets the least number of pixels that are convoluted in a neighbourhood of a pixel to compute the new value of that pixel, even if the velocity of the vector field is zero (or very very small). This least number of pixel may be 0 of course!

    - #### getMinConvolutionWidth

          public int getMinConvolutionWidth()

    - #### getContrast

          public double getContrast()

      Since:
        JavaView 2.65.000

    - #### setLICSize

          public void setLICSize(int aSize)

      Sets the size that the longest edge of the triangulation will have in the texture image (in pixels). You MUST set geometry to a valid triangulation before calling this method or you'll get a NullPointerException!
      See Also:
        `setGeometry(PgGeometry)`

    - #### getLICSize

          public int getLICSize()

    - #### getTextureSize

          public java.awt.Dimension getTextureSize()

    - #### getNumericLICInstance

          public PnLIC getNumericLICInstance()

      HACK:

    - #### isComputingLIC

          public boolean isComputingLIC()

      Checks whether workshop is currently working on a LIC texture.
      Returns:
        true if the LIC thread is running at the moment
      See Also:
        `startLIC()`, `stopLIC()`

    - #### startLIC

          public void startLIC()

      Starts a new thread that computes the LIC texture.
      See Also:
        `isComputingLIC()`, `stopLIC()`

    - #### startLIC

          public void startLIC(boolean bPreview)

      Starts a new thread that computes the LIC texture.
      See Also:
        `isComputingLIC()`, `stopLIC()`

    - #### stopLIC

          public void stopLIC()

      Stops the LIC thread if it is currently running.
      See Also:
        `isComputingLIC()`, `startLIC()`

    - #### close

          public void close()

      Call this method to shutdown the workshop. Removes the workshop from the list of update listeners of the geometry and stops any LIC processes that are currently working.
      Overrides:
        `close` in class `PjWorkshop`

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

"

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