volume
Class VolumeShort

java.lang.Object
  |
  +--volume.Volume
        |
        +--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
           
 
Fields inherited from class volume.Volume
aspectx, aspecty, aspectz, depth, edge, height, width
 
Constructor Summary
VolumeShort()
          creates the null volume.
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)
          public VolumeShort(ImageProcessor ip) // Creates a volume with depth 1 from an ImageProcessor.
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.
protected  void loadImage(short[][] i, byte[] b)
          Load an image b into i.
protected  void loadImage(short[][] i, short[] sh)
          Load an image sh into i.
 void loadInverse(ij.ImageStack s, int center)
          Inversely load a volume from the stack centered around center with the first one last.
protected  void loadSlice(short[][] i, ij.ImageStack s, int io)
          Load a slice io from stack s into image i.
 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
, clone, equals, finalize, 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

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.

VolumeShort

public VolumeShort(ij.ImageStack s,
                   int depth,
                   int n)
public VolumeShort(ImageProcessor ip) // Creates a volume with depth 1 from an ImageProcessor. { this(ip.getWidth(), ip.getHeight(), 1, 1, 1, 1); load(ip, 0); }

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.
Overrides:
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.
Overrides:
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

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.

loadSlice

protected void loadSlice(short[][] i,
                         ij.ImageStack s,
                         int io)
Load a slice io from stack s into image i.

loadImage

protected void loadImage(short[][] i,
                         byte[] b)
Load an image b into i.

loadImage

protected void loadImage(short[][] i,
                         short[] sh)
Load an image sh into i.

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.