Class JvxlXmlReader

    • 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
      • 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

        private String strFractionTemp
      • haveReadColorData

        boolean haveReadColorData
      • jvxlColorEncodingRead

        private String jvxlColorEncodingRead
    • Constructor Detail

      • JvxlXmlReader

        JvxlXmlReader()
    • Method Detail

      • readVector

        protected void readVector​(int voxelVectorIndex)
                           throws Exception
        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)
      • readSurfaceDataXML

        protected boolean readSurfaceDataXML()
                                      throws Exception
        Throws:
        Exception
      • readSurfaceDataJXR

        protected void readSurfaceDataJXR()
                                   throws Exception
        Throws:
        Exception
      • jvxlReadFractionData

        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. 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
      • 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 class VolumeFileReader
      • getNextValue

        private float getNextValue()
      • setValueMinMax

        private void setValueMinMax()
      • jvxlGetNextFraction

        private float jvxlGetNextFraction​(int base,
                                          int range,
                                          float fracOffset)
      • getColor

        private static int getColor​(String c)
      • getEncodedVertexData

        protected void getEncodedVertexData()
                                     throws Exception
        retrieve Jvxl 2.0 format vertex/triangle/edge/color data found within <jvxlSurfaceData> element
        Throws:
        Exception
      • getEncoding

        private static String getEncoding​(String data)
      • jvxlDecodeVertexData

        public javajs.util.P3[] jvxlDecodeVertexData​(String data,
                                                     boolean asArray)
                                              throws Exception
        decode vertex data found within <jvxlVertexData> element as created by jvxlEncodeVertexData (see above)
        Parameters:
        data - tag and contents
        asArray - or just addVertexCopy
        Returns:
        Point3f[] if desired
        Throws:
        Exception
      • jvxlDecodeTriangleData

        void jvxlDecodeTriangleData​(String tdata,
                                    String edgeData,
                                    String colorData)
                             throws Exception
        decode triangle data found within <jvxlTriangleData> element as created with jvxlEncodeTriangleData (see above)
        Parameters:
        tdata - tag and contents
        edgeData -
        colorData -
        Throws:
        Exception