Documentation of 'jvx.numeric.PnLIC' Java class
PnLIC ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.numeric

Class PnLIC



  • public class PnLIC
    extends java.lang.Object
    Line Integral Convolution for vector field visualization.

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

    Author:
    Eike Preuss
    Version:
    15.04.06, 2.10 revised (kp) Calculation of planar texture coordinates makeElementTextureCoords() moved to PwTexture.
    15.04.06, 2.00 revised (kp) Formatting and removal of long-time deprecated method getOutline() for computing outline of triangle.
    01.03.06, 1.95 revised (ah) Storage of last polygon removed.
    02.07.03, 1.90 revised (ep) Do not do LIC for degenerated elements; pixel array is only allocated when LIC is performed, not when size is set.
    24.06.03, 1.85 revised (kp) Class ScannedData moved to new class jv.objectGui.PsScanline.
    05.02.03, 1.80 revised (ep) Increased vertical gap in texture image.
    21.01.03, 1.70 revised (ep) Better texture filling.
    15.01.03, 1.60 revised (ep) Handling of degenerated elements.
    06.01.03, 1.50 revised (ep) Create nearly square texture images.
    17.12.02, 1.40 revised (ep) Added (optional) contrast parameter to getPixArray and implemented other scanline algorithm (isn't used here yet).
    20.07.02, 1.30 revised (ep) Array length bug removed.
    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".
    11.12.99, 1.02 revised (ep) Adaptive kernel width.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PnLIC()
      Creates a new LIC processor.
      PnLIC(PgElementSet geom)
      Creates a new LIC processor for given geometry.
      PnLIC(PgElementSet geom, int size, PnGeodesicRK rk)
      Creates a new LIC processor for given geometry.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      double getCoarseness() 
      int getConvolutionWidth()
      Deprecated. 
      int getMinConvolutionWidth() 
      int[] getPixArray(int[] pix) 
      int[] getPixArray(int[] pix, double contrast)
      Puts actual LIC texture line by line with offset 0 and scan width '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.
      double getWorldConvolutionWidth()
      Normal (one-velocity) convolution width along integral lines in world coordinates.
      void makeElement(int elemIndex)
      Computes Line Integral Convolution texture along all integral lines that begin in given element.
      void makeFastElement(int elem, PdVector[] texvector, PdBaryDir[] baryvector, double[] veclen, PdVector[] pixTexCoord, boolean[] computedVec, boolean[] computedCoord)
      First try to make LIC *VERY* fast :-), experimental.
      void makeFastLIC()
      First try to make LIC *VERY* fast :-), experimental.
      void makeLIC()
      Computes LIC texture for all elements of geometry.
      void reset()
      Initialize pixel array with zeroes.
      boolean setCoarseness(double coarse)
      Sets the coarseness of noise that is convoluted to create the LIC image.
      boolean setConvolutionWidth(int numPixels)
      void setGeometry(PgElementSet geom)
      Set the size of the LIC texture.
      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 setRungeKutta(PnGeodesicRK rk)
      Sets the vector field for integration and the integration method.
      void setSize(int size)
      Set the size of the LIC texture.
      void setStepSize(double h)
      Sets the stepsize of the runge-kutta integration method.
      boolean setWorldConvolutionWidth(double width)
      Sets normal (one-velocity) convolution width along integral lines in world coordinates.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PnLIC

        public PnLIC()
        Creates a new LIC processor. Later geometry, size and ode solver must be assigned.
        Since:
        JavaView 3.98.005
        Version:
        07.09.07, 1.00 created
      • PnLIC

        public PnLIC(PgElementSet geom)
        Creates a new LIC processor for given geometry.
        Parameters:
        geom - underlying geometry
      • PnLIC

        public PnLIC(PgElementSet geom,
                     int size,
                     PnGeodesicRK rk)
        Creates a new LIC processor for given geometry. The vector field that shall be visualized is implicitly given by the geodesic Runge-Kutta class.
        Parameters:
        geom - underlying geometry
        size - width in pixels of longest edge of the geometry
        rk - geodesic Runge-Kutta method with vector field.
        See Also:
        PnGeodesicRK
        Version:
        03.09.07, 1.10 revised (kp) Obsolete parameter time removed.
    • Method Detail

      • setGeometry

        public void setGeometry(PgElementSet geom)
        Set the size of the LIC texture. Method allocates element texture in geometry based on size parameter.
        Parameters:
        geom - Geometry on which we operate.
        Since:
        JavaView 3.98.005
        Version:
        07.09.07, 1.00 created
      • setSize

        public void setSize(int size)
        Set the size of the LIC texture. Method allocates element texture in geometry based on size parameter.
        Parameters:
        size - length in pixels of longest edge of the geometry.
      • setRungeKutta

        public void setRungeKutta(PnGeodesicRK rk)
        Sets the vector field for integration and the integration method.
        Parameters:
        rk - geodesic runge-kutta method that contains the vector field that shall be visualized
        See Also:
        PnGeodesicRK
      • 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 in pixels. This value is only synchronized with getWorldConvolutionWidth() after makeElement(int) or makeLIC() is called. If worldConvolutionWidth has a value > 0, then the value of convolutionWidth is ignored!
        Parameters:
        numPixels - new width given in texture pixels
      • setWorldConvolutionWidth

        public boolean setWorldConvolutionWidth(double width)
        Sets normal (one-velocity) convolution width along integral lines in world coordinates. This value is only synchronized with getConvolutionWidth() after makeElement(int) or makeLIC() is called. If worldConvolutionWidth has a value > 0, then the value of convolutionWidth is ignored!
        The given length is only used approximately - in fact it is transformed to a number of texture pixels.
        Parameters:
        width - new width given in world coordinate length
        Returns:
        true if worldConvolutionWidth is set, false if convolutionWidth will be used (caused by invalid parameter 'width')
        Since:
        JavaView 2.49.009
      • getWorldConvolutionWidth

        public double getWorldConvolutionWidth()
        Normal (one-velocity) convolution width along integral lines in world coordinates. This value is only synchronized with getConvolutionWidth() after makeElement(int) or makeLIC() is called. If worldConvolutionWidth has a value > 0, then the value of convolutionWidth is ignored!
        The given length is only used approximately - in fact it is transformed to a number of texture pixels.
        Since:
        JavaView 2.49.009
      • 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
        Version:
        09.03.00, 1.10 revised (ep) Handle degenerated triangles.
      • getPixArray

        public int[] getPixArray(int[] pix,
                                 double contrast)
        Puts actual LIC texture line by line with offset 0 and scan width '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
        Since:
        JavaView 2.48.005
        See Also:
        getTextureWidth(), getTextureHeight()
      • reset

        public void reset()
        Initialize pixel array with zeroes.
      • makeFastLIC

        public void makeFastLIC()
        First try to make LIC *VERY* fast :-), experimental. You need to call setSize(int) before.
        Since:
        JavaView 2.65.000
      • makeFastElement

        public void makeFastElement(int elem,
                                    PdVector[] texvector,
                                    PdBaryDir[] baryvector,
                                    double[] veclen,
                                    PdVector[] pixTexCoord,
                                    boolean[] computedVec,
                                    boolean[] computedCoord)
        First try to make LIC *VERY* fast :-), experimental. You need to call setSize(int) before.
        Since:
        JavaView 2.65.000
"JavaView? v5.03.003"

"

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

You see the box below because you did not login.