Package jspecview.source
Class JDXDecompressor
java.lang.Object
jspecview.source.JDXDecompressor
JDXDecompressor contains static methods to decompress the data part of
JCAMP-DX spectra that have been compressed using DIF, FIX, SQZ or PAC
formats. If you wish to parse the data from XY formats see
Coordinate.parseDSV(java.lang.String, double, double)
- Author:
- Christopher Muir, Debbie-Ann Facey, Khari A. Bryan, Prof Robert J. Lancashire, Bob Hanson - hansonr@stolaf.edu
-
Constructor Summary
ConstructorsConstructorDescriptionJDXDecompressor
(String line, int lastY) JDXDecompressor
(JDXSourceStreamTokenizer t, double firstX, double lastX, double xFactor, double yFactor, int nPoints) Initialises theJDXDecompressor
from the compressed data, the x factor, the y factor and the deltaX value -
Method Summary
Modifier and TypeMethodDescriptiondecompressData
(SB errorLog) Determines the type of compression, decompresses the data and stores coordinates in an array to be returneddouble
getMaxY()
double
getMinY()
int
Report out the number of points found (for error reporting)boolean
hasNext()
next()
void
remove()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
JDXDecompressor
public JDXDecompressor(JDXSourceStreamTokenizer t, double firstX, double lastX, double xFactor, double yFactor, int nPoints) Initialises theJDXDecompressor
from the compressed data, the x factor, the y factor and the deltaX value- Parameters:
t
- the data to be decompressedfirstX
- first x listed in filelastX
- the last X listed in filexFactor
- the x factoryFactor
- the y factornPoints
- the expected number of points
-
JDXDecompressor
-
-
Method Details
-
getMinY
public double getMinY() -
getMaxY
public double getMaxY() -
decompressData
Determines the type of compression, decompresses the data and stores coordinates in an array to be returned- Parameters:
errorLog
-- Returns:
- the array of
Coordinate
s
-
getNPointsFound
public int getNPointsFound()Report out the number of points found (for error reporting)- Returns:
- the number of points found
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove()
-