edu.jhu.ece.iacl.jist.structures.image
Class Voxel

java.lang.Object
  extended by java.lang.Number
      extended by edu.jhu.ece.iacl.jist.structures.image.Voxel
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Voxel>
Direct Known Subclasses:
VoxelBoolean, VoxelColor, VoxelDouble, VoxelFloat, VoxelIndexed, VoxelInt, VoxelMipav, VoxelShort, VoxelUByte, VoxelVector

public abstract class Voxel
extends java.lang.Number
implements java.lang.Cloneable, java.lang.Comparable<Voxel>, java.io.Serializable

Generic Voxel Type.

Author:
Blake Lucas
See Also:
Serialized Form

Constructor Summary
Voxel()
          Instantiates a new voxel.
Voxel(Voxel v)
          Instantiates a new voxel.
 
Method Summary
abstract  Voxel add(Voxel v)
          Adds the.
 byte byteValue()
           
abstract  Voxel clone()
           
abstract  Voxel div(Voxel v)
          Div.
 double doubleValue()
           
 boolean equals(java.lang.Object o)
           
 float floatValue()
           
abstract  boolean getBoolean()
          Gets the boolean.
abstract  java.awt.Color getColor()
          Gets the color.
abstract  double getDouble()
          Gets the double.
 float getFloat()
          Gets the float.
abstract  int getInt()
          Gets the int.
static int getRestriction(VoxelType type)
          Determine restriction level for a particular Voxel Data Type The higher the value, the more restrictive.
abstract  short getShort()
          Gets the short.
abstract  VoxelType getType()
          Gets the type.
 short getUByte()
          Gets the u byte.
 VectorX getVector()
          Gets the vector.
 int intValue()
           
 long longValue()
           
abstract  Voxel mul(Voxel v)
          Mul.
abstract  Voxel neg()
          Neg.
static Voxel round(Voxel v, int prec)
          Round.
abstract  void set(boolean vox)
          Sets the.
 void set(byte vox)
          Sets the.
abstract  void set(java.awt.Color vox)
          Sets the.
abstract  void set(double vox)
          Sets the.
 void set(float a)
          Sets the.
abstract  void set(int vox)
          Sets the.
abstract  void set(short vox)
          Sets the.
 void set(VectorX v)
          Sets the.
abstract  void set(Voxel v)
          Sets the.
 short shortValue()
           
abstract  Voxel sub(Voxel v)
          Sub.
abstract  java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

Voxel

public Voxel()
Instantiates a new voxel.


Voxel

public Voxel(Voxel v)
Instantiates a new voxel.

Parameters:
v - the v
Method Detail

round

public static Voxel round(Voxel v,
                          int prec)
Round.

Parameters:
v - the v
prec - the prec
Returns:
the voxel

getRestriction

public static int getRestriction(VoxelType type)
Determine restriction level for a particular Voxel Data Type The higher the value, the more restrictive.

Parameters:
type - the type
Returns:
the restriction

getType

public abstract VoxelType getType()
Gets the type.

Returns:
the type

getBoolean

public abstract boolean getBoolean()
Gets the boolean.

Returns:
the boolean

getShort

public abstract short getShort()
Gets the short.

Returns:
the short

getColor

public abstract java.awt.Color getColor()
Gets the color.

Returns:
the color

getDouble

public abstract double getDouble()
Gets the double.

Returns:
the double

getVector

public VectorX getVector()
Gets the vector.

Returns:
the vector

set

public void set(VectorX v)
Sets the.

Parameters:
v - the v

getFloat

public float getFloat()
Gets the float.

Returns:
the float

getUByte

public short getUByte()
Gets the u byte.

Returns:
the u byte

getInt

public abstract int getInt()
Gets the int.

Returns:
the int

clone

public abstract Voxel clone()
Overrides:
clone in class java.lang.Object

set

public abstract void set(Voxel v)
Sets the.

Parameters:
v - the v

set

public abstract void set(boolean vox)
Sets the.

Parameters:
vox - the vox

set

public abstract void set(short vox)
Sets the.

Parameters:
vox - the vox

set

public void set(byte vox)
Sets the.

Parameters:
vox - the vox

set

public void set(float a)
Sets the.

Parameters:
a - the a

set

public abstract void set(int vox)
Sets the.

Parameters:
vox - the vox

set

public abstract void set(java.awt.Color vox)
Sets the.

Parameters:
vox - the vox

set

public abstract void set(double vox)
Sets the.

Parameters:
vox - the vox

add

public abstract Voxel add(Voxel v)
Adds the.

Parameters:
v - the v
Returns:
the voxel

sub

public abstract Voxel sub(Voxel v)
Sub.

Parameters:
v - the v
Returns:
the voxel

mul

public abstract Voxel mul(Voxel v)
Mul.

Parameters:
v - the v
Returns:
the voxel

div

public abstract Voxel div(Voxel v)
Div.

Parameters:
v - the v
Returns:
the voxel

neg

public abstract Voxel neg()
Neg.

Returns:
the voxel

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

intValue

public int intValue()
Specified by:
intValue in class java.lang.Number

longValue

public long longValue()
Specified by:
longValue in class java.lang.Number

floatValue

public float floatValue()
Specified by:
floatValue in class java.lang.Number

byteValue

public byte byteValue()
Overrides:
byteValue in class java.lang.Number

shortValue

public short shortValue()
Overrides:
shortValue in class java.lang.Number

doubleValue

public double doubleValue()
Specified by:
doubleValue in class java.lang.Number

toString

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