public class FlySnakeWithLegs
extends java.lang.Object
implements plugins.big.bigsnakeutils.icy.snake2D.Snake2D
| Constructor and Description |
|---|
FlySnakeWithLegs(ImageLUTContainer imageLUTs,
FlySnakeParameters parameters,
java.lang.Object initialContour,
plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] priorNodes,
java.awt.geom.Point2D priorCentroid)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeAnchors()
This method update the position of the anchor nodes
|
double |
energy()
The purpose of this method is to compute the energy of the snake.
|
java.awt.geom.Point2D[] |
getAnchors()
This method provides an accessor to the snake-defining anchors.
|
double |
getArea()
Retrieves the area under the curve determined by the snake.
|
java.awt.Rectangle |
getBounds()
Returns the bounding box of the snake curve.
|
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[] |
getEnergyGradient()
The purpose of this method is to compute the gradient of the snake energy
with respect to the snake-defining nodes.
|
java.awt.geom.Point2D.Double |
getFlyOrientation() |
ImageLUTContainer |
getImageLUTs()
This method return the imageLut
|
plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] |
getNodes()
This method provides an accessor to the snake-defining nodes.
|
int |
getNumNodes()
This method returns the quantity of snake-defining nodes.
|
int |
getNumScales()
Returns the number of scales provided by the method
getScales(). |
FlySnakeOrientation |
getOrientation()
Retrieves the orientation of the curve determined by the snake.
|
plugins.big.bigsnakeutils.icy.snake2D.Snake2DScale[] |
getScales()
The purpose of this method is to determine what to draw on screen, given
the current configuration of nodes.
|
FlySnakeParameters |
getSnakeParameters()
Returns a new container with the information of the execution parameters
of the snake.
|
void |
initialize(boolean initShape) |
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 |
isValid()
Returns
false if the snake reaches an invalid configuration. |
void |
reviveSnake()
Sets the status of the snake to alive, and restores the maximum number
iterations to the original one.
|
void |
saveToXML(org.w3c.dom.Element node)
Saves the snake-defining parameters in an XML file.
|
void |
setNodes(plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] node)
This method provides a mutator to the snake-defining nodes.
|
void |
setSnakeParameters(FlySnakeParameters parameters)
Sets the E-Snake execution parameters.
|
public FlySnakeWithLegs(ImageLUTContainer imageLUTs, FlySnakeParameters parameters, java.lang.Object initialContour, plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] priorNodes, java.awt.geom.Point2D priorCentroid)
public double energy()
isAlive() returns true. It is imperative
that this function be everywhere differentiable with respect to the
snake-defining nodes.energy in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic java.awt.geom.Point2D.Double getCentroid()
getCentroid in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic java.awt.geom.Point2D.Double[] getEnergyGradient()
getEnergyGradient in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] getNodes()
getNodes in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic int getNumNodes()
getNumNodes in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic plugins.big.bigsnakeutils.icy.snake2D.Snake2DScale[] getScales()
getScales in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic void initialize(boolean initShape)
initialize in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic void reviveSnake()
reviveSnake in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic void saveToXML(org.w3c.dom.Element node)
saveToXML in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic void setNodes(plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] node)
setNodes in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic boolean isAlive()
isAlive in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic boolean isInitialized()
true if the snake has been initialized.isInitialized in interface plugins.big.bigsnakeutils.icy.snake2D.Snake2Dpublic java.awt.Rectangle getBounds()
public int getNumScales()
getScales().public double getArea()
public FlySnakeParameters getSnakeParameters()
public FlySnakeOrientation getOrientation()
public void setSnakeParameters(FlySnakeParameters parameters)
public boolean isValid()
false if the snake reaches an invalid configuration.
It can be related to ill-posed configuration of the points or related to
the image boundaries.public ImageLUTContainer getImageLUTs()
public java.awt.geom.Point2D[] getAnchors()
public java.awt.geom.Point2D.Double getFlyOrientation()
public void computeAnchors()