|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Snake2D
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. |
java.awt.geom.Point2D.Double |
getCentroid()
Returns a point with the position of the center of gravity of the scales. |
java.awt.geom.Point2D.Double |
getCentroidRefinement()
Returns a point with the position of the center of gravity of the scales. |
java.awt.geom.Point2D.Double[] |
getEnergyGradient()
The purpose of this method is to compute the gradient of the snake energy with respect to the snake-defining nodes. |
int |
getFilterSize()
|
int |
getIndexRefinement()
|
Snake2DNode[] |
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 |
getRefinementFactor()
|
Snake2DScale[] |
getScales()
The purpose of this method is to determine what to draw on screen, given the current configuration of nodes. |
int |
getSizeRefinementCoef()
|
Snake2DNode[] |
getSubdivisionPoints()
This method provides an accessor to the snake subdivision points. |
void |
initialize(boolean initShape)
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. |
boolean |
isLocalRefinement()
|
boolean |
isLocalRefinementAction()
|
void |
localRefinementCoef(int index)
This method compute the new coef of the local refinement |
void |
reviveSnake()
Sets to true the status of the snake. |
void |
saveToXML(org.w3c.dom.Element node)
Saves the execution parameters of the snake to an XML node. |
void |
setIndexRefinement(int index)
|
void |
setNodes(Snake2DNode[] 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.
java.awt.geom.Point2D.Double[] 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 Snake2DKeeper
will attempt to estimate the
gradient by a finite-difference approach.
Snake2DNode[] getNodes()
isAlive()
returns
true
or false
.
int getNumNodes()
getNodes
.
Snake2DScale[] getScales()
Snake2DScale
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.
java.awt.geom.Point2D.Double getCentroid()
java.awt.geom.Point2D.Double getCentroidRefinement()
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
.
boolean isLocalRefinement()
boolean isLocalRefinementAction()
int getRefinementFactor()
int getIndexRefinement()
int getFilterSize()
void setIndexRefinement(int index)
void localRefinementCoef(int index)
void reviveSnake()
true
the status of the snake.
void setNodes(Snake2DNode[] node)
boolean isInitialized()
true
if the snake has been initialized.
void saveToXML(org.w3c.dom.Element node)
void initialize(boolean initShape)
Snake2DNode[] getSubdivisionPoints()
int getSizeRefinementCoef()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |