JavaView® v2.12

jvx.numeric
Class PnLIC

java.lang.Object
  |
  +--jvx.numeric.PnLIC

public class PnLIC
extends java.lang.Object

Line Integral Convolution for vector field visualization.

After constructing an instance of this class you can imediately get the resulting LIC texture size by methods getTextureWidth() and getTextureHeight().

Version:
08.07.01, 1.20 revised (ep) Optimized getPixels, and computation by using floats and no variable declarations in loops.
16.01.01, 1.10 revised (ep) Triangle packing optimized.
09.03.00, 1.06 revised (ep) bug-fixes.
20.02.00, 1.05 revised (ep) corrected "integralh-bug".
04.01.00, 1.04 revised (ep)
22.12.99, 1.03 revised (ep)
11.12.99, 1.02 revised (ep) adaptive kernelwidth

Constructor Summary
PnLIC(PgElementSet geom, int size, double time, PnGeodesicRK rk)
          Creates a new LIC processor for given geometry.
 
Method Summary
 double getCoarseness()
           
 int getConvolutionWidth()
           
 int getMinConvolutionWidth()
           
 int[] getPixArray(int[] pix)
          Puts actual LIC texture line by line with offset 0 and scanwidth 'texturewidth' into given alphaRGB pixel array.
 double getStepSize()
           
 int getTextureHeight()
          Call this to get information about the actual height of the texture image that is used for the LIC image.
 int getTextureWidth()
          Call this to get information about the actual width of the texture image that is used for the LIC image.
 void makeElement(int elemIndex)
          Computes Line Integral Convolution texture along all integral lines that begin in given element.
 void makeLIC()
          Computes LIC texture for all elements of geometry.
 boolean setCoarseness(double coarse)
          Sets the coarseness of noise that is convoluted to create the LIC image.
 boolean setConvolutionWidth(int numPixels)
          Sets normal (one-velocity) convolution width along integral lines.
 boolean setMinConvolutionWidth(int numPixels)
          At every point their is a minimal number of pixels that are convoluted, even if convolutionwidth*(velocity of vector field) is less than this number (minconvolutionwidth).
 void setStepSize(double h)
          Sets the stepsize of the runge-kutta integration method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PnLIC

public PnLIC(PgElementSet geom,
             int size,
             double time,
             PnGeodesicRK rk)
Creates a new LIC processor for given geometry. The vector field that shall be visualized is implicitely given by the geodesic runge kutta class.
Parameters:
geom - underlying geometry
size - width in pixels of longest edge of the geometry
time - not yet implemented
rk - geodesic runge-kutta method that contains the vector field that shall be visualized
See Also:
PnGeodesicRK
Method Detail

getTextureWidth

public int getTextureWidth()
Call this to get information about the actual width of the texture image that is used for the LIC image.
Returns:
width of the texture image in pixels

getTextureHeight

public int getTextureHeight()
Call this to get information about the actual height of the texture image that is used for the LIC image.
Returns:
height of the texture image in pixels

setCoarseness

public boolean setCoarseness(double coarse)
Sets the coarseness of noise that is convoluted to create the LIC image.
Parameters:
coarse - 0 = fine; 1 = constant

getCoarseness

public double getCoarseness()

setConvolutionWidth

public boolean setConvolutionWidth(int numPixels)
Sets normal (one-velocity) convolution width along integral lines.
Parameters:
numPixels - new width given in texture pixels

getConvolutionWidth

public int getConvolutionWidth()

setMinConvolutionWidth

public boolean setMinConvolutionWidth(int numPixels)
At every point their is a minimal number of pixels that are convoluted, even if convolutionwidth*(velocity of vector field) is less than this number (minconvolutionwidth). Of course this number may be zero. minconvolutionwidth may not be less than convolutionwidth.

getMinConvolutionWidth

public int getMinConvolutionWidth()

setStepSize

public void setStepSize(double h)
Sets the stepsize of the runge-kutta integration method.
Parameters:
h - stepsize

getStepSize

public double getStepSize()

makeElement

public void makeElement(int elemIndex)
Computes Line Integral Convolution texture along all integral lines that begin in given element. These integral lines may leave the element.
Parameters:
elemIndex - global element index in underlying geometry

getPixArray

public int[] getPixArray(int[] pix)
Puts actual LIC texture line by line with offset 0 and scanwidth 'texturewidth' into given alphaRGB pixel array. It also performs a histogram transformation (boosting the contrast of image), so you should avoid calling this method if the LIC texture did not change since last call. The given integer array should be of sufficient size width*height, see getTextureWidth() and getTextureHeight(), or may be null. If parameter is null then a new integer array of the correct size is returned.
Parameters:
pix - output: actual LIC texture; should be of size texturewidth*textureheight
Returns:
the same as in parameter pix, or a new integer array that contains the results if pix is null
See Also:
getTextureWidth(), getTextureHeight()

makeLIC

public void makeLIC()
Computes LIC texture for all elements of geometry. Method getPixArray(int[]) returns the texture image.
See Also:
getPixArray(int[])

JavaView® v2.12

The software JavaView® is copyright protected. All Rights Reserved.