public class PnLIC
extends java.lang.Object
After constructing an instance of this class one can immediately
get the resulting LIC texture size by methods getTextureWidth()
and getTextureHeight().
| 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.
|
| 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)
Deprecated.
|
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.
|
public PnLIC()
public PnLIC(PgElementSet geom)
geom - underlying geometrypublic PnLIC(PgElementSet geom, int size, PnGeodesicRK rk)
geom - underlying geometrysize - width in pixels of longest edge of the geometryrk - geodesic Runge-Kutta method with vector field.PnGeodesicRKpublic void setGeometry(PgElementSet geom)
geom - Geometry on which we operate.public void setSize(int size)
size - length 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 lengthpublic 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*textureheightpix, 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."