Package org.jmol.jvxl.readers
Class JvxlReader
java.lang.Object
org.jmol.jvxl.readers.SurfaceReader
org.jmol.jvxl.readers.JvxlXmlReader
org.jmol.jvxl.readers.JvxlReader
- All Implemented Interfaces:
VertexDataServer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected GenericBinaryDocumentprotected P3[]protected BufferedReaderprotected booleanprotected intprotected int[]protected booleanprotected booleanprotected Stringprotected intprotected booleanprotected int[]protected intprotected intprotected intprotected intprotected OCprotected booleanFields inherited from class org.jmol.jvxl.readers.JvxlXmlReader
bsVoxelBitSet, colorDataCount, edgeDataCount, haveContourData, isXmlFile, JVXL_VERSION, surfaceDataCount, thisInsideFields inherited from class org.jmol.jvxl.readers.SurfaceReader
allowSigma, anisotropy, center, cJvxlEdgeNaN, colorFractionBase, colorFractionRange, contourVertexCount, dataMax, dataMean, dataMin, eccentricityMatrix, eccentricityMatrixInverse, eccentricityRatio, eccentricityScale, edgeFractionBase, edgeFractionRange, fractionData, haveSurfaceAtoms, isAnisotropic, isEccentric, isJvxl, isPeriodic, isProgressive, isQuiet, isXLowToHigh, jvxlColorDataRead, jvxlCutoff, jvxlCutoffRange, jvxlData, jvxlDataIs2dContour, jvxlDataIsColorDensity, jvxlDataIsColorMapped, jvxlDataIsPrecisionColor, jvxlEdgeDataRead, jvxlFileHeaderBuffer, jvxlNSurfaceInts, jvxlVoxelBitSet, marchingCubes, marchingSquares, meshData, meshDataServer, minMax, nBytes, nDataPoints, nPointsX, nPointsY, nPointsZ, params, ptTemp, qpc, sg, volumetricOrigin, volumetricVectors, voxelCounts, voxelData, xyzMax, xyzMin, yzCount, yzPlanes -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleancheckAtomLine(boolean isXLowToHigh, boolean isAngstroms, String strAtomCount, String atomLine, SB bs) checks an atom line for "ANGSTROMS", possibly overriding the data's natural units, BOHR (similar to Gaussian CUBE files).protected voidprotected voidprotected floatfloat[]getPlane(int x) float[]getPlaneNCI(int x) Retrieve raw file planes and pass them to the calculation object for processing into new data.protected Stringprotected floatgetSPFv(float cutoff, boolean isCutoffAbsolute, float valueA, float valueB, T3 pointA, V3 edgeVector, int x, int y, int z, int vA, int vB, float[] fReturn, T3 ptReturn) protected String[]floatgetValue(int x, int y, int z, int ptyz) for readers onlyprotected voidgotoData(int n, int nPoints) protected StringjvxlReadFractionData(String type, int nPoints) "edge" data includes two parts -- a compressed bitset indicating exactly which edges, in order or processing by Jmol, are crossed by the surface, and a set of fractions indicating how far along that edge (good to 1 part in 8100) that surface crosses that edge.protected voidjvxlSkipData(int nPoints, boolean doSkipColorData) protected floatprotected floatprotected float[]parseFloatArray(float[] a, String strStart, String strEnd) protected float[]protected floatparseFloatRange(String s, int iStart, int iEnd) protected floatprotected intparseInt()protected intprotected intprotected Stringrd()protected voidprotected voidreadSurfaceData(boolean isMapDataIgnored) protected voidreadSurfaceDataVFR(boolean isMapData) protected booleanreadVolumeDataVFR(boolean isMapData) protected booleanreadVolumeParameters(boolean isMapData) protected voidreadVoxelVector(int voxelVectorIndex) protected floatrecordData(float value) protected voidsetOutputChannel(OC out) protected voidprotected StringskipComments(boolean allowBlankLines) protected voidskipData(int nPoints) protected voidskipDataVFR(int nPoints) protected voidprotected voidswapXZ()Methods inherited from class org.jmol.jvxl.readers.JvxlXmlReader
getEncodedVertexData, getJVXLCutoff, getSurfacePointAndFraction, getVertexColorData, getVoxelBitSet, gotoAndReadVoxelData, jvxlDecodeContourData, jvxlDecodeVertexData, jvxlReadSurfaceInfo, jvxlSetColorRanges, postProcessVertices, readColorData, readSurfaceDataJXR, readSurfaceDataXML, readVector, readVolumeDataMethods inherited from class org.jmol.jvxl.readers.SurfaceReader
addTriangleCheck, addVC, addVertexCopy, discardTempDataSR, finalizeMapping, getMinMaxMappedValues, getPlaneSR, getSPF, getSurfaceAtomIndex, getSurfacePointIndexAndFraction, getValue2, getValueAtPoint, newVoxelDataCube, selectPocket, setBBox, setVectorAnisotropy, setVertexAnisotropy, setVolumeDataV, setVolumetricAnisotropy, setVolumetricOriginAnisotropy, slabIsosurface
-
Field Details
-
endOfData
protected boolean endOfData -
negativeAtomCount
protected boolean negativeAtomCount -
ac
protected int ac -
nSurfaces
protected int nSurfaces -
isAngstroms
protected boolean isAngstroms -
canDownsample
protected boolean canDownsample -
downsampleRemainders
protected int[] downsampleRemainders -
nData
protected int nData -
readerClosed
protected boolean readerClosed -
downsampleFactor
protected int downsampleFactor -
nSkipX
protected int nSkipX -
nSkipY
protected int nSkipY -
nSkipZ
protected int nSkipZ -
boundingBox
-
br
-
binarydoc
-
out
-
line
-
next
protected int[] next
-
-
Method Details
-
readParameters
- Overrides:
readParametersin classJvxlXmlReader- Throws:
Exception
-
jvxlReadFractionData
Description copied from class:JvxlXmlReader"edge" data includes two parts -- a compressed bitset indicating exactly which edges, in order or processing by Jmol, are crossed by the surface, and a set of fractions indicating how far along that edge (good to 1 part in 8100) that surface crosses that edge. We are just reading he fractions here. "color" data comprises the corresponding sequence of data mapping values, again stored to a precision of 1 part in 8100, relative to a range of values.- Overrides:
jvxlReadFractionDatain classJvxlXmlReader- Parameters:
type-nPoints-- Returns:
- data
-
gotoData
- Overrides:
gotoDatain classJvxlXmlReader- Parameters:
n-nPoints-- Throws:
Exception
-
readSurfaceData
- Overrides:
readSurfaceDatain classJvxlXmlReader- Throws:
Exception
-
jvxlSkipData
- Overrides:
jvxlSkipDatain classJvxlXmlReader- Throws:
Exception
-
recordData
protected float recordData(float value) -
closeReader
protected void closeReader() -
readVolumeParameters
protected boolean readVolumeParameters(boolean isMapData) - Specified by:
readVolumeParametersin classSurfaceReader
-
readVolumeDataVFR
protected boolean readVolumeDataVFR(boolean isMapData) -
skipComments
- Throws:
Exception
-
readVoxelVector
- Throws:
Exception
-
readSurfaceDataVFR
- Throws:
Exception
-
getPlane
public float[] getPlane(int x) - Specified by:
getPlanein interfaceVertexDataServer- Overrides:
getPlanein classSurfaceReader
-
getPlaneNCI
public float[] getPlaneNCI(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)
-
getValue
public float getValue(int x, int y, int z, int ptyz) Description copied from interface:VertexDataServerfor readers only- Specified by:
getValuein interfaceVertexDataServer- Overrides:
getValuein classSurfaceReader- Parameters:
x-y-z-ptyz-- Returns:
- value[x][y][z]
-
getNextVoxelValue
- Throws:
Exception
-
nextVoxel
- Throws:
Exception
-
skipData
- Throws:
Exception
-
skipDataVFR
- Throws:
Exception
-
checkAtomLine
protected static boolean checkAtomLine(boolean isXLowToHigh, boolean isAngstroms, String strAtomCount, String atomLine, SB 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
-
getSPFv
-
swapXZ
protected void swapXZ() -
setStream
-
setOutputChannel
- Overrides:
setOutputChannelin classSurfaceReader- Parameters:
out-
-
closeReaderSFR
protected void closeReaderSFR() -
getTokens
-
parseFloat
protected float parseFloat() -
parseFloatStr
-
parseFloatRange
-
parseInt
protected int parseInt() -
parseIntStr
-
parseIntNext
-
parseFloatArrayStr
-
parseFloatArray
-
getQuotedStringNext
-
skipTo
- Throws:
Exception
-
rd
- Throws:
Exception
-