volume
Class VolumeShort

java.lang.Object
  extended by volume.Volume
      extended by volume.VolumeShort
All Implemented Interfaces:
java.io.Serializable

public class VolumeShort
extends Volume

This class implements short volumes and operations including convolutions on it. Copyright (c) 1999-2002, Michael Abramoff. All rights reserved.

See Also:
Serialized Form

Field Summary
 short[][][] v
           
 
Constructor Summary
VolumeShort()
          creates the null volume.
VolumeShort(ij.process.ImageProcessor ip)
          Deprecated.  
VolumeShort(ij.ImageStack s)
          Creates a short volume from an ImageJ ImageStack.
VolumeShort(ij.ImageStack s, double aspectx, double aspecty, double aspectz)
           
VolumeShort(ij.ImageStack s, int depth, int n)
           
VolumeShort(ij.ImageStack s, int depth, int n, double aspectx, double aspecty, double aspectz)
           
VolumeShort(int width, int height, int depth)
          Creates a short volume of defined size and default aspect ratios.
VolumeShort(int width, int height, int depth, double aspectx, double aspecty, double aspectz)
          Creates a short volume of defined size and aspect ratio.
VolumeShort(VolumeShort v1)
          Creates a float volume which is an exact copy of vl.
 
Method Summary
 void convolvexyz(Kernel1D kernel)
          XYZ convolution with separated 1D kernel.
 java.lang.Object get(int x, int y, int z)
          Get the voxel value as a Number.
 boolean getIndexed()
           
 void load(ij.process.ImageProcessor ip, int t)
          Fill the volume with depth 1 with a single image ip.
 boolean load(ij.ImageStack s, int start)
          Fill this volume from stack s with from slice start.
 void loadInverse(ij.ImageStack s, int center)
          Inversely load a volume from the stack centered around center with the first one last.
 void set(int x, int y, int z, int value)
          Deprecated.  
 void set(java.lang.Object value, int x, int y, int z)
          Set the voxel value to a Number.
 void setHighBits(ij.ImageStack s)
          Combine the values of s into the index byte (high 8 bits) of the voxel scalars of this volume.
 void setIndexed(boolean indexed)
           
 
Methods inherited from class volume.Volume
discreteSupport, getAspectx, getAspecty, getAspectz, getDepth, getEdge, getHeight, getWidth, in, setAspects, setEdge, toString, valid, valid
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

v

public short[][][] v
Constructor Detail

VolumeShort

public VolumeShort()
creates the null volume.


VolumeShort

public VolumeShort(int width,
                   int height,
                   int depth,
                   double aspectx,
                   double aspecty,
                   double aspectz)
Creates a short volume of defined size and aspect ratio.

Parameters:
width, - height, depth the dimensions of the volume
aspectx, - aspecty, aspectz the aspect ratios of the volume dimensions.

VolumeShort

public VolumeShort(int width,
                   int height,
                   int depth)
Creates a short volume of defined size and default aspect ratios.

Parameters:
width, - height, depth the dimensions of the volume

VolumeShort

public VolumeShort(VolumeShort v1)
Creates a float volume which is an exact copy of vl.

Parameters:
vl - the VolumeFloat to be copied.

VolumeShort

public VolumeShort(ij.ImageStack s,
                   double aspectx,
                   double aspecty,
                   double aspectz)
            throws java.lang.Exception
Throws:
java.lang.Exception

VolumeShort

public VolumeShort(ij.ImageStack s)
            throws java.lang.Exception
Creates a short volume from an ImageJ ImageStack.

Parameters:
s - the ImageStack which has to contain at least one image.
Throws:
java.lang.Exception

VolumeShort

public VolumeShort(ij.process.ImageProcessor ip)
Deprecated. 

Creates a volume with depth 1 from an ImageProcessor. Only needed for of3d library.


VolumeShort

public VolumeShort(ij.ImageStack s,
                   int depth,
                   int n)

VolumeShort

public VolumeShort(ij.ImageStack s,
                   int depth,
                   int n,
                   double aspectx,
                   double aspecty,
                   double aspectz)
Method Detail

get

public java.lang.Object get(int x,
                            int y,
                            int z)
Get the voxel value as a Number.

Specified by:
get in class Volume
Parameters:
x - the x position of the voxel
y - the y position of the voxel
z - the z position of the voxel
Returns:
a Number with the voxel value at x,y,z

set

public void set(java.lang.Object value,
                int x,
                int y,
                int z)
Set the voxel value to a Number.

Specified by:
set in class Volume
Parameters:
x - the x position of the voxel
y - the y position of the voxel
z - the z position of the voxel
value - a value suitable for this volume.

set

public void set(int x,
                int y,
                int z,
                int value)
Deprecated. 


load

public boolean load(ij.ImageStack s,
                    int start)
Fill this volume from stack s with from slice start.

Parameters:
s - an ImageJ ImageStack
start - the first slice to be loaded (starting with slice 1).
Returns:
true if could be loaded, false if wrong volume type.

load

public void load(ij.process.ImageProcessor ip,
                 int t)
Fill the volume with depth 1 with a single image ip.


loadInverse

public void loadInverse(ij.ImageStack s,
                        int center)
Inversely load a volume from the stack centered around center with the first one last.


setHighBits

public void setHighBits(ij.ImageStack s)
Combine the values of s into the index byte (high 8 bits) of the voxel scalars of this volume.

Parameters:
s - an ImageStack containing the index values.

setIndexed

public void setIndexed(boolean indexed)

getIndexed

public boolean getIndexed()

convolvexyz

public void convolvexyz(Kernel1D kernel)
XYZ convolution with separated 1D kernel.

Parameters:
kernel - a 1D convolution kernel.