plugins.big.bigsnakeutils.icy.ellipsoid
Class Ellipsoid2D

java.lang.Object
  extended by plugins.big.bigsnakeutils.icy.ellipsoid.AbstractEllipsoid
      extended by plugins.big.bigsnakeutils.icy.ellipsoid.Ellipsoid2D

public class Ellipsoid2D
extends AbstractEllipsoid

Class describing a 2D ellipsoid (i.e. an ellipse)

Version:
May 3, 2014
Author:
Julien Jacquemot, Ricard Delgado-Gonzalo (ricard.delgado@gmail.com)

Field Summary
 double a
          Major axis of the ellipse.
 double alpha
          Angle of the ellipse.
 double b
          Minor axis of the ellipse.
 double x0
          x coordinate of the center of the ellipse.
 double y0
          y coordinate of the center of the ellipse.
 
Constructor Summary
Ellipsoid2D()
          Default constructor.
Ellipsoid2D(Ellipsoid2D other)
          Copy constructor.
Ellipsoid2D(int t)
          Default constructor.
 
Method Summary
 AbstractEllipsoid clone()
          Return another instance of this descriptor sharing the same properties.
 boolean contains(double x, double y)
          Returns true if the given point is inside the ellipse.
 boolean contains(double x, double y, double[] R)
          Returns true if the give point is insid the ellipse.
 double getMaximalRadius()
          Maximum radius of the ellipsoid.
 double getMinimalRadius()
          Minimum radius of the ellipsoid.
 double getPerimeter()
          Perimeter of the ellipsoid (surface in 3D).
 double[] getRotationMatrix()
          Return the matrix of rotation corresponding to the ellipsoid orientation.
 double getVolume()
          Volume of the ellipsoid (surface in 2D).
 boolean isOver(double x, double y)
          Return true if the given point is on the edge of the ellipse.
 boolean isValid()
          Return true if the descriptor represents a valid ellipsoid.
 icy.roi.ROI toROI()
          Return a new ROI corresponding to this descriptor.
 java.lang.String toString()
           
 
Methods inherited from class plugins.big.bigsnakeutils.icy.ellipsoid.AbstractEllipsoid
applyRotation, getProperty, getT, multiplyMatrices, setProperty, setT, transposeMatrix
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

a

public double a
Major axis of the ellipse.


b

public double b
Minor axis of the ellipse.


x0

public double x0
x coordinate of the center of the ellipse.


y0

public double y0
y coordinate of the center of the ellipse.


alpha

public double alpha
Angle of the ellipse.

Constructor Detail

Ellipsoid2D

public Ellipsoid2D()
Default constructor.


Ellipsoid2D

public Ellipsoid2D(int t)
Default constructor.

Parameters:
t - Time corresponding to this cell.

Ellipsoid2D

public Ellipsoid2D(Ellipsoid2D other)
Copy constructor.

Parameters:
other - Ellipse to copy.
Method Detail

clone

public AbstractEllipsoid clone()
Description copied from class: AbstractEllipsoid
Return another instance of this descriptor sharing the same properties.

Specified by:
clone in class AbstractEllipsoid

isValid

public boolean isValid()
Description copied from class: AbstractEllipsoid
Return true if the descriptor represents a valid ellipsoid.

Specified by:
isValid in class AbstractEllipsoid

getMinimalRadius

public double getMinimalRadius()
Description copied from class: AbstractEllipsoid
Minimum radius of the ellipsoid.

Specified by:
getMinimalRadius in class AbstractEllipsoid

getMaximalRadius

public double getMaximalRadius()
Description copied from class: AbstractEllipsoid
Maximum radius of the ellipsoid.

Specified by:
getMaximalRadius in class AbstractEllipsoid

getPerimeter

public double getPerimeter()
Description copied from class: AbstractEllipsoid
Perimeter of the ellipsoid (surface in 3D).

Specified by:
getPerimeter in class AbstractEllipsoid

getVolume

public double getVolume()
Description copied from class: AbstractEllipsoid
Volume of the ellipsoid (surface in 2D).

Specified by:
getVolume in class AbstractEllipsoid

getRotationMatrix

public double[] getRotationMatrix()
Description copied from class: AbstractEllipsoid
Return the matrix of rotation corresponding to the ellipsoid orientation.

Specified by:
getRotationMatrix in class AbstractEllipsoid

toROI

public icy.roi.ROI toROI()
Description copied from class: AbstractEllipsoid
Return a new ROI corresponding to this descriptor.

Specified by:
toROI in class AbstractEllipsoid

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

contains

public boolean contains(double x,
                        double y)
Returns true if the given point is inside the ellipse.


contains

public boolean contains(double x,
                        double y,
                        double[] R)
Returns true if the give point is insid the ellipse.

Parameters:
R - Rotation matrix of the ellipse.

isOver

public boolean isOver(double x,
                      double y)
Return true if the given point is on the edge of the ellipse.