org.jmol.jvxl.readers
Class JvxlXmlReader

java.lang.Object
  extended by org.jmol.jvxl.readers.SurfaceReader
      extended by org.jmol.jvxl.readers.SurfaceFileReader
          extended by org.jmol.jvxl.readers.VolumeFileReader
              extended by org.jmol.jvxl.readers.JvxlXmlReader
All Implemented Interfaces:
VertexDataServer
Direct Known Subclasses:
JvxlReader

public class JvxlXmlReader
extends VolumeFileReader


Field Summary
protected  BitSet bsVoxelBitSet
           
protected  int colorDataCount
           
private  int colorPtr
           
protected  int edgeDataCount
           
private  int excludedTriangleCount
           
private  int excludedVertexCount
           
private  int fractionPtr
           
protected  boolean haveContourData
           
(package private)  boolean haveReadColorData
           
private  boolean includeValueNaN
           
private  int invalidatedVertexCount
           
protected  boolean isXmlFile
           
protected  String JVXL_VERSION
           
private  String strFractionTemp
           
protected  int surfaceDataCount
           
(package private)  String tempDataXml
           
protected  boolean thisInside
           
private  int valueCount
           
private  float valueMin
           
private  float valueRange
           
private  XmlReader xr
           
 
Fields inherited from class org.jmol.jvxl.readers.VolumeFileReader
atomCount, boundingBox, canDownsample, endOfData, isAngstroms, negativeAtomCount, nSurfaces, readerClosed, thePlane
 
Fields inherited from class org.jmol.jvxl.readers.SurfaceFileReader
binarydoc, br, line, next, os
 
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, isAnisotropic, isEccentric, isJvxl, isProgressive, isXLowToHigh, jvxlColorDataRead, jvxlCutoff, jvxlData, jvxlDataIs2dContour, jvxlDataIsColorMapped, jvxlDataIsPrecisionColor, jvxlEdgeDataRead, jvxlFileHeaderBuffer, jvxlNSurfaceInts, jvxlVoxelBitSet, mappingPlane, marchingSquares, meshData, meshDataServer, minMax, nBytes, nDataPoints, nPointsX, nPointsY, nPointsZ, params, ptTemp, sg, vertexDataOnly, volumeData, volumetricOrigin, volumetricVectors, voxelCounts, voxelData, xyzMax, xyzMin
 
Constructor Summary
JvxlXmlReader(SurfaceGenerator sg, BufferedReader br)
           
 
Method Summary
protected  void getEncodedVertexData()
          retrieve Jvxl 2.0 format vertex/triangle/color data found within element
private  float getNextValue()
           
protected  float getSurfacePointAndFraction(float cutoff, boolean isCutoffAbsolute, float valueA, float valueB, Point3f pointA, Vector3f edgeVector, float[] fReturn, Point3f ptReturn)
           
protected  BitSet getVoxelBitSet(int nPoints)
           
protected  boolean gotoAndReadVoxelData(boolean isMapData)
           
protected  void gotoData(int n, int nPoints)
           
protected  void jvxlDecodeContourData(JvxlData jvxlData, String data)
           
(package private)  int[][] jvxlDecodeTriangleData(String data, String colorData)
          decode triangle data found within element as created with jvxlEncodeTriangleData (see above)
 Point3f[] jvxlDecodeVertexData(String data, boolean asArray)
          decode vertex data found within element as created by jvxlEncodeVertexData (see above)
private  float jvxlGetNextFraction(int base, int range, float fracOffset)
           
protected  String jvxlReadData(String type, int nPoints)
           
protected  void jvxlReadSurfaceInfo()
           
protected  void jvxlSetColorRanges(float dataMin, float dataMax, float red, float blue, boolean insideOut)
           
protected  void jvxlSkipData(int nPoints, boolean doSkipColorData)
           
protected  void postProcessVertices()
           
protected  String readColorData()
           
protected  void readParameters()
           
protected  boolean readSurfaceData()
           
protected  void readSurfaceData(boolean isMapDataIgnored)
           
protected  void readVector(int voxelVectorIndex)
           
protected  boolean readVolumeData(boolean isMapData)
           
protected  void readVolumeFileSurfaceData()
           
private  void setValueMinMax()
           
 
Methods inherited from class org.jmol.jvxl.readers.VolumeFileReader
checkAtomLine, closeReader, getNextVoxelValue, getPlane, getValue, nextVoxel, readVolumeParameters, readVoxelVector, recordData, skipComments, skipData
 
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, getSurfacePointIndexAndFraction, getValueAtPoint, initializeMapping, initializeVolumetricData, jvxlUpdateInfo, readAndSetVolumeParameters, readTheVolumeData, resetIsosurface, selectPocket, setBoundingBox, setMappingPlane, 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
 

Field Detail

JVXL_VERSION

protected String 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

private XmlReader xr

isXmlFile

protected boolean isXmlFile

thisInside

protected boolean thisInside

tempDataXml

String tempDataXml

bsVoxelBitSet

protected BitSet 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

private String strFractionTemp

haveReadColorData

boolean haveReadColorData
Constructor Detail

JvxlXmlReader

JvxlXmlReader(SurfaceGenerator sg,
              BufferedReader br)
Method Detail

readVolumeData

protected boolean readVolumeData(boolean isMapData)
Overrides:
readVolumeData in class VolumeFileReader

gotoAndReadVoxelData

protected boolean gotoAndReadVoxelData(boolean isMapData)
Overrides:
gotoAndReadVoxelData in class SurfaceReader

readParameters

protected void readParameters()
                       throws Exception
Specified by:
readParameters in class VolumeFileReader
Throws:
Exception

readVector

protected void readVector(int voxelVectorIndex)
                   throws Exception
Throws:
Exception

gotoData

protected void gotoData(int n,
                        int nPoints)
                 throws Exception
Overrides:
gotoData in class VolumeFileReader
Throws:
Exception

jvxlSkipData

protected void jvxlSkipData(int nPoints,
                            boolean doSkipColorData)
                     throws Exception
Throws:
Exception

jvxlReadSurfaceInfo

protected void jvxlReadSurfaceInfo()
                            throws Exception
Throws:
Exception

jvxlSetColorRanges

protected void jvxlSetColorRanges(float dataMin,
                                  float dataMax,
                                  float red,
                                  float blue,
                                  boolean insideOut)

readSurfaceData

protected void readSurfaceData(boolean isMapDataIgnored)
                        throws Exception
Overrides:
readSurfaceData in class VolumeFileReader
Throws:
Exception

readSurfaceData

protected boolean readSurfaceData()
                           throws Exception
Throws:
Exception

readVolumeFileSurfaceData

protected void readVolumeFileSurfaceData()
                                  throws Exception
Throws:
Exception

jvxlReadData

protected String jvxlReadData(String type,
                              int nPoints)

getVoxelBitSet

protected BitSet getVoxelBitSet(int nPoints)
                         throws Exception
Overrides:
getVoxelBitSet in class VolumeFileReader
Throws:
Exception

getSurfacePointAndFraction

protected float getSurfacePointAndFraction(float cutoff,
                                           boolean isCutoffAbsolute,
                                           float valueA,
                                           float valueB,
                                           Point3f pointA,
                                           Vector3f edgeVector,
                                           float[] fReturn,
                                           Point3f ptReturn)
Overrides:
getSurfacePointAndFraction in class SurfaceReader

getNextValue

private float getNextValue()

setValueMinMax

private void setValueMinMax()

jvxlGetNextFraction

private float jvxlGetNextFraction(int base,
                                  int range,
                                  float fracOffset)

readColorData

protected String readColorData()
Overrides:
readColorData in class SurfaceReader

getEncodedVertexData

protected void getEncodedVertexData()
                             throws Exception
retrieve Jvxl 2.0 format vertex/triangle/color data found within element

Throws:
Exception

jvxlDecodeVertexData

public Point3f[] jvxlDecodeVertexData(String data,
                                      boolean asArray)
                               throws Exception
decode vertex data found within element as created by jvxlEncodeVertexData (see above)

Parameters:
data - tag and contents
asArray - or just addVertexCopy
Returns:
Point3f[] if desired
Throws:
Exception

jvxlDecodeTriangleData

int[][] jvxlDecodeTriangleData(String data,
                               String colorData)
                         throws Exception
decode triangle data found within element as created with jvxlEncodeTriangleData (see above)

Parameters:
data - tag and contents
colorData -
Returns:
int[][] if desired
Throws:
Exception

jvxlDecodeContourData

protected void jvxlDecodeContourData(JvxlData jvxlData,
                                     String data)
                              throws Exception
Throws:
Exception

postProcessVertices

protected void postProcessVertices()