org.jmol.jvxl.data
Class VolumeData

java.lang.Object
  extended by org.jmol.jvxl.data.VolumeData
All Implemented Interfaces:
VolumeDataInterface

public class VolumeData
extends java.lang.Object
implements VolumeDataInterface


Field Summary
 boolean doIterate
           
private  javax.vecmath.Vector3f edgeVector
           
private  javax.vecmath.Matrix3f inverseMatrix
           
private  boolean isSquared
           
(package private)  javax.vecmath.Point4f mappingPlane
           
private  float maxVectorLength
           
private  float minToPlaneDistance
           
 int nPoints
           
 float[] origin
           
private  javax.vecmath.Point3f ptTemp
           
private  javax.vecmath.Point3f ptXyzTemp
           
 SurfaceReader sr
           
private  javax.vecmath.Point4f thePlane
           
private  float thePlaneNormalMag
           
 javax.vecmath.Vector3f[] unitVolumetricVectors
           
private  javax.vecmath.Matrix3f volumetricMatrix
           
 javax.vecmath.Point3f volumetricOrigin
           
 float[] volumetricVectorLengths
           
 javax.vecmath.Vector3f[] volumetricVectors
           
 int[] voxelCounts
           
 float[][][] voxelData
           
 java.util.Hashtable voxelMap
           
 java.lang.String xmlData
           
 
Constructor Summary
VolumeData()
           
 
Method Summary
 float calculateFractionalPoint(float cutoff, javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, float valueA, float valueB, javax.vecmath.Point3f pt)
           
 float calcVoxelPlaneDistance(int x, int y, int z)
           
 void capData(javax.vecmath.Point4f plane, float cutoff)
           
 float distancePointToPlane(javax.vecmath.Point3f pt)
           
 void filterData(boolean isSquared, float invertCutoff)
           
static float getFractional2DValue(float fx, float fy, float x11, float x12, float x21, float x22)
           
private  float getInterpolatedVoxelValue(javax.vecmath.Point3f pt)
           
 float[] getOriginFloat()
           
 float getToPlaneParameter(javax.vecmath.Point4f plane)
           
 float[] getVolumetricVectorLengths()
           
 int[] getVoxelCounts()
           
 float[][][] getVoxelData()
           
 java.util.Hashtable getVoxelMap()
           
 float getVoxelValue(int x, int y, int z)
           
 float getVoxelValueFromMap(int x, int y, int z)
           
private static int indexDown(float value, int iMax)
           
 boolean isNearPlane(int x, int y, int z, javax.vecmath.Point4f plane, float toPlaneParameter)
           
 float lookupInterpolatedVoxelValue(javax.vecmath.Point3f point)
           
(package private)  void offsetCenter(javax.vecmath.Point3f center)
           
 void setDataDistanceToPlane(javax.vecmath.Point4f plane)
           
 boolean setMatrix()
           
 void setPlaneParameters(javax.vecmath.Point4f plane)
           
 boolean setUnitVectors()
           
 void setVolumetricOrigin(float x, float y, float z)
           
 void setVolumetricVector(int i, float x, float y, float z)
           
 java.lang.String setVolumetricXml()
           
 int setVoxelCounts(int nPointsX, int nPointsY, int nPointsZ)
           
 void setVoxelData(float[][][] voxelData)
           
 void setVoxelMap(java.util.Hashtable voxelMap)
           
 void setVoxelMapValue(int x, int y, int z, float v)
          for sparse data mapping, as for a plane
 void transform(javax.vecmath.Vector3f v1, javax.vecmath.Vector3f v2)
           
 void voxelPtToXYZ(int x, int y, int z, javax.vecmath.Point3f pt)
           
 void xyzToVoxelPt(float x, float y, float z, javax.vecmath.Point3i pt3i)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sr

public SurfaceReader sr

doIterate

public boolean doIterate

volumetricOrigin

public final javax.vecmath.Point3f volumetricOrigin

origin

public final float[] origin

volumetricVectors

public final javax.vecmath.Vector3f[] volumetricVectors

voxelCounts

public final int[] voxelCounts

nPoints

public int nPoints

voxelData

public float[][][] voxelData

voxelMap

public java.util.Hashtable voxelMap

volumetricVectorLengths

public final float[] volumetricVectorLengths

maxVectorLength

private float maxVectorLength

minToPlaneDistance

private float minToPlaneDistance

unitVolumetricVectors

public final javax.vecmath.Vector3f[] unitVolumetricVectors

volumetricMatrix

private final javax.vecmath.Matrix3f volumetricMatrix

inverseMatrix

private final javax.vecmath.Matrix3f inverseMatrix

thePlane

private javax.vecmath.Point4f thePlane

thePlaneNormalMag

private float thePlaneNormalMag

ptXyzTemp

private final javax.vecmath.Point3f ptXyzTemp

xmlData

public java.lang.String xmlData

mappingPlane

javax.vecmath.Point4f mappingPlane

isSquared

private boolean isSquared

edgeVector

private final javax.vecmath.Vector3f edgeVector

ptTemp

private javax.vecmath.Point3f ptTemp
Constructor Detail

VolumeData

public VolumeData()
Method Detail

setVolumetricOrigin

public void setVolumetricOrigin(float x,
                                float y,
                                float z)
Specified by:
setVolumetricOrigin in interface VolumeDataInterface

getOriginFloat

public float[] getOriginFloat()
Specified by:
getOriginFloat in interface VolumeDataInterface

getVolumetricVectorLengths

public float[] getVolumetricVectorLengths()
Specified by:
getVolumetricVectorLengths in interface VolumeDataInterface

setVolumetricVector

public void setVolumetricVector(int i,
                                float x,
                                float y,
                                float z)
Specified by:
setVolumetricVector in interface VolumeDataInterface

getVoxelCounts

public int[] getVoxelCounts()
Specified by:
getVoxelCounts in interface VolumeDataInterface

setVoxelCounts

public int setVoxelCounts(int nPointsX,
                          int nPointsY,
                          int nPointsZ)
Specified by:
setVoxelCounts in interface VolumeDataInterface

getVoxelData

public float[][][] getVoxelData()
Specified by:
getVoxelData in interface VolumeDataInterface

setVoxelData

public void setVoxelData(float[][][] voxelData)
Specified by:
setVoxelData in interface VolumeDataInterface

getVoxelMap

public java.util.Hashtable getVoxelMap()

setVoxelMap

public void setVoxelMap(java.util.Hashtable voxelMap)

getVoxelValueFromMap

public float getVoxelValueFromMap(int x,
                                  int y,
                                  int z)

setMatrix

public boolean setMatrix()

transform

public void transform(javax.vecmath.Vector3f v1,
                      javax.vecmath.Vector3f v2)
Specified by:
transform in interface VolumeDataInterface

setPlaneParameters

public void setPlaneParameters(javax.vecmath.Point4f plane)
Specified by:
setPlaneParameters in interface VolumeDataInterface

calcVoxelPlaneDistance

public float calcVoxelPlaneDistance(int x,
                                    int y,
                                    int z)
Specified by:
calcVoxelPlaneDistance in interface VolumeDataInterface

getToPlaneParameter

public float getToPlaneParameter(javax.vecmath.Point4f plane)

isNearPlane

public boolean isNearPlane(int x,
                           int y,
                           int z,
                           javax.vecmath.Point4f plane,
                           float toPlaneParameter)

distancePointToPlane

public float distancePointToPlane(javax.vecmath.Point3f pt)
Specified by:
distancePointToPlane in interface VolumeDataInterface

voxelPtToXYZ

public void voxelPtToXYZ(int x,
                         int y,
                         int z,
                         javax.vecmath.Point3f pt)
Specified by:
voxelPtToXYZ in interface VolumeDataInterface

setUnitVectors

public boolean setUnitVectors()

xyzToVoxelPt

public void xyzToVoxelPt(float x,
                         float y,
                         float z,
                         javax.vecmath.Point3i pt3i)
Specified by:
xyzToVoxelPt in interface VolumeDataInterface

lookupInterpolatedVoxelValue

public float lookupInterpolatedVoxelValue(javax.vecmath.Point3f point)
Specified by:
lookupInterpolatedVoxelValue in interface VolumeDataInterface

getInterpolatedVoxelValue

private float getInterpolatedVoxelValue(javax.vecmath.Point3f pt)

getVoxelValue

public float getVoxelValue(int x,
                           int y,
                           int z)

getFractional2DValue

public static float getFractional2DValue(float fx,
                                         float fy,
                                         float x11,
                                         float x12,
                                         float x21,
                                         float x22)

indexDown

private static int indexDown(float value,
                             int iMax)

offsetCenter

void offsetCenter(javax.vecmath.Point3f center)

setDataDistanceToPlane

public void setDataDistanceToPlane(javax.vecmath.Point4f plane)
Specified by:
setDataDistanceToPlane in interface VolumeDataInterface

filterData

public void filterData(boolean isSquared,
                       float invertCutoff)
Specified by:
filterData in interface VolumeDataInterface

capData

public void capData(javax.vecmath.Point4f plane,
                    float cutoff)
Specified by:
capData in interface VolumeDataInterface

setVolumetricXml

public java.lang.String setVolumetricXml()

setVoxelMapValue

public void setVoxelMapValue(int x,
                             int y,
                             int z,
                             float v)
for sparse data mapping, as for a plane

Parameters:
x -
y -
z -
v -

calculateFractionalPoint

public float calculateFractionalPoint(float cutoff,
                                      javax.vecmath.Point3f pointA,
                                      javax.vecmath.Point3f pointB,
                                      float valueA,
                                      float valueB,
                                      javax.vecmath.Point3f pt)