|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Snake3D
This abstract class encapsulates the number-crunching aspect of snakes.
| Method Summary | |
|---|---|
double |
energy()
The purpose of this method is to compute the energy of the snake. |
icy.sequence.Sequence |
getBinaryMask()
Returns a binary image representing the interior of the snake. |
javax.vecmath.Point3d |
getCentroid()
Returns a point with the position of the center of gravity of the scales. |
javax.vecmath.Point3d[] |
getEnergyGradient()
The purpose of this method is to compute the gradient of the snake energy with respect to the snake-defining nodes. |
Snake3DNode[] |
getNodes()
This method provides an accessor to the snake-defining nodes. |
int |
getNumNodes()
This method returns the quantity of snake-defining nodes given by the method getNodes. |
int |
getNumScales()
Returns the number of scales in the array returned by the method getScales(). |
Snake3DScale |
getScale(int i)
Returns the i-th scale of the method getScales(). |
Snake3DScale[] |
getScales()
The purpose of this method is to determine what to draw on screen, given the current configuration of nodes. |
void |
initialize()
Initializes the snake. |
boolean |
isAlive()
The purpose of this method is to monitor the status of the snake. |
boolean |
isInitialized()
Returns true if the snake has been initialized. |
void |
reviveSnake()
Sets to true the status of the snake. |
void |
setNodes(Snake3DNode[] node)
This method provides a mutator to the snake-defining nodes. |
| Method Detail |
|---|
double energy()
isAlive() returns true. It is imperative
that this function be everywhere differentiable with respect to the
snake-defining nodes.
javax.vecmath.Point3d[] getEnergyGradient()
isAlive() returns true. Returns an array
that contains the gradient values associated to each node. They predict
the variation of the energy for a horizontal or vertical displacement of
one pixel. The ordering of the nodes must follow that of
getNodes(). If null is returned, the optimizer
within the class Snake3DKeeper will attempt to estimate the
gradient by a finite-difference approach.
Snake3DNode[] getNodes()
isAlive() returns
true or false.
int getNumNodes()
getNodes.
Snake3DScale[] getScales()
Snake3DScale objects.
Straight lines will be drawn between the apices of each polygon, in the
specified color. It is not necessary to maintain a constant number of
polygons in the array, or a constant number of apices in a given polygon.
Snake3DScale getScale(int i)
getScales().
int getNumScales()
getScales().
javax.vecmath.Point3d getCentroid()
boolean isAlive()
false, which provides an easy way to limit the
number of optimization steps by counting the number of calls to the
method energy(). Returns true if the snake
could be properly initialized, if the skin contain valid data, and if the
energy and its gradient can be computed; else, return false.
void reviveSnake()
true the status of the snake.
void setNodes(Snake3DNode[] node)
void initialize()
boolean isInitialized()
true if the snake has been initialized.
icy.sequence.Sequence getBinaryMask()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||