|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.dflic.DFLIC
Dynamic Fast Line Integral Convolution algorithm. This class performs the Dynamic Line Integral Convolution algorithm with the FLIC performance enhancement (the F stands for fast LIC). It takes in two time-varying vector fields and produces an output image, with a given mapping between the fields and the image. Additionally, most of the parameters that can be set for the FLIC algorithm can also be specified here: the convolution kernel width, the sample spacing, the maximum streamline length, the minimum and "maximum" output pixel coverage. A DFLIC object is created once for an entire animation sequence. For each frame, Compute() is called in order to generate a FLIC image for the current frame based on the vector field "field". Next, Evolve() is called to update the object for the given time step using the vector field "dfield". This can be repeated as long as necessary. Note that the input samples are created so that their intensities have a uniform distribution over [-1, 1]. The output image will share the same statistics, with an average of 0 and a standard of deviation of Sqrt(1/12).
Nested Class Summary | |
private class |
DFLIC.ElementIterator
|
Field Summary | |
private double[] |
defaultkernel
Sets the default kernel. |
private Vec2Field |
dfield
privately stores the state of the DFLIC object from frame-to-frame. |
private float[] |
elc
|
private int[] |
elcurrent
|
private int |
elempty
|
private int |
eliter
|
private int |
eliterlast
|
private int |
elmax
|
private int[] |
elnew
|
private int[] |
elnext
|
private Vec2 |
elp
|
private int[] |
eltemp
|
private float[] |
elx
|
private float[] |
ely
|
private Vec2Field |
field
privately stores the state of the DFLIC object from frame-to-frame. |
private FLIC |
flic
|
private Vec2Transform |
ftoi
|
private Vec2Transform |
ftoo
|
private AccumImage |
input
|
private double[] |
inputfilterkernel
|
private int |
inputfilterrepeat
|
private Vec2Transform |
itof
|
private double |
maxcoverage
|
private double |
mincoverage
|
private double |
omaxlen
|
private double |
ostepsize
|
private double |
ostreamlen
|
private Vec2Transform |
otof
|
private AccumImage |
output
|
private java.util.Random |
random
|
Constructor Summary | |
DFLIC(Vec2Field field,
Vec2Field dfield,
AccumImage output,
Vec2Transform ftoo)
DFLIC constructs a new DFLIC object with the given initial parameters. |
Method Summary | |
void |
AddSingularity(Vec2 v)
Adds a singularity. |
private int |
ceil(double x)
|
void |
ClearSingularities()
Clears the list of singularities. |
void |
Compute()
Computes the next FLIC image in the animation sequence using "field". |
private int |
ElementAdd(double x,
double y,
double c)
|
private void |
ElementIterDelete()
|
private void |
ElementIterInit()
|
private int |
ElementIterNext()
|
private void |
ElementMerge()
|
void |
Evolve(double dt)
Evolves the DFLIC state by a time step "dt". |
void |
Evolve(double dt,
double maxStep)
Evolves the DFLIC state by a time step "dt". |
private void |
InitializeElements()
|
private void |
InitializeElements(int max)
|
private void |
InitializeInput()
|
void |
InitializeRandom()
Initializes the random-number generator with a randomly-seeded Random object |
private int |
round(double x)
|
void |
SetDefaultInputFilterKernel()
Sets the default input filter kernel. |
void |
SetDefaultInputFilterRepeat()
By default disables the input filtering. |
void |
SetDefaultMaxCoverage(double maxcoverage)
Sets the default "maximum" coverage of each output pixel, which is 3.0. |
void |
SetDefaultMaxlen()
Sets the default maximum streamline length, which is four times the width of the convolution kernel. |
void |
SetDefaultMinCoverage()
Sets the default minimum coverage for output pixels, which is 1.0. |
void |
SetDefaultNormalize()
By default, the output is normalized after rendering. |
void |
SetDefaultStepSize()
Sets the convolution and streamline step size to the default value, which is one-half of an output pixel. |
void |
SetDefaultStreamLen()
Sets the default convolution kernel width, which is one-eighth of the maximum distance in the output image. |
void |
SetDField(Vec2Field dfield)
Sets the motion of the field line points to "dfield" |
void |
SetField(Vec2Field field)
Sets the field we would like to visualize to "field" |
void |
SetFtoOTransform(Vec2Transform ftoo)
Sets the mapping from the vector fields to the output image to "ftoo", and adjusts the inverse mapping accordingly. |
void |
SetInputFilterKernel(double[] kernel)
Sets the input filter 3x3 kernel. |
void |
SetInputFilterRepeat(int repeat)
Sets the number of times the input filtering is repeated. |
void |
SetMaxCoverage(double maxcoverage)
Sets the "maximum" coverage of each output pixel. |
void |
SetMaxLen(double omaxlen)
Sets the maximum streamline length (in output image units). |
void |
SetMinCoverage(double mincoverage)
Sets the minimum coverage of each output pixel. |
void |
SetNormalize(boolean normalize)
Sets whether or not the output is normalized after rendering. |
void |
SetOtoFTransform(Vec2Transform otof)
Sets the mapping from the output image to the vector field to "otof", and adjusts the inverse mapping accordingly. |
void |
SetOutput(AccumImage output)
Sets the target output image to "output" |
void |
SetRandom(java.util.Random random)
Sets the pseudo-random number generator to "random". |
void |
SetStepSize(double ostepsize)
Sets the convolution and streamline step size (in output image units) to "ostepsize". |
void |
SetStreamLen(double ostreamlen)
Sets the convolution kernel width (in output image units) to "ostreamlen". |
private int |
sqr(int x)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private Vec2Field field
private Vec2Field dfield
private AccumImage input
private AccumImage output
private Vec2Transform ftoo
private Vec2Transform otof
private Vec2Transform ftoi
private Vec2Transform itof
private double ostreamlen
private double ostepsize
private double omaxlen
private double mincoverage
private double maxcoverage
private double[] inputfilterkernel
private int inputfilterrepeat
private java.util.Random random
private FLIC flic
private double[] defaultkernel
private int elmax
private int elempty
private float[] elx
private float[] ely
private float[] elc
private int[] elnext
private int[] eltemp
private int eliter
private int eliterlast
private Vec2 elp
private int[] elcurrent
private int[] elnew
Constructor Detail |
public DFLIC(Vec2Field field, Vec2Field dfield, AccumImage output, Vec2Transform ftoo)
Method Detail |
public void SetField(Vec2Field field)
public void SetDField(Vec2Field dfield)
public void SetOutput(AccumImage output)
public void SetFtoOTransform(Vec2Transform ftoo)
public void SetOtoFTransform(Vec2Transform otof)
public void SetStreamLen(double ostreamlen)
public void SetDefaultStreamLen()
public void SetStepSize(double ostepsize)
public void SetDefaultStepSize()
public void SetMaxLen(double omaxlen)
public void SetDefaultMaxlen()
public void SetMinCoverage(double mincoverage)
public void SetDefaultMinCoverage()
public void SetMaxCoverage(double maxcoverage)
public void SetDefaultMaxCoverage(double maxcoverage)
public void SetInputFilterKernel(double[] kernel)
public void SetDefaultInputFilterKernel()
public void SetInputFilterRepeat(int repeat)
public void SetDefaultInputFilterRepeat()
public void SetNormalize(boolean normalize)
public void SetDefaultNormalize()
public void ClearSingularities()
public void AddSingularity(Vec2 v)
public void SetRandom(java.util.Random random)
public void InitializeRandom()
public void Compute()
public void Evolve(double dt, double maxStep)
public void Evolve(double dt)
private int sqr(int x)
private int ceil(double x)
private int round(double x)
private void InitializeInput()
private void InitializeElements()
private void InitializeElements(int max)
private void ElementIterInit()
private int ElementIterNext()
private void ElementIterDelete()
private int ElementAdd(double x, double y, double c)
private void ElementMerge()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |