ovusculeSnake2D
Class OvusculeSnake2DKeeper

java.lang.Object
  extended by ovusculeSnake2D.OvusculeSnake2DKeeper

public class OvusculeSnake2DKeeper
extends java.lang.Object

This class encapsulates the interactive and managerial aspects of snakes. It handles objects that implement the OvusculeSnake2D interface.

See Also:
OvusculeSnake2D

Constructor Summary
OvusculeSnake2DKeeper()
           
 
Method Summary
 void interactAndOptimize(OvusculeSnake2D snake, ij.ImagePlus display)
          This method allows the user to alternate between interactive guiding of the snake and automatic optimization under control of the class OvusculeSnake2DKeeper.
 void optimize(OvusculeSnake2D snake, ij.ImagePlus display, boolean optimizing, boolean stamping)
          This method performs the optimization of the snake according to the measure implemented in the method OvusculeSnake2D.energy().
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OvusculeSnake2DKeeper

public OvusculeSnake2DKeeper()
Method Detail

interactAndOptimize

public void interactAndOptimize(OvusculeSnake2D snake,
                                ij.ImagePlus display)
This method allows the user to alternate between interactive guiding of the snake and automatic optimization under control of the class OvusculeSnake2DKeeper.

Parameters:
snake - A mandatory object that implements the OvusculeSnake2D interface and encapsulates the specifics of the snake.
display - A mandatory ImagePlus object over which the handles used to interactively manipulate the snake will be overlaid. The skin used to represent the snake will be overlaid on the same image.

optimize

public void optimize(OvusculeSnake2D snake,
                     ij.ImagePlus display,
                     boolean optimizing,
                     boolean stamping)
This method performs the optimization of the snake according to the measure implemented in the method OvusculeSnake2D.energy(). It relies on the method OvusculeSnake2D.getEnergyGradient() to compute the gradient of this energy. The optimization proceeds by refining the initial snake returned by the method OvusculeSnake2D.getNodes(), which is called once.

Parameters:
snake - A mandatory object that implements the OvusculeSnake2D interface and encapsulates the specifics of the snake.
display - An ImagePlus object over which the skin used to represent the snake will be overlaid. Set this parameter to null to bypass this interactive feedback.
optimizing - Does not attempt to refine the snake when set to false. Refines the snake when set to true.
stamping - Does nothing when set to false. When set to true, however, stamps the display with the outline of the optimized snake, as provided by its getScales() method.
See Also:
OvusculeSnake2D.getNodes(), OvusculeSnake2D.energy(), OvusculeSnake2D.getEnergyGradient()