Package org.jmol.jvxl.readers
Class JvxlXmlReader
java.lang.Object
org.jmol.jvxl.readers.SurfaceReader
org.jmol.jvxl.readers.SurfaceFileReader
org.jmol.jvxl.readers.VolumeFileReader
org.jmol.jvxl.readers.JvxlXmlReader
- All Implemented Interfaces:
VertexDataServer
- Direct Known Subclasses:
JvxlReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected javajs.util.BS
protected int
private int
protected int
private int
private int
private int
protected boolean
(package private) boolean
private boolean
private int
protected boolean
protected String
private String
private String
protected int
(package private) String
protected boolean
private int
private float
private float
private XmlReader
Fields inherited from class org.jmol.jvxl.readers.VolumeFileReader
ac, boundingBox, canDownsample, downsampleFactor, downsampleRemainders, endOfData, isAngstroms, nData, negativeAtomCount, nSkipX, nSkipY, nSkipZ, nSurfaces, readerClosed
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, 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, vertexDataOnly, volumeData, volumetricOrigin, volumetricVectors, voxelCounts, voxelData, xyzMax, xyzMin, yzCount, yzPlanes
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
private String
protected void
retrieve Jvxl 2.0 format vertex/triangle/edge/color data found withinelement private static String
getEncoding
(String data) protected float
private float
protected float
getSurfacePointAndFraction
(float cutoff, boolean isCutoffAbsolute, float valueA, float valueB, javajs.util.T3 pointA, javajs.util.V3 edgeVector, int x, int y, int z, int vA, int vB, float[] fReturn, javajs.util.T3 ptReturn) protected javajs.util.BS
getVoxelBitSet
(int nPoints) protected boolean
gotoAndReadVoxelData
(boolean isMapData) protected void
gotoData
(int n, int nPoints) (package private) void
init2
(SurfaceGenerator sg, BufferedReader br) (package private) void
init2JXR
(SurfaceGenerator sg, BufferedReader br) protected void
jvxlDecodeContourData
(JvxlData jvxlData, String data) (package private) void
jvxlDecodeTriangleData
(String tdata, String edgeData, String colorData) decode triangle data found withinelement as created with jvxlEncodeTriangleData (see above) javajs.util.P3[]
jvxlDecodeVertexData
(String data, boolean asArray) decode vertex data found withinelement as created by jvxlEncodeVertexData (see above) private float
jvxlGetNextFraction
(int base, int range, float fracOffset) protected String
jvxlReadFractionData
(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 void
protected void
jvxlSetColorRanges
(float dataMin, float dataMax, float red, float blue, boolean insideOut) protected void
jvxlSkipData
(int nPoints, boolean doSkipColorData) protected void
protected String
protected void
protected void
readSurfaceData
(boolean isMapDataIgnored) protected void
protected boolean
protected void
readVector
(int voxelVectorIndex) protected boolean
readVolumeData
(boolean isMapData) private void
Methods inherited from class org.jmol.jvxl.readers.VolumeFileReader
checkAtomLine, closeReader, getNextVoxelValue, getPlane, getPlaneNCI, getSPFv, getValue, init2VFR, initializeSurfaceData, nextVoxel, readSurfaceDataVFR, readVolumeDataVFR, readVolumeParameters, readVoxelVector, recordData, skipComments, skipData, skipDataVFR, swapXZ
Methods inherited from class org.jmol.jvxl.readers.SurfaceFileReader
closeReaderSFR, discardTempData, getQuotedStringNext, getTokens, init, init2SFR, newBinaryDocument, parseFloat, parseFloatArray, parseFloatArrayStr, parseFloatRange, parseFloatStr, parseInt, parseIntNext, parseIntStr, rd, setOutputChannel, setStream, skipTo
Methods inherited from class org.jmol.jvxl.readers.SurfaceReader
addTriangleCheck, addVC, addVertexCopy, applyColorScale, colorIsosurface, createIsosurface, discardTempDataSR, excludeMaximumSet, excludeMinimumSet, finalizeMapping, getColorPhaseIndex, getMinMaxMappedValues, getPlaneSR, getSPF, getSurfaceAtomIndex, getSurfacePointIndexAndFraction, getValue2, getValueAtPoint, initializeMapping, initializeVolumetricData, initPlanes, initSR, jvxlUpdateInfo, newVoxelDataCube, readAndSetVolumeParameters, resetIsosurface, selectPocket, setBBox, setVectorAnisotropy, setVertexAnisotropy, setVolumeDataV, setVolumetricAnisotropy, setVolumetricOriginAnisotropy, slabIsosurface, updateSurfaceData, updateTriangles
-
Field Details
-
JVXL_VERSION
-
surfaceDataCount
protected int surfaceDataCount -
edgeDataCount
protected int edgeDataCount -
colorDataCount
protected int colorDataCount -
excludedTriangleCount
private int excludedTriangleCount -
excludedVertexCount
private int excludedVertexCount -
invalidatedVertexCount
private int invalidatedVertexCount -
haveContourData
protected boolean haveContourData -
xr
-
isXmlFile
protected boolean isXmlFile -
thisInside
protected boolean thisInside -
tempDataXml
String tempDataXml -
bsVoxelBitSet
protected javajs.util.BS bsVoxelBitSet -
includeValueNaN
private boolean includeValueNaN -
valueCount
private int valueCount -
valueMin
private float valueMin -
valueRange
private float valueRange -
fractionPtr
private int fractionPtr -
colorPtr
private int colorPtr -
strFractionTemp
-
haveReadColorData
boolean haveReadColorData -
jvxlColorEncodingRead
-
-
Constructor Details
-
JvxlXmlReader
JvxlXmlReader()
-
-
Method Details
-
init2
- Overrides:
init2
in classVolumeFileReader
-
init2JXR
-
readVolumeData
protected boolean readVolumeData(boolean isMapData) - Overrides:
readVolumeData
in classVolumeFileReader
-
gotoAndReadVoxelData
protected boolean gotoAndReadVoxelData(boolean isMapData) - Overrides:
gotoAndReadVoxelData
in classSurfaceReader
-
readParameters
- Specified by:
readParameters
in classVolumeFileReader
- Throws:
Exception
-
getJVXLCutoff
protected float getJVXLCutoff()- Overrides:
getJVXLCutoff
in classVolumeFileReader
-
readVector
- Throws:
Exception
-
gotoData
- Overrides:
gotoData
in classVolumeFileReader
- Parameters:
n
-nPoints
-- Throws:
Exception
-
jvxlSkipData
- Throws:
Exception
-
jvxlReadSurfaceInfo
- Throws:
Exception
-
jvxlSetColorRanges
protected void jvxlSetColorRanges(float dataMin, float dataMax, float red, float blue, boolean insideOut) -
readSurfaceData
- Overrides:
readSurfaceData
in classVolumeFileReader
- Throws:
Exception
-
readSurfaceDataXML
- Throws:
Exception
-
readSurfaceDataJXR
- Throws:
Exception
-
jvxlReadFractionData
"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.- Parameters:
type
-nPoints
-- Returns:
- data
-
getVoxelBitSet
- Overrides:
getVoxelBitSet
in classVolumeFileReader
- Parameters:
nPoints
-- Returns:
- JVXL bitset
- Throws:
Exception
-
getSurfacePointAndFraction
protected float getSurfacePointAndFraction(float cutoff, boolean isCutoffAbsolute, float valueA, float valueB, javajs.util.T3 pointA, javajs.util.V3 edgeVector, int x, int y, int z, int vA, int vB, float[] fReturn, javajs.util.T3 ptReturn) - Overrides:
getSurfacePointAndFraction
in classVolumeFileReader
-
getNextValue
private float getNextValue() -
setValueMinMax
private void setValueMinMax() -
jvxlGetNextFraction
private float jvxlGetNextFraction(int base, int range, float fracOffset) -
readColorData
- Overrides:
readColorData
in classSurfaceReader
-
getColor
-
getEncodedVertexData
retrieve Jvxl 2.0 format vertex/triangle/edge/color data found withinelement - Throws:
Exception
-
getData
- Throws:
Exception
-
getEncoding
-
jvxlDecodeVertexData
decode vertex data found withinelement as created by jvxlEncodeVertexData (see above) - Parameters:
data
- tag and contentsasArray
- or just addVertexCopy- Returns:
- Point3f[] if desired
- Throws:
Exception
-
jvxlDecodeTriangleData
decode triangle data found withinelement as created with jvxlEncodeTriangleData (see above) - Parameters:
tdata
- tag and contentsedgeData
-colorData
-- Throws:
Exception
-
jvxlDecodeContourData
- Throws:
Exception
-
postProcessVertices
protected void postProcessVertices()- Overrides:
postProcessVertices
in classSurfaceReader
-