of3d
Class OF3DFlow

java.lang.Object
  |
  +--volume.Volume
        |
        +--of3d.OF3DFlow
All Implemented Interfaces:
java.io.Serializable

public class OF3DFlow
extends Volume
implements java.io.Serializable

This class implements a volume consisting of 3D optical flows and methods useful for volume rendering. Copyright (c) 1999, Michael Abramoff. All rights reserved. Author: Michael Abramoff, Image Sciences Institute University Medical Center Utrecht Netherlands Small print: Permission to use, copy, modify and distribute this version of this software or any parts of it and its documentation or any parts of it ("the software"), for any purpose is hereby granted, provided that the above copyright notice and this permission notice appear intact in all copies of the software and that you do not sell the software, or include the software in a commercial package. The release of this software into the public domain does not imply any obligation on the part of the author to release future versions into the public domain. The author is free to make upgraded or improved versions of the software available for a fee or commercially only. Commercial licensing of the software is available by contacting the author. THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

See Also:
Serialized Form

Field Summary
 boolean[][][] computed
           
 float[][][][] v
           
 Volume vs
           
 
Fields inherited from class volume.Volume
aspectx, aspecty, aspectz, depth, edge, height, width
 
Constructor Summary
OF3DFlow()
           
OF3DFlow(int width, int height, int depth)
           
OF3DFlow(int width, int height, int depth, float aspectx, float aspecty, float aspectz)
           
OF3DFlow(java.lang.String fileName)
           
 
Method Summary
 float[] calcpsi(OF3DFlow oft)
           
 float[] calcpsiRotation(int centerx, int centery, float angle)
           
 float[] calcpsiTranslation(float vx, float vy, float vz)
           
 java.lang.Object get(int x, int y, int z)
           
 void normalize()
           
static float psiErr(float[] ve, float[] va)
           
 void read(java.lang.String fileName)
           
 void saveAsObject(java.lang.String defaultDirectory)
           
 void set(java.lang.Object value, int x, int y, int z)
          Set the voxel at x,y,z to value.
 void setStaticVolume(Volume vs)
          Sets a secondary static volume for which the flow has been computed.
 void subtractAverage()
           
 void translateCubeTest(float fx, float fy, float fz)
           
 void translateTest(float fx, float fy, float fz)
           
 void write(java.lang.String fileName)
           
 
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 float[][][][] v

computed

public boolean[][][] computed

vs

public Volume vs
Constructor Detail

OF3DFlow

public OF3DFlow()

OF3DFlow

public OF3DFlow(int width,
                int height,
                int depth)

OF3DFlow

public OF3DFlow(int width,
                int height,
                int depth,
                float aspectx,
                float aspecty,
                float aspectz)

OF3DFlow

public OF3DFlow(java.lang.String fileName)
Method Detail

setStaticVolume

public void setStaticVolume(Volume vs)
Sets a secondary static volume for which the flow has been computed. This volume is rendered if the flow is zero.

set

public void set(java.lang.Object value,
                int x,
                int y,
                int z)
Description copied from class: Volume
Set the voxel at x,y,z to value.
Overrides:
set in class Volume
Following copied from class: volume.Volume
Parameters:
value - a value suitable for this volume.
x, - y, z the position in the volume.

get

public java.lang.Object get(int x,
                            int y,
                            int z)
Overrides:
get in class Volume
Following copied from class: volume.Volume
Parameters:
x, - y, z the position in the volume you want the value of.
Returns:
the value of the volume at x,y,z.

calcpsiTranslation

public float[] calcpsiTranslation(float vx,
                                  float vy,
                                  float vz)

calcpsiRotation

public float[] calcpsiRotation(int centerx,
                               int centery,
                               float angle)

calcpsi

public float[] calcpsi(OF3DFlow oft)

psiErr

public static float psiErr(float[] ve,
                           float[] va)

subtractAverage

public void subtractAverage()

normalize

public void normalize()

translateCubeTest

public void translateCubeTest(float fx,
                              float fy,
                              float fz)

translateTest

public void translateTest(float fx,
                          float fy,
                          float fz)

saveAsObject

public void saveAsObject(java.lang.String defaultDirectory)

read

public void read(java.lang.String fileName)

write

public void write(java.lang.String fileName)