plugins.big.bigsnake.keeper
Class SnakeKeeper

java.lang.Object
  extended by plugins.big.bigsnake.keeper.SnakeKeeper
All Implemented Interfaces:
icy.roi.ROIListener, java.util.EventListener, java.util.Observer

public class SnakeKeeper
extends java.lang.Object
implements icy.roi.ROIListener, java.util.Observer

Class that takes care of the synchronization of the snake optimization and the display.

Version:
May 3, 2014
Author:
Nicolas Chenouard (nicolas.chenouard@gmail.com), Ricard Delgado-Gonzalo (ricard.delgado@gmail.com), Masih Nilchian (masih_n85@yahoo.com)

Field Summary
 ESnake snake_
          The snake associated to this SnakeKeeper.
 
Constructor Summary
SnakeKeeper(icy.sequence.Sequence sequence, ESnake snake, BIGSnake mainPlugin)
          Default.
 
Method Summary
 void activateSnake()
          Activates the snake associate to this SnakeKeeper.
 void deactivateSnake()
          Deactivates the snake associate to this SnakeKeeper.
 plugins.big.bigsnakeutils.shape.priorshapes.shapes.Custom getCustomPriorShape()
           
 ESnakeParameters getESnakeParameters()
           
 java.lang.String getID()
          Returns the unique identifier of this SnakeKeeper.
 plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] getNodesCopy()
          Returns a copy of the snake-defining nodes of this SnakeKeeper.
 icy.sequence.Sequence getSequence()
          Returns the Sequence object to which the keeper is attached to.
 void removeFromSequence()
          Removes the ROI from the Sequence.
 void roiChanged(icy.roi.ROIEvent event)
           
 void setID(java.lang.String id)
           
 void setSelected(boolean selected)
           
 void setSnakeEditMode(SnakeEditMode editingMode)
           
 void setSnakeParameters(ESnakeParameters snakeParameters, plugins.big.bigsnakeutils.shape.priorshapes.shapes.Custom customPriorShape)
          Updates the parameters of the snake.
 void shiftSnake(int dx, int dy)
          Applies a shift on the position of the snake.
 void startOptimization()
          Launches the optimization procedure in a new thread.
 void stopOptimization()
          Stops the optimization procedure.
 void update(java.util.Observable observable, java.lang.Object object)
          Update the ROIs from the scales.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

snake_

public ESnake snake_
The snake associated to this SnakeKeeper.

Constructor Detail

SnakeKeeper

public SnakeKeeper(icy.sequence.Sequence sequence,
                   ESnake snake,
                   BIGSnake mainPlugin)
Default.

Method Detail

activateSnake

public void activateSnake()
Activates the snake associate to this SnakeKeeper.


deactivateSnake

public void deactivateSnake()
Deactivates the snake associate to this SnakeKeeper.


getCustomPriorShape

public plugins.big.bigsnakeutils.shape.priorshapes.shapes.Custom getCustomPriorShape()

getESnakeParameters

public ESnakeParameters getESnakeParameters()

getID

public java.lang.String getID()
Returns the unique identifier of this SnakeKeeper.


getNodesCopy

public plugins.big.bigsnakeutils.icy.snake2D.Snake2DNode[] getNodesCopy()
Returns a copy of the snake-defining nodes of this SnakeKeeper.


getSequence

public icy.sequence.Sequence getSequence()
Returns the Sequence object to which the keeper is attached to.


removeFromSequence

public void removeFromSequence()
Removes the ROI from the Sequence.


roiChanged

public void roiChanged(icy.roi.ROIEvent event)
Specified by:
roiChanged in interface icy.roi.ROIListener

setID

public void setID(java.lang.String id)

setSelected

public void setSelected(boolean selected)

setSnakeEditMode

public void setSnakeEditMode(SnakeEditMode editingMode)

setSnakeParameters

public void setSnakeParameters(ESnakeParameters snakeParameters,
                               plugins.big.bigsnakeutils.shape.priorshapes.shapes.Custom customPriorShape)
Updates the parameters of the snake.


shiftSnake

public void shiftSnake(int dx,
                       int dy)
Applies a shift on the position of the snake.


startOptimization

public void startOptimization()
Launches the optimization procedure in a new thread.


stopOptimization

public void stopOptimization()
Stops the optimization procedure.


update

public void update(java.util.Observable observable,
                   java.lang.Object object)
Update the ROIs from the scales.

Specified by:
update in interface java.util.Observer