|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjvx.numeric.PnLIC
Line Integral Convolution for vector field visualization.
After constructing an instance of this class one can imediately
get the resulting LIC texture size by methods getTextureWidth()
and getTextureHeight().
| Constructor Summary | |
PnLIC(PgElementSet geom)
Creates a new LIC processor for given geometry. |
|
PnLIC(PgElementSet geom,
int size,
double time,
PnGeodesicRK rk)
Creates a new LIC processor for given geometry. |
|
| Method Summary | |
double |
getCoarseness()
|
int |
getConvolutionWidth()
Deprecated. Use getWorldConvolutionWidth(). |
int |
getMinConvolutionWidth()
|
static int |
getOutline(PdVector[] elemTex,
int width,
int height,
PiVector xc,
PiVector yc)
Deprecated. use jv.objectGui.PsScanline#makeScanlines(int,..) instead.
This method has serious problems with triangles that have horizontal edges. |
int[] |
getPixArray(int[] pix)
|
int[] |
getPixArray(int[] pix,
double contrast)
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. |
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. |
static double[] |
makeElementTextureCoords(PgElementSet geom,
int maxwidth)
Calculates element texture coordinates for triangulation. |
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()
|
boolean |
setCoarseness(double coarse)
Sets the coarseness of noise that is convoluted to create the LIC image. |
boolean |
setConvolutionWidth(int numPixels)
Deprecated. Use setWorldConvolutionWidth(double). |
static void |
setEnabledKeepTransparency(boolean flag)
|
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 |
public PnLIC(PgElementSet geom,
int size,
double time,
PnGeodesicRK rk)
geom - underlying geometrysize - width in pixels of longest edge of the geometrytime - not yet implementedrk - geodesic runge-kutta method with vector field.PnGeodesicRKpublic PnLIC(PgElementSet geom)
geom - underlying geometry| Method Detail |
public void setSize(int size)
size - width in pixels of longest edge of the geometry.public void setRungeKutta(PnGeodesicRK rk)
rk - geodesic runge-kutta method that contains the vector field that shall be visualizedPnGeodesicRKpublic int getTextureWidth()
public int getTextureHeight()
public boolean setCoarseness(double coarse)
coarse - 0 = fine; 1 = constantpublic double getCoarseness()
public boolean setConvolutionWidth(int numPixels)
setWorldConvolutionWidth(double).
getWorldConvolutionWidth() after makeElement(int)
or makeLIC() is called. If worldConvolutionWidth has a value > 0, then
the value of convolutionWidth is ignored!
numPixels - new width given in texture pixelspublic int getConvolutionWidth()
getWorldConvolutionWidth().
getWorldConvolutionWidth() after makeElement(int)
or makeLIC() is called. If worldConvolutionWidth has a value > 0, then
the value of convolutionWidth is ignored!
public boolean setWorldConvolutionWidth(double width)
getConvolutionWidth() after makeElement(int)
or makeLIC() is called. If worldConvolutionWidth has a value > 0, then
the value of convolutionWidth is ignored!
width - new width given in world coordinate length
public double getWorldConvolutionWidth()
getConvolutionWidth() after makeElement(int)
or makeLIC() is called. If worldConvolutionWidth has a value > 0, then
the value of convolutionWidth is ignored!
public boolean setMinConvolutionWidth(int numPixels)
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.
public int getMinConvolutionWidth()
public void setStepSize(double h)
h - stepsizepublic double getStepSize()
public void makeElement(int elemIndex)
elemIndex - global element index in underlying geometrypublic int[] getPixArray(int[] pix)
getPixArray(int[], double)
public int[] getPixArray(int[] pix,
double contrast)
getTextureWidth() and getTextureHeight(), or may be null. If parameter is null
then a new integer array of the correct size is returned.
pix - output: actual LIC texture; should be of size texturewidth*textureheight
pix, or a new integer array
that contains the results if pix is nullgetTextureWidth(),
getTextureHeight()public void makeLIC()
getPixArray(int[]) returns the texture image.
You need to call setSize before.
getPixArray(int[]),
getPixArray(int[],double)public void reset()
public void makeFastLIC()
setSize(int) before.
public void makeFastElement(int elem,
PdVector[] texvector,
PdBaryDir[] baryvector,
double[] veclen,
PdVector[] pixTexCoord,
boolean[] computedVec,
boolean[] computedCoord)
setSize(int) before.
public static double[] makeElementTextureCoords(PgElementSet geom,
int maxwidth)
geom - triangulationmaxwidth - the length that the longest edge
public static int getOutline(PdVector[] elemTex,
int width,
int height,
PiVector xc,
PiVector yc)
jv.objectGui.PsScanline#makeScanlines(int,..) instead.
This method has serious problems with triangles that have horizontal edges.
elemTex - normalized texture coordinates of trianglewidth - width of the texture image (pixel)height - height of the texture image (pixel)xc - output: x-coordinates of outlineyc - output: y-coordinates of outline
public static void setEnabledKeepTransparency(boolean flag)
|
JavaView© v3.95.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||