volume
Class Volume

java.lang.Object
  |
  +--volume.Volume
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HyperVolume, OF3DFlow, VJBinaryShell, VJThresholdedVolume, VolumeFloat, VolumeInteger, VolumeRGB, VolumeShort

public abstract class Volume
extends java.lang.Object
implements java.io.Serializable

This is an abstract super-class to implement volumes. Volumes are 3-D ordered structures that are indexed by three-parameters. The values in a volume can consist of scalars, vectors or Objects. Copyright (c) 1999-2002, Michael Abramoff. All rights reserved.

See Also:
Serialized Form

Field Summary
protected  double aspectx
          Anisotropy measure of the volume.
protected  double aspecty
          Anisotropy measure of the volume.
protected  double aspectz
          Anisotropy measure of the volume.
protected  int depth
          Dimensions of the volume.
protected  int edge
           
protected  int height
          Dimensions of the volume.
protected  int width
          Dimensions of the volume.
 
Constructor Summary
Volume()
           
 
Method Summary
 int discreteSupport(Kernel kernel)
          Returns the minimum depth needed to be able to filter (z-dimension) for the kernel.
abstract  java.lang.Object get(int x, int y, int z)
           
 double getAspectx()
           
 double getAspecty()
           
 double getAspectz()
           
 int getDepth()
           
 int getEdge()
          Get the edge in the volume beyond which a voxel is not valid.
 int getHeight()
           
 int getWidth()
           
 boolean in(double x, double y, double z)
          Check whether x,y,z are within the edges.
abstract  void set(java.lang.Object value, int x, int y, int z)
          Set the voxel at x,y,z to value.
 void setAspects(double aspectx, double aspecty, double aspectz)
          Set the aspect ratio of this volume.
 void setEdge(int edge)
          Set the edges in the volume beyond which a voxel is not valid.
 java.lang.String toString()
          Return a string describing the volume.
 boolean valid(int x, int y)
          Check whether x,y are within the edges.
 boolean valid(int x, int y, int z)
          Check whether x,y,z are within the edges.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

protected int width
Dimensions of the volume.

height

protected int height
Dimensions of the volume.

depth

protected int depth
Dimensions of the volume.

edge

protected int edge

aspectx

protected double aspectx
Anisotropy measure of the volume.

aspecty

protected double aspecty
Anisotropy measure of the volume.

aspectz

protected double aspectz
Anisotropy measure of the volume.
Constructor Detail

Volume

public Volume()
Method Detail

getWidth

public int getWidth()
Returns:
the width of the volume.

getHeight

public int getHeight()
Returns:
the height of the volume.

getDepth

public int getDepth()
Returns:
the depth of the volume.

get

public abstract java.lang.Object get(int x,
                                     int y,
                                     int z)
Parameters:
x, - y, z the position in the volume you want the value of.
Returns:
the value of the volume at x,y,z.

set

public abstract void set(java.lang.Object value,
                         int x,
                         int y,
                         int z)
Set the voxel at x,y,z to value.
Parameters:
value - a value suitable for this volume.
x, - y, z the position in the volume.

setAspects

public void setAspects(double aspectx,
                       double aspecty,
                       double aspectz)
Set the aspect ratio of this volume.
Parameters:
aspectx, - aspecty, aspectz the x,y,z aspect rations.

getAspectx

public double getAspectx()
Returns:
the x-aspect ratio.

getAspecty

public double getAspecty()
Returns:
the y-aspect ratio.

getAspectz

public double getAspectz()
Returns:
the z-aspect ratio.

getEdge

public int getEdge()
Get the edge in the volume beyond which a voxel is not valid.

setEdge

public void setEdge(int edge)
Set the edges in the volume beyond which a voxel is not valid.

in

public boolean in(double x,
                  double y,
                  double z)
Check whether x,y,z are within the edges.

valid

public boolean valid(int x,
                     int y)
Check whether x,y are within the edges.

valid

public boolean valid(int x,
                     int y,
                     int z)
Check whether x,y,z are within the edges.

discreteSupport

public int discreteSupport(Kernel kernel)
Returns the minimum depth needed to be able to filter (z-dimension) for the kernel.

toString

public java.lang.String toString()
Return a string describing the volume.
Overrides:
toString in class java.lang.Object