Class VolumeFileReader

All Implemented Interfaces:
VertexDataServer
Direct Known Subclasses:
ApbsReader, CubeReader, DelPhiBinaryReader, IsoIntersectGridReader, JaguarReader, JvxlXmlReader, MapFileReader, PeriodicVolumeFileReader, PltFormattedReader, UhbdReader, XsfReader

abstract class VolumeFileReader extends SurfaceFileReader
  • 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
    • getNCIPlanes

      private boolean getNCIPlanes
    • nData

      protected int nData
    • readerClosed

      protected boolean readerClosed
    • downsampleFactor

      protected int downsampleFactor
    • nSkipX

      protected int nSkipX
    • nSkipY

      protected int nSkipY
    • nSkipZ

      protected int nSkipZ
    • yzPlanesRaw

      private float[][] yzPlanesRaw
    • iPlaneNCI

      private int iPlaneNCI
    • boundingBox

      protected javajs.util.P3[] boundingBox
    • isScaledAlready

      private boolean isScaledAlready
  • Constructor Details

    • VolumeFileReader

      VolumeFileReader()
  • Method Details

    • init2

      void init2(SurfaceGenerator sg, BufferedReader br)
      Overrides:
      init2 in class SurfaceFileReader
    • init2VFR

      void init2VFR(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
    • readVolumeDataVFR

      protected boolean readVolumeDataVFR(boolean isMapData)
    • 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

      void initializeSurfaceData()
    • getJVXLCutoff

      protected float getJVXLCutoff()
    • readSurfaceData

      protected void readSurfaceData(boolean isMapData) throws Exception
      Specified by:
      readSurfaceData in class SurfaceReader
      Throws:
      Exception
    • readSurfaceDataVFR

      protected void readSurfaceDataVFR(boolean isMapData) throws Exception
      Throws:
      Exception
    • getPlane

      public float[] getPlane(int x)
      Specified by:
      getPlane in interface VertexDataServer
      Overrides:
      getPlane in class SurfaceReader
    • 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)
    • getPlaneVFR

      private void getPlaneVFR(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
      Parameters:
      x -
      y -
      z -
      ptyz -
      Returns:
      value[x][y][z]
    • skipVoxels

      private void skipVoxels(int n) throws Exception
      Throws:
      Exception
    • getVoxelBitSet

      protected javajs.util.BS 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
      Parameters:
      n -
      nPoints -
      Throws:
      Exception
    • skipData

      protected void skipData(int nPoints) throws Exception
      Throws:
      Exception
    • skipDataVFR

      protected void skipDataVFR(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, javajs.util.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
    • 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 SurfaceReader
    • getSPFv

      protected float getSPFv(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)
    • scaleIsosurface

      private void scaleIsosurface(float scale)
    • swapXZ

      protected void swapXZ()