plugins.big.bigsnake3d.snake
Class SphereSnake

java.lang.Object
  extended by plugins.big.bigsnake3d.snake.SphereSnake
All Implemented Interfaces:
plugins.big.bigsnakeutils.icy.snake3D.Snake3D

public class SphereSnake
extends java.lang.Object
implements plugins.big.bigsnakeutils.icy.snake3D.Snake3D

Three-dimensional exponential spline snake (E-Snake).

Version:
November 15, 2014
Author:
Ricard Delgado-Gonzalo (ricard.delgado@gmail.com), Nicolas Chenouard (nicolas.chenouard@gmail.com)

Constructor Summary
SphereSnake(ImageLUTContainer imageLUTs, SphereSnakeParameters parameters)
          Default constructor.
 
Method Summary
 void dilateX(double a)
           
 void dilateY(double b)
           
 void dilateZ(double c)
           
 double energy()
          The purpose of this method is to compute the energy of the snake.
 double getArea()
          Retrieves the area of the surface of the snake.
 icy.sequence.Sequence getBinaryMask()
          Returns a Sequence object containing a binary image representing the voxels enclosed by the snake surface.
 icy.type.rectangle.Rectangle3D getBounds()
          Returns the bounding box aligned with the axis containing the snake surface.
 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.
 plugins.big.bigsnakeutils.icy.snake3D.Snake3DNode[] getNodes()
          This method provides an accessor to the snake-defining nodes.
 int getNumNodes()
          Returns the number of points that define the snake.
 int getNumScales()
          Returns the number of scales provided by the method getScales().
 vtk.vtkPolyData getQuadMesh()
          Returns a quad mesh representing the snake surface.
 plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale getScale(int i)
          Computes the i-th scale.
 plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale[] getScales()
          The purpose of this method is to determine what to draw on screen, given the current configuration of nodes.
 SphereSnakeParameters getSnakeParameters()
          Returns a new container with the information of the execution parameters of the snake.
 double getVolume()
          Retrieves the volume inside the surface determined by the snake.
 void initialize()
          Initializes the snake class.
 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 rotateX(double gamma)
           
 void rotateY(double beta)
           
 void rotateZ(double alpha)
           
 void setNodes(plugins.big.bigsnakeutils.icy.snake3D.Snake3DNode[] node)
          This method provides a mutator to the snake-defining nodes.
 plugins.big.bigsnakeutils.icy.snake3D.Snake3DNode[] setShape(icy.sequence.Sequence initialPositionMask)
           
 void setSnakeParameters(SphereSnakeParameters parameters)
          Sets the snake execution parameters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphereSnake

public SphereSnake(ImageLUTContainer imageLUTs,
                   SphereSnakeParameters parameters)
Default constructor.

Method Detail

energy

public double energy()
The purpose of this method is to compute the energy of the snake. This energy is usually made of three additive terms: 1) the image energy, which gives the driving force associated to the data; 2) the internal energy, which favors smoothness of the snake; and 3) the constraint energy, which incorporates a priori knowledge. This method is called repeatedly during the optimization of the snake, but only as long as the method isAlive() returns true. It is imperative that this function be everywhere differentiable with respect to the snake-defining nodes.

Specified by:
energy in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

initialize

public void initialize()
Initializes the snake class.

Specified by:
initialize in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

reviveSnake

public void reviveSnake()
Sets the status of the snake to alive, and restores the maximum number iterations to the original one.

Specified by:
reviveSnake in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

setNodes

public void setNodes(plugins.big.bigsnakeutils.icy.snake3D.Snake3DNode[] node)
This method provides a mutator to the snake-defining nodes.

Specified by:
setNodes in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

setSnakeParameters

public void setSnakeParameters(SphereSnakeParameters parameters)
Sets the snake execution parameters.


getEnergyGradient

public 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.

Specified by:
getEnergyGradient in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getNodes

public plugins.big.bigsnakeutils.icy.snake3D.Snake3DNode[] getNodes()
This method provides an accessor to the snake-defining nodes.

Specified by:
getNodes in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getNumNodes

public int getNumNodes()
Returns the number of points that define the snake.

Specified by:
getNumNodes in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getNumScales

public int getNumScales()
Returns the number of scales provided by the method getScales().

Specified by:
getNumScales in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getScale

public plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale getScale(int i)
Computes the i-th scale.

Specified by:
getScale in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getScales

public plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale[] getScales()
The purpose of this method is to determine what to draw on screen, given the current configuration of nodes. Collectively, the array of scales forms the skin of the snake.

Specified by:
getScales in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getArea

public double getArea()
Retrieves the area of the surface of the snake.


getBinaryMask

public icy.sequence.Sequence getBinaryMask()
Returns a Sequence object containing a binary image representing the voxels enclosed by the snake surface.

Specified by:
getBinaryMask in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getBounds

public icy.type.rectangle.Rectangle3D getBounds()
Returns the bounding box aligned with the axis containing the snake surface.


getCentroid

public javax.vecmath.Point3d getCentroid()
Returns a point with the position of the center of gravity of the scales.

Specified by:
getCentroid in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

getSnakeParameters

public SphereSnakeParameters getSnakeParameters()
Returns a new container with the information of the execution parameters of the snake.


getVolume

public double getVolume()
Retrieves the volume inside the surface determined by the snake.


getQuadMesh

public vtk.vtkPolyData getQuadMesh()
Returns a quad mesh representing the snake surface.


isAlive

public boolean isAlive()
The purpose of this method is to monitor the status of the snake.

Specified by:
isAlive in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

isInitialized

public boolean isInitialized()
Returns true if the snake has been initialized.

Specified by:
isInitialized in interface plugins.big.bigsnakeutils.icy.snake3D.Snake3D

isValid

public boolean isValid()
Returns 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.


dilateX

public void dilateX(double a)

dilateY

public void dilateY(double b)

dilateZ

public void dilateZ(double c)

rotateX

public void rotateX(double gamma)

rotateY

public void rotateY(double beta)

rotateZ

public void rotateZ(double alpha)

setShape

public plugins.big.bigsnakeutils.icy.snake3D.Snake3DNode[] setShape(icy.sequence.Sequence initialPositionMask)