plugins.big.bigsnake
Class BIGSnake

java.lang.Object
  extended by icy.plugin.abstract_.Plugin
      extended by icy.plugin.abstract_.PluginActionable
          extended by plugins.big.bigsnake.BIGSnake
All Implemented Interfaces:
icy.gui.main.ActiveSequenceListener, icy.gui.main.ActiveViewerListener, icy.gui.main.GlobalSequenceListener, icy.gui.main.GlobalViewerListener, icy.plugin.interface_.PluginImageAnalysis, java.awt.event.ActionListener, java.awt.event.KeyListener, java.lang.Runnable, java.util.EventListener, plugins.adufour.blocks.lang.Block

public class BIGSnake
extends icy.plugin.abstract_.PluginActionable
implements plugins.adufour.blocks.lang.Block, java.awt.event.ActionListener, icy.gui.main.ActiveSequenceListener, icy.gui.main.ActiveViewerListener, icy.gui.main.GlobalSequenceListener, icy.gui.main.GlobalViewerListener, java.awt.event.KeyListener

Main class of the Active Cells plug-in.

Version:
May 24, 2015
Author:
Nicolas Chenouard (nicolas.chenouard@gmail.com), Ricard Delgado-Gonzalo (ricard.delgado@gmail.com), Emrah Bostan (emrah.bostan@gmail.com), Daniel Schmitter (daniel.schmitter@epfl.ch)

Constructor Summary
BIGSnake()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Gets the events of the buttons from the interface.
 void activateSnake(SnakeKeeper keeper)
          Makes a particular snake active and responsive to interactions.
 void activeSequenceChanged(icy.sequence.SequenceEvent event)
          Gets an event when a Sequence has changed.
 void activeViewerChanged(icy.gui.viewer.ViewerEvent event)
          Gets an event when a Viewer has changed.
 void deactivateSnake(SnakeKeeper keeper)
          Makes a particular snake inactive and not responsive to interaction.
 void declareInput(plugins.adufour.blocks.util.VarList inputMap)
          Declares the input parameters of the block.
 void declareOutput(plugins.adufour.blocks.util.VarList outputMap)
          Declares the output parameters of the block.
 IOXMLUtils getIOXMLUtils()
          Returns the IOXMLUtils object that the plugin uses to save and load xml files.
 boolean isActiveSnake(SnakeKeeper keeper)
          Returns true if SnakeKeeper passed is the active one.
 void keyPressed(java.awt.event.KeyEvent e)
          Interactions with respect to KeyEvent to detect the COPY and PASTE commands.
 void keyReleased(java.awt.event.KeyEvent e)
          Gets an event when a key is released.
 void keyTyped(java.awt.event.KeyEvent e)
          Gets an event when a key is typed.
 void loadSnakeParametersFromInterface()
          Retrieves the snake parameters from the GUI and sets them to the active snake.
 void loadSnakesFromXML()
          Load the snakes from an XML file.
 void measureSnakes()
          Invokes the external plug-in ROIMeasures.
 void run()
          Method executed when launching the plug-in.
 void saveSnakesToXML()
          Saves the snakes to an XML file.
 void sequenceActivated(icy.sequence.Sequence sequence)
          Gets an event when a Sequence has been activated (focused).
 void sequenceClosed(icy.sequence.Sequence sequence)
          Gets an event when a Sequence has been closed.
 void sequenceDeactivated(icy.sequence.Sequence sequence)
          Gets an event when a Sequence has been deactivated (lost focus).
 void sequenceOpened(icy.sequence.Sequence sequence)
          Gets an event when a Sequence has been opened.
 void terminatePlugin()
          Prepares the plug-in to be terminated.
 void viewerActivated(icy.gui.viewer.Viewer viewer)
          Gets an event when a Viewer has been activated (focused).
 void viewerClosed(icy.gui.viewer.Viewer viewer)
          Gets an event when a Viewer has been closed.
 void viewerDeactivated(icy.gui.viewer.Viewer viewer)
          Gets an event when a Viewer has been deactivated (lost focus).
 void viewerOpened(icy.gui.viewer.Viewer viewer)
          Gets an event when a Viewer has been opened.
 
Methods inherited from class icy.plugin.abstract_.PluginActionable
compute
 
Methods inherited from class icy.plugin.abstract_.Plugin
addIcyFrame, addSequence, getActiveImage, getActiveSequence, getActiveViewer, getDescriptor, getFocusedImage, getFocusedSequence, getFocusedViewer, getIconResource, getImageResource, getInstallFolder, getName, getOwnerClassName, getPlugin, getPreferences, getPreferencesRoot, getResource, getResourceAsStream, getResources, getSequences, isBundled, loadLibrary, removeSequence, report, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BIGSnake

public BIGSnake()
Method Detail

run

public void run()
Method executed when launching the plug-in.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in interface plugins.adufour.blocks.lang.Block

terminatePlugin

public void terminatePlugin()
Prepares the plug-in to be terminated. All memory is freed, and auxiliary plug-ins are closed.


isActiveSnake

public boolean isActiveSnake(SnakeKeeper keeper)
Returns true if SnakeKeeper passed is the active one.


activateSnake

public void activateSnake(SnakeKeeper keeper)
Makes a particular snake active and responsive to interactions.


deactivateSnake

public void deactivateSnake(SnakeKeeper keeper)
Makes a particular snake inactive and not responsive to interaction.


loadSnakeParametersFromInterface

public void loadSnakeParametersFromInterface()
Retrieves the snake parameters from the GUI and sets them to the active snake.


getIOXMLUtils

public IOXMLUtils getIOXMLUtils()
Returns the IOXMLUtils object that the plugin uses to save and load xml files.


loadSnakesFromXML

public void loadSnakesFromXML()
Load the snakes from an XML file.


saveSnakesToXML

public void saveSnakesToXML()
Saves the snakes to an XML file.


measureSnakes

public void measureSnakes()
Invokes the external plug-in ROIMeasures.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Gets the events of the buttons from the interface.

Specified by:
actionPerformed in interface java.awt.event.ActionListener

activeSequenceChanged

public void activeSequenceChanged(icy.sequence.SequenceEvent event)
Gets an event when a Sequence has changed.

Specified by:
activeSequenceChanged in interface icy.gui.main.ActiveSequenceListener

sequenceActivated

public void sequenceActivated(icy.sequence.Sequence sequence)
Gets an event when a Sequence has been activated (focused).

Specified by:
sequenceActivated in interface icy.gui.main.ActiveSequenceListener

sequenceDeactivated

public void sequenceDeactivated(icy.sequence.Sequence sequence)
Gets an event when a Sequence has been deactivated (lost focus).

Specified by:
sequenceDeactivated in interface icy.gui.main.ActiveSequenceListener

activeViewerChanged

public void activeViewerChanged(icy.gui.viewer.ViewerEvent event)
Gets an event when a Viewer has changed.

Specified by:
activeViewerChanged in interface icy.gui.main.ActiveViewerListener

viewerActivated

public void viewerActivated(icy.gui.viewer.Viewer viewer)
Gets an event when a Viewer has been activated (focused).

Specified by:
viewerActivated in interface icy.gui.main.ActiveViewerListener

viewerDeactivated

public void viewerDeactivated(icy.gui.viewer.Viewer viewer)
Gets an event when a Viewer has been deactivated (lost focus).

Specified by:
viewerDeactivated in interface icy.gui.main.ActiveViewerListener

sequenceOpened

public void sequenceOpened(icy.sequence.Sequence sequence)
Gets an event when a Sequence has been opened.

Specified by:
sequenceOpened in interface icy.gui.main.GlobalSequenceListener

sequenceClosed

public void sequenceClosed(icy.sequence.Sequence sequence)
Gets an event when a Sequence has been closed.

Specified by:
sequenceClosed in interface icy.gui.main.GlobalSequenceListener

viewerOpened

public void viewerOpened(icy.gui.viewer.Viewer viewer)
Gets an event when a Viewer has been opened.

Specified by:
viewerOpened in interface icy.gui.main.GlobalViewerListener

viewerClosed

public void viewerClosed(icy.gui.viewer.Viewer viewer)
Gets an event when a Viewer has been closed.

Specified by:
viewerClosed in interface icy.gui.main.GlobalViewerListener

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Interactions with respect to KeyEvent to detect the COPY and PASTE commands.

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Gets an event when a key is released.

Specified by:
keyReleased in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Gets an event when a key is typed.

Specified by:
keyTyped in interface java.awt.event.KeyListener

declareInput

public void declareInput(plugins.adufour.blocks.util.VarList inputMap)
Declares the input parameters of the block.

Specified by:
declareInput in interface plugins.adufour.blocks.lang.Block

declareOutput

public void declareOutput(plugins.adufour.blocks.util.VarList outputMap)
Declares the output parameters of the block.

Specified by:
declareOutput in interface plugins.adufour.blocks.lang.Block