edu.stanford.rsl.konrad.volume3d
Class Volume3D

java.lang.Object
  extended by edu.stanford.rsl.konrad.volume3d.Volume3D
Direct Known Subclasses:
CUDAVolume3D

public class Volume3D
extends java.lang.Object

3D-FFTable Volume based on C-code from Lars Wigstroem. This volume class is able to describe a 3D grid with uniform spacing in each spatial dimension. One sub class of this volume is CUDAVolume3D which models the same data in CUDA memory. The corresponding operator is then CUDAVolumeOperator. Note that instantiation should be performed using the respective VolumeOperator in order to enable compatibility to CUDA.

Author:
akmaier
See Also:
CUDAVolume3D, VolumeOperator

Field Summary
 float[][][] data
           
 float[] dim
           
 int dimensions
           
 int in_dim
           
static int MAX_DIM
           
 int[] size
           
 
Constructor Summary
Volume3D(ij.ImagePlus image, int mirror, int cuty, boolean uneven)
          Creates a Volume3D Object which supports 3-D filtering operations.
Volume3D(int[] size2, float[] dim2, int inDim)
          Creates an empty volume.
 
Method Summary
 void destroy()
          Releases the memory for this volume.
 ij.ImagePlus getImagePlus(java.lang.String title)
          Creates an ImagePlus to visualize the contents of this Volume.
 ij.ImagePlus getImagePlus(java.lang.String title, int mirror, int cuty, boolean uneven)
          Method to create an ImagePlus from this Volume3D.
 int getInternalDimension()
          returns 1 if the volume is real and 2 if it is complex
 void printSize()
          prints the dimensions of the volume to STDOUT.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dimensions

public int dimensions

size

public int[] size

dim

public float[] dim

in_dim

public int in_dim

data

public float[][][] data

MAX_DIM

public static final int MAX_DIM
See Also:
Constant Field Values
Constructor Detail

Volume3D

public Volume3D(int[] size2,
                float[] dim2,
                int inDim)
Creates an empty volume. Use of this constructor is generally discouraged. It may result in incompatibility with CUDA.

Parameters:
size2 - sizes in each direction
dim2 - physical dimension in each direction
inDim - internal Dimension

Volume3D

public Volume3D(ij.ImagePlus image,
                int mirror,
                int cuty,
                boolean uneven)
Creates a Volume3D Object which supports 3-D filtering operations. Call of this constructor is discouraged. Use the VolumeOperator instead.

Parameters:
image - the ImagePlus
dimx - voxel dimension in x direction
dimy - voxel dimension in y direction
dimz - voxel dimension in z direction
mirror - size of the area which is mirrored to reduce FFT artifacts.
cuty - number of pixels to be cut from the original volume along y direction
uneven - is set if the original volume has an uneven number of slices / projections.
Method Detail

getInternalDimension

public int getInternalDimension()
returns 1 if the volume is real and 2 if it is complex

Returns:
the internal dimension of the volume.

getImagePlus

public ij.ImagePlus getImagePlus(java.lang.String title)
Creates an ImagePlus to visualize the contents of this Volume.

Parameters:
title - the title of the ImagePlus
Returns:
the ImagePlus

getImagePlus

public ij.ImagePlus getImagePlus(java.lang.String title,
                                 int mirror,
                                 int cuty,
                                 boolean uneven)
Method to create an ImagePlus from this Volume3D. Parameters are set to remove the mirrored boundary.

Parameters:
title - the title for the ImagePlus
mirror - the width of the mirrored boundary. Should match the parameters used to create the volume.
cuty - the number of pixels which were cut along the y axis during the creation of the volume.
uneven - true, if the original number of slices / projections was odd.
Returns:
the ImagePlus

printSize

public void printSize()
prints the dimensions of the volume to STDOUT.


destroy

public void destroy()
Releases the memory for this volume. References to data are set to null to improve garbage collection. In the CUDA version, the memory on the card is freed.