plugins.big.bigsnake3d.roi
Class ROI3DSnake

java.lang.Object
  extended by icy.roi.ROI
      extended by icy.roi.ROI3D
          extended by plugins.big.bigsnake3d.roi.ROI3DSnake
All Implemented Interfaces:
icy.common.listener.ChangeListener, icy.file.xml.XMLPersistent, icy.painter.OverlayListener, java.util.EventListener

public class ROI3DSnake
extends icy.roi.ROI3D
implements icy.painter.OverlayListener

Class that handles the interaction and the display of the snake.

Version:
November 30, 2014
Author:
Ricard Delgado-Gonzalo (ricard.delgado@gmail.com), Nicolas Chenouard (nicolas.chenouard@gmail.com), Daniel Schmitter (daniel.schmitter@epfl.ch)

Nested Class Summary
 
Nested classes/interfaces inherited from class icy.roi.ROI
icy.roi.ROI.ROIIdComparator, icy.roi.ROI.ROINameComparator, icy.roi.ROI.ROIPainter
 
Field Summary
 
Fields inherited from class icy.roi.ROI3D
ID_C, ID_T
 
Fields inherited from class icy.roi.ROI
DEFAULT_COLOR, DEFAULT_OPACITY, DEFAULT_STROKE, ID_CLASSNAME, ID_COLOR, ID_ID, ID_NAME, ID_OPACITY, ID_READONLY, ID_ROI, ID_SELECTED, ID_SHOWNAME, ID_STROKE, idComparator, nameComparator, PROPERTY_COLOR, PROPERTY_CREATING, PROPERTY_ICON, PROPERTY_NAME, PROPERTY_OPACITY, PROPERTY_READONLY, PROPERTY_SHOWNAME, PROPERTY_STROKE
 
Constructor Summary
ROI3DSnake(SphereSnake snake, SnakeKeeper keeper)
          Default constructor.
 
Method Summary
 void changePosition(java.util.ArrayList<double[]> newPoints, plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale[] newScales)
           
 void changeScales(plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale[] newScales)
           
 icy.type.rectangle.Rectangle3D computeBounds3D()
          Returns the bounding box aligned with the axis containing the snake surface.
 boolean contains(double x, double y, double z)
           
 boolean contains(double x, double y, double z, double t, double c)
           
 boolean contains(double x, double y, double z, double sizeX, double sizeY, double sizeZ)
           
 void delete3DPainters()
           
 double[] getControlPoint(int i)
           
 double getSurfaceArea()
          Retrieves the area of the surface of the snake.
 double getVolume()
          Retrieves the volume inside the surface determined by the snake.
 boolean hasSelectedPoint()
           
 boolean intersects(double x, double y, double z, double sizeX, double sizeY, double sizeZ)
           
 boolean intersects(double x, double y, double z, double t, double c, double sizeX, double sizeY, double sizeZ, double sizeT, double sizeC)
           
 void overlayChanged(icy.painter.OverlayEvent event)
           
 void setActionPlane(ActionPlane actionPlane)
           
 void setDisplayRange(int displayRange)
           
 void setEditable(boolean isEditable)
           
 void setEditMode(SnakeEditMode editMode)
           
 void setPixelSize(double pixelSizeX, double pixelSizeY, double pixelSizeZ)
           
 void setScaleSubsamplingFactor(int subsamplingFactor)
           
 void setStrokeThicknessMultiplier(int strokeMultiplier)
           
 void translate2D(double dx, double dy, double dz)
           
 
Methods inherited from class icy.roi.ROI3D
canSetBounds, canSetPosition, canTranslate, computeBounds5D, computeNumberOfContourPoints, computeNumberOfPoints, contains, contains, contains, contains, getBooleanMask, getBooleanMask2D, getBooleanMask2D, getBooleanMask2D, getBooleanMask2D, getBooleanMask2D, getBounds, getBounds3D, getC, getDimension, getPosition, getPosition3D, getROI3DList, getROI3DList, getT, intersects, intersects, isActiveFor, isActiveFor, loadFromXML, saveToXML, setBounds3D, setBounds5D, setC, setPosition3D, setPosition5D, setT, translate
 
Methods inherited from class icy.roi.ROI
addListener, attachTo, beginUpdate, canvasToImageDeltaX, canvasToImageDeltaY, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaX, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, canvasToImageLogDeltaY, contains, contains, copyFrom, create, create, create, create, createFromXML, delete, delete, detachFrom, detachFromAll, detachFromAll, endUpdate, focusChanged, getAdjustedStroke, getAdjustedStroke, getBooleanMask2D, getBounds5D, getClassName, getColor, getCopy, getDisplayColor, getExclusiveUnion, getFirstSequence, getFocusedColor, getIcon, getId, getIntersection, getName, getNumberOfContourPoints, getNumberOfPoints, getOpacity, getOverlay, getPainter, getPerimeter, getPosition5D, getPropertyValue, getROICount, getROIList, getROIList, getROIList, getROIsFromXML, getSelectedColor, getSequences, getShowName, getSimpleClassName, getStroke, getSubtraction, getUnion, internalFocus, internalSelect, internalUnfocus, internalUnselect, intersects, isAttached, isCreating, isEditable, isFocused, isReadOnly, isSelected, isUpdating, loadFromXML, loadROIsFromXML, merge, nameChanged, onChanged, painterChanged, propertyChanged, remove, remove, removeListener, roiChanged, roiChanged, saveROIsToXML, selectionChanged, setColor, setCreating, setFocused, setIcon, setMousePos, setName, setOpacity, setPropertyValue, setReadOnly, setROIsFromXML, setSelected, setSelected, setSelectedColor, setShowName, setStroke
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ROI3DSnake

public ROI3DSnake(SphereSnake snake,
                  SnakeKeeper keeper)
Default constructor.

Method Detail

changePosition

public void changePosition(java.util.ArrayList<double[]> newPoints,
                           plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale[] newScales)

changeScales

public void changeScales(plugins.big.bigsnakeutils.icy.snake3D.Snake3DScale[] newScales)

delete3DPainters

public void delete3DPainters()

getControlPoint

public double[] getControlPoint(int i)

setActionPlane

public void setActionPlane(ActionPlane actionPlane)

setDisplayRange

public void setDisplayRange(int displayRange)

setEditMode

public void setEditMode(SnakeEditMode editMode)

setPixelSize

public void setPixelSize(double pixelSizeX,
                         double pixelSizeY,
                         double pixelSizeZ)

setScaleSubsamplingFactor

public void setScaleSubsamplingFactor(int subsamplingFactor)

setStrokeThicknessMultiplier

public void setStrokeThicknessMultiplier(int strokeMultiplier)

translate2D

public void translate2D(double dx,
                        double dy,
                        double dz)

computeBounds3D

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

Specified by:
computeBounds3D in class icy.roi.ROI3D

contains

public boolean contains(double x,
                        double y,
                        double z)
Specified by:
contains in class icy.roi.ROI3D

contains

public boolean contains(double x,
                        double y,
                        double z,
                        double sizeX,
                        double sizeY,
                        double sizeZ)
Specified by:
contains in class icy.roi.ROI3D

contains

public boolean contains(double x,
                        double y,
                        double z,
                        double t,
                        double c)
Overrides:
contains in class icy.roi.ROI3D

getSurfaceArea

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

Overrides:
getSurfaceArea in class icy.roi.ROI3D

getVolume

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

Overrides:
getVolume in class icy.roi.ROI3D

hasSelectedPoint

public boolean hasSelectedPoint()
Specified by:
hasSelectedPoint in class icy.roi.ROI

intersects

public boolean intersects(double x,
                          double y,
                          double z,
                          double sizeX,
                          double sizeY,
                          double sizeZ)
Specified by:
intersects in class icy.roi.ROI3D

intersects

public boolean intersects(double x,
                          double y,
                          double z,
                          double t,
                          double c,
                          double sizeX,
                          double sizeY,
                          double sizeZ,
                          double sizeT,
                          double sizeC)
Overrides:
intersects in class icy.roi.ROI3D

overlayChanged

public void overlayChanged(icy.painter.OverlayEvent event)
Specified by:
overlayChanged in interface icy.painter.OverlayListener

setEditable

public void setEditable(boolean isEditable)
Overrides:
setEditable in class icy.roi.ROI