|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsnakeprogram.TwoDDeformation
public abstract class TwoDDeformation
This class deforms snakes. You create an instance of this class either a TwoDContourDeformation or a TwoDCurveDevormation and set the relevant parameter, then you can deform the snake. This modifies the X-Y data inplace.
Method Summary | |
---|---|
abstract void |
addSnakePoints(double MAX_SEGMENT_LENGTH)
Modifies the current dataset to interpolate points. |
void |
deformSnake()
|
abstract void |
energyWithGradient(double[] Vx,
double[] Vy)
Modifies Vx,Vy in place to find the forces it uses the image term and the 'stretching' term. |
abstract void |
initializeMatrix()
Initializes the double[][] array according to curve type |
static double[] |
interpolate(double[] p1,
double[] p2,
double t)
Interpolates arrays of values using the above interpolation function |
static double |
interpolate(double x1,
double x2,
double t)
|
static double |
pointDistance(double[] x1,
double[] x2)
|
void |
setAlpha(double alpha)
Set this before using |
void |
setBackInt(double backInt)
This needs to be set |
void |
setBeta(double beta)
Needs to be set |
void |
setForInt(double forInt)
This needs to be set |
void |
setGamma(double gamma)
Needs to be set |
void |
setStretch(double stretch)
No default value needs to be set for TwoDCurveDeformations |
void |
setWeight(double weight)
This needs to be set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void setAlpha(double alpha)
public void setBeta(double beta)
public void setGamma(double gamma)
public void setWeight(double weight)
public void setForInt(double forInt)
public void setBackInt(double backInt)
public void setStretch(double stretch)
public void deformSnake()
public static double pointDistance(double[] x1, double[] x2)
public static double interpolate(double x1, double x2, double t)
public static double[] interpolate(double[] p1, double[] p2, double t)
public abstract void addSnakePoints(double MAX_SEGMENT_LENGTH) throws java.lang.IllegalAccessException
java.lang.IllegalAccessException
public abstract void energyWithGradient(double[] Vx, double[] Vy)
public abstract void initializeMatrix()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |