org.jmol.jvxl.readers
Class VolumeFileReader
java.lang.Object
org.jmol.jvxl.readers.SurfaceReader
org.jmol.jvxl.readers.SurfaceFileReader
org.jmol.jvxl.readers.VolumeFileReader
- All Implemented Interfaces:
- VertexDataServer
- Direct Known Subclasses:
- ApbsReader, CastepDensityReader, CubeReader, JaguarReader, JvxlXmlReader, MapFileReader, PltFormattedReader
abstract class VolumeFileReader
- extends SurfaceFileReader
| Fields inherited from class org.jmol.jvxl.readers.SurfaceReader |
allowSigma, ANGSTROMS_PER_BOHR, anisotropy, center, cJvxlEdgeNaN, colorFractionBase, colorFractionRange, contourVertexCount, dataMax, dataMean, dataMin, defaultCutoff, defaultMappedDataMax, defaultMappedDataMin, eccentricityMatrix, eccentricityMatrixInverse, eccentricityRatio, eccentricityScale, edgeFractionBase, edgeFractionRange, fractionData, hasColorData, haveSurfaceAtoms, isAnisotropic, isEccentric, isJvxl, isProgressive, isQuiet, isXLowToHigh, jvxlColorDataRead, jvxlCutoff, jvxlData, jvxlDataIs2dContour, jvxlDataIsColorDensity, jvxlDataIsColorMapped, jvxlDataIsPrecisionColor, jvxlEdgeDataRead, jvxlFileHeaderBuffer, jvxlNSurfaceInts, jvxlVoxelBitSet, marchingCubes, marchingSquares, meshData, meshDataServer, minMax, nBytes, nDataPoints, nPointsX, nPointsY, nPointsZ, params, ptTemp, qpc, sg, vertexDataOnly, volumeData, volumetricOrigin, volumetricVectors, voxelCounts, voxelData, xyzMax, xyzMin, yzCount, yzPlanes |
|
Method Summary |
protected static boolean |
checkAtomLine(boolean isXLowToHigh,
boolean isAngstroms,
String strAtomCount,
String atomLine,
StringBuffer bs)
checks an atom line for "ANGSTROMS", possibly overriding the data's natural
units, BOHR (similar to Gaussian CUBE files). |
protected void |
closeReader()
|
private int |
countData(String str)
|
protected float |
getNextVoxelValue()
|
private void |
getPlane(float[] plane,
boolean doRecord)
|
float[] |
getPlane(int x)
|
float[] |
getPlaneProcessed(int x)
Retrieve raw file planes and pass them to the calculation object for
processing into new data. |
protected float |
getSurfacePointAndFraction(float cutoff,
boolean isCutoffAbsolute,
float valueA,
float valueB,
Point3f pointA,
Vector3f edgeVector,
int x,
int y,
int z,
int vA,
int vB,
float[] fReturn,
Point3f ptReturn)
|
float |
getValue(int x,
int y,
int z,
int ptyz)
for readers only |
protected BitSet |
getVoxelBitSet(int nPoints)
|
protected void |
gotoData(int n,
int nPoints)
|
protected void |
initializeSurfaceData()
|
protected float |
nextVoxel()
|
protected abstract void |
readParameters()
|
protected void |
readSurfaceData(boolean isMapData)
|
protected boolean |
readVolumeData(boolean isMapData)
|
protected boolean |
readVolumeParameters(boolean isMapData)
|
private int |
readVolumetricHeader()
|
protected void |
readVoxelVector(int voxelVectorIndex)
|
protected float |
recordData(float value)
|
protected String |
skipComments(boolean allowBlankLines)
|
protected void |
skipData(int nPoints)
|
private void |
skipVoxels(int n)
|
| Methods inherited from class org.jmol.jvxl.readers.SurfaceFileReader |
discardTempData, getNextQuotedString, getTokens, parseFloat, parseFloat, parseFloatArray, parseFloatArray, parseInt, parseInt, parseIntNext, readLine, setOutputStream, skipTo |
| Methods inherited from class org.jmol.jvxl.readers.SurfaceReader |
addTriangleCheck, addVertexCopy, applyColorScale, colorIsosurface, createIsosurface, excludeMaximumSet, excludeMinimumSet, finalizeMapping, getColorPhaseIndex, getMinMaxMappedValues, getSurfaceAtomIndex, getSurfacePointIndexAndFraction, getValueAtPoint, gotoAndReadVoxelData, initializeMapping, initializeVolumetricData, initPlanes, jvxlUpdateInfo, newVoxelDataCube, postProcessVertices, readAndSetVolumeParameters, readColorData, resetIsosurface, selectPocket, setBoundingBox, setVectorAnisotropy, setVertexAnisotropy, setVolumeData, setVolumetricAnisotropy, setVolumetricOriginAnisotropy, slabIsosurface, updateSurfaceData, updateTriangles |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
endOfData
protected boolean endOfData
negativeAtomCount
protected boolean negativeAtomCount
atomCount
protected int atomCount
nSurfaces
protected int nSurfaces
isAngstroms
protected boolean isAngstroms
canDownsample
protected boolean canDownsample
downsampleRemainders
private int[] downsampleRemainders
preProcessPlanes
private boolean preProcessPlanes
nData
private int nData
readerClosed
boolean readerClosed
thePlane
Point4f thePlane
downsampleFactor
protected int downsampleFactor
nSkipX
private int nSkipX
nSkipY
private int nSkipY
nSkipZ
private int nSkipZ
yzPlanesRaw
private float[][] yzPlanesRaw
iPlaneRaw
private int iPlaneRaw
boundingBox
protected Point3f[] boundingBox
VolumeFileReader
VolumeFileReader(SurfaceGenerator sg,
BufferedReader br)
recordData
protected float recordData(float value)
closeReader
protected void closeReader()
- Overrides:
closeReader in class SurfaceFileReader
readVolumeParameters
protected boolean readVolumeParameters(boolean isMapData)
- Specified by:
readVolumeParameters in class SurfaceReader
readVolumeData
protected boolean readVolumeData(boolean isMapData)
- Specified by:
readVolumeData in class SurfaceReader
readVolumetricHeader
private int readVolumetricHeader()
readParameters
protected abstract void readParameters()
throws Exception
- Throws:
Exception
skipComments
protected String skipComments(boolean allowBlankLines)
throws Exception
- Throws:
Exception
readVoxelVector
protected void readVoxelVector(int voxelVectorIndex)
throws Exception
- Throws:
Exception
initializeSurfaceData
protected void initializeSurfaceData()
readSurfaceData
protected void readSurfaceData(boolean isMapData)
throws Exception
- Specified by:
readSurfaceData in class SurfaceReader
- Throws:
Exception
getPlane
public float[] getPlane(int x)
- Specified by:
getPlane in interface VertexDataServer- Overrides:
getPlane in class SurfaceReader
getPlaneProcessed
public float[] getPlaneProcessed(int x)
- Retrieve raw file planes and pass them to the calculation object for
processing into new data.
Bob Hanson hansonr@stolaf.edu 6/7/2011
- Parameters:
x -
- Returns:
- plane (for testing)
getPlane
private void getPlane(float[] plane,
boolean doRecord)
getValue
public float getValue(int x,
int y,
int z,
int ptyz)
- Description copied from interface:
VertexDataServer
- for readers only
- Specified by:
getValue in interface VertexDataServer- Overrides:
getValue in class SurfaceReader
- Returns:
- value[x][y][z]
skipVoxels
private void skipVoxels(int n)
throws Exception
- Throws:
Exception
getVoxelBitSet
protected BitSet getVoxelBitSet(int nPoints)
throws Exception
- Parameters:
nPoints -
- Returns:
- JVXL bitset
- Throws:
Exception
getNextVoxelValue
protected float getNextVoxelValue()
throws Exception
- Throws:
Exception
nextVoxel
protected float nextVoxel()
throws Exception
- Throws:
Exception
gotoData
protected void gotoData(int n,
int nPoints)
throws Exception
- Overrides:
gotoData in class SurfaceReader
- Throws:
Exception
skipData
protected void skipData(int nPoints)
throws Exception
- Throws:
Exception
countData
private int countData(String str)
checkAtomLine
protected static boolean checkAtomLine(boolean isXLowToHigh,
boolean isAngstroms,
String strAtomCount,
String atomLine,
StringBuffer bs)
- checks an atom line for "ANGSTROMS", possibly overriding the data's natural
units, BOHR (similar to Gaussian CUBE files).
- Parameters:
isXLowToHigh - isAngstroms - strAtomCount - atomLine - bs -
- Returns:
- isAngstroms
getSurfacePointAndFraction
protected float getSurfacePointAndFraction(float cutoff,
boolean isCutoffAbsolute,
float valueA,
float valueB,
Point3f pointA,
Vector3f edgeVector,
int x,
int y,
int z,
int vA,
int vB,
float[] fReturn,
Point3f ptReturn)
- Overrides:
getSurfacePointAndFraction in class SurfaceReader
x - TODOy - TODOz - TODO
- Returns:
- fractional distance from A to B