|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcore.dflic.FLIC
Fast Line Integral Convolution algorithm. This class performs the Fast Line Integral Convolution algorithm on a given input image and vector field, producing an output image. A number of parameters that affect the execution of FLIC can be modified before the computation. Among these are changing the input image and vector field and the output image, independently changing the mapping between the vector field and both the input and output images, changing the convolution kernel width and sampling step, the maximum length to follow any particular streamline, the minimum and maximum sampling coverage of each output pixel, and an iterator specifying the order in which samples should be chosen. Most of these parameters have default values that will result in a good rendition of the LIC effect.
Field Summary | |
private Streamline |
bstream
|
private boolean |
clear
|
private double[][] |
contrib
|
private int |
contribsize
|
private double |
contribtot
|
private double |
fcurlen
Private temporary variables |
private Vec2Field |
field
|
private double |
fmaxlen
Private temporary variables |
private double |
fstepsize
Private temporary variables |
private Streamline |
fstream
|
private double |
fstreamlen
Private temporary variables |
private Vec2Transform |
ftoi
|
private Vec2Transform |
ftoo
|
private ScalarImage |
input
|
private double |
istreamlen
Private temporary variables |
private Vec2Iterator |
iterator
|
private Vec2Transform |
itoo
|
private double |
maxcoverage
|
private double |
mincoverage
|
private boolean |
normalize
|
private double |
omaxlen
|
private Vec2 |
op
|
private double |
ostepsize
|
private double |
ostreamlen
|
private Vec2Transform |
otof
|
private AccumImage |
output
|
private Vec2 |
p
|
private double[] |
sample
|
private int |
sampleoffset
|
private Vec2[] |
samplev
|
private java.util.Vector |
singularities
|
Constructor Summary | |
FLIC(ScalarImage input,
AccumImage output,
Vec2Field field,
Vec2Transform ftoi,
Vec2Transform ftoo)
Constructs an instance of a FLIC with the given initial parameters. |
Method Summary | |
void |
AddSingularity(Vec2 v)
Adds a singularity, where streamlines are always terminated. |
private static int |
ceil(double x)
|
void |
ClearSingularities()
Clears the list of singularities. |
void |
Compute()
Executes the FLIC algorithm, filtering the input image using the given vector field to produce an output image. |
private void |
ComputeStream(Vec2 p0)
Performs a FLIC (or LIC) streamline computation with the seed point "p0". |
private void |
ContribAccum(int x,
int y,
double a)
|
private void |
ContribAdd(Vec2 p)
|
private void |
ContribClear(Vec2 p)
|
private void |
ContribDel(Vec2 p)
|
private double |
ContribRescale(double total)
|
private static int |
floor(double x)
|
private void |
InitializeContrib(int size)
|
private static int |
max(int x,
int y)
|
private static int |
min(int x,
int y)
|
private static int |
round(double x)
|
void |
SetClear(boolean clear)
Sets whether or not the output is cleared prior to rendering. |
void |
SetDefaultClear()
By default, the output is cleared before rendering. |
void |
SetDefaultIterator()
Sets the default ordering of streamline seed points, which is a pseudo- random sequence of points. |
void |
SetDefaultIterator(java.util.Random random)
Sets the default ordering of streamline seed points, a pseudo-random sequence of points generated by the random-number generator "random". |
void |
SetDefaultMaxCoverage()
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 |
SetField(Vec2Field field)
Sets the vector field to "field" |
void |
SetFtoITransform(Vec2Transform ftoi)
Sets the vector field-to-input image transformation to "ftoi". |
void |
SetFtoOTransform(Vec2Transform ftoo)
Sets the vector field-to-output image transformation to "ftoo". |
void |
SetInput(ScalarImage input)
Sets the input image to "input" |
void |
SetIterator(Vec2Iterator iterator)
Sets the order in which streamline seed points are chosen to that sequence produced by "iterator". |
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), the length that FLIC will follow a particular streamline to compute successive convolutions. |
void |
SetMinCoverage(double mincoverage)
Sets the minimum coverage of each output pixel. |
void |
SetNormalize(boolean normalize)
Sets whether or not to normalize the output after rendering. |
void |
SetOutput(AccumImage output)
Sets the output image to "output" |
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". |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private ScalarImage input
private AccumImage output
private Vec2Field field
private Vec2Transform ftoo
private Vec2Transform otof
private Vec2Transform ftoi
private Vec2Transform itoo
private double ostreamlen
private double ostepsize
private double omaxlen
private double mincoverage
private double maxcoverage
private Vec2Iterator iterator
private boolean clear
private boolean normalize
private java.util.Vector singularities
private double fstreamlen
private double istreamlen
private double fstepsize
private double fmaxlen
private double fcurlen
private Streamline fstream
private Streamline bstream
private int sampleoffset
private Vec2[] samplev
private double[] sample
private int contribsize
private double[][] contrib
private double contribtot
private Vec2 p
private Vec2 op
Constructor Detail |
public FLIC(ScalarImage input, AccumImage output, Vec2Field field, Vec2Transform ftoi, Vec2Transform ftoo)
Method Detail |
public void SetInput(ScalarImage input)
public void SetOutput(AccumImage output)
public void SetField(Vec2Field field)
public void SetFtoITransform(Vec2Transform ftoi)
public void SetFtoOTransform(Vec2Transform ftoo)
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()
public void SetIterator(Vec2Iterator iterator)
public void SetDefaultIterator()
public void SetDefaultIterator(java.util.Random random)
public void SetNormalize(boolean normalize)
public void SetDefaultNormalize()
public void SetClear(boolean clear)
public void SetDefaultClear()
public void ClearSingularities()
public void AddSingularity(Vec2 v)
public void Compute()
private static int floor(double x)
private static int ceil(double x)
private static int round(double x)
private static int min(int x, int y)
private static int max(int x, int y)
private void ComputeStream(Vec2 p0)
private void InitializeContrib(int size)
private void ContribAccum(int x, int y, double a)
private void ContribAdd(Vec2 p)
private void ContribDel(Vec2 p)
private void ContribClear(Vec2 p)
private double ContribRescale(double total)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |