plugins.big.bigsnakeutils.icy.ellipsoid
Class AbstractEllipsoid

java.lang.Object
  extended by plugins.big.bigsnakeutils.icy.ellipsoid.AbstractEllipsoid
Direct Known Subclasses:
Ellipsoid2D, Ellipsoid3D

public abstract class AbstractEllipsoid
extends java.lang.Object

Abstract class describing an ellipsoid. Gives access to some general methods. It's also possible to add custom properties to the ellipsoid, indexing them by name.

Version:
May 3, 2014
Author:
Julien Jacquemot

Constructor Summary
AbstractEllipsoid()
           
 
Method Summary
static double[] applyRotation(double[] R, double[] V)
          Apply a rotation to a vector.
abstract  AbstractEllipsoid clone()
          Return another instance of this descriptor sharing the same properties.
abstract  double getMaximalRadius()
          Maximum radius of the ellipsoid.
abstract  double getMinimalRadius()
          Minimum radius of the ellipsoid.
abstract  double getPerimeter()
          Perimeter of the ellipsoid (surface in 3D).
 double getProperty(java.lang.String propertyName)
          Return the value of a property.
abstract  double[] getRotationMatrix()
          Return the matrix of rotation corresponding to the ellipsoid orientation.
 int getT()
          Time frame of the ellipsoid.
abstract  double getVolume()
          Volume of the ellipsoid (surface in 2D).
abstract  boolean isValid()
          Return true if the descriptor represents a valid ellipsoid.
static double[] multiplyMatrices(double[] A, double[] B)
          Multiply to matrices.
 void setProperty(java.lang.String propertyName, double value)
          Set the value of a property.
 void setT(int t)
          Set the time associated with this ellipsoid.
abstract  icy.roi.ROI toROI()
          Return a new ROI corresponding to this descriptor.
static double[] transposeMatrix(double[] A)
          Transpose the given matrix.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEllipsoid

public AbstractEllipsoid()
Method Detail

clone

public abstract AbstractEllipsoid clone()
Return another instance of this descriptor sharing the same properties.

Overrides:
clone in class java.lang.Object

isValid

public abstract boolean isValid()
Return true if the descriptor represents a valid ellipsoid.


getMinimalRadius

public abstract double getMinimalRadius()
Minimum radius of the ellipsoid.


getMaximalRadius

public abstract double getMaximalRadius()
Maximum radius of the ellipsoid.


getPerimeter

public abstract double getPerimeter()
Perimeter of the ellipsoid (surface in 3D).


getVolume

public abstract double getVolume()
Volume of the ellipsoid (surface in 2D).


getRotationMatrix

public abstract double[] getRotationMatrix()
Return the matrix of rotation corresponding to the ellipsoid orientation.


getT

public int getT()
Time frame of the ellipsoid.


setT

public void setT(int t)
Set the time associated with this ellipsoid.


setProperty

public void setProperty(java.lang.String propertyName,
                        double value)
Set the value of a property. If the property doesn't exist yet, it is added to the list of ellipsoid properties.

Parameters:
propertyName - Name of the property to set.
value - New value of the property.

getProperty

public double getProperty(java.lang.String propertyName)
Return the value of a property.

Throws:
java.lang.IllegalArgumentException - An exception is raised if the property doesn't exist

toROI

public abstract icy.roi.ROI toROI()
Return a new ROI corresponding to this descriptor.


applyRotation

public static double[] applyRotation(double[] R,
                                     double[] V)
Apply a rotation to a vector.

Parameters:
R - Rotation matrix
V - Vector to rotate
Returns:
Return the rotated vector

multiplyMatrices

public static double[] multiplyMatrices(double[] A,
                                        double[] B)
Multiply to matrices. The matrices have to be of size 3x3, 4x4, 3x1 or 4x1.


transposeMatrix

public static double[] transposeMatrix(double[] A)
Transpose the given matrix. The matrix has to be of size 3x3 or 4x4.