|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.javaseis.compress.SeisCompress
public class SeisCompress
Title: JavaSeisIO 16 Bit Trace Compression
Description: Provides compression support for seismic data in JavaSeis. The trace is divided into 100 sample windows. The maximum value in each window is used to scale trace samples to 16 bits. The floating point scalars are stored in the buffer first, followed by the 16 bit trace samples. Methods are provided to position the buffer for compression or decompression in trace units.
Field Summary | |
---|---|
(package private) java.nio.ByteBuffer |
_buf
|
(package private) java.nio.FloatBuffer |
_fbuf
|
(package private) short[] |
_ibuf
|
(package private) int |
_ibufLengthFloat
|
(package private) int |
_numsamp
|
(package private) int |
_numsamp2
|
(package private) int |
_nwindows
|
(package private) int |
_recordLength
|
(package private) int |
_recordLengthFloat
|
(package private) int |
_recordLengthShort
|
(package private) java.nio.ShortBuffer |
_sbuf
|
(package private) int |
_scalarLengthShort
|
(package private) float[] |
_scalars
|
(package private) int |
_tracePosition
|
(package private) int |
_type
|
static int |
NATIVE
|
static int |
SCALAR16
|
Constructor Summary | |
---|---|
SeisCompress(int type,
int numsamp,
java.nio.ByteBuffer buf)
Initialize compression for seismic traces |
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
Test harness for compression utilities |
(package private) int |
numWindows(int numsamp)
Determine number of windows to use for 16 bit scaling |
void |
packFrame(int ntrc,
float[][] frm)
Compress a frame of traces |
void |
packTrace(float[] trc)
Pack a trace into a 16bit compression buffer |
void |
packTrace16(float[] trc)
Pack a trace into a 16bit compression buffer |
int |
position()
Return the current buffer position in trace units |
int |
position(int tracePosition)
Set the buffer position in trace units |
static int |
recordLength(int type,
int numsamp)
Return the record length in bytes for 16 bit compression |
void |
unpackFrame(int ntrc,
float[][] trc)
Uncompress a frame of traces |
void |
unpackTrace(float[] trc)
Un-pack a trace from a NATIVE compression buffer |
void |
unpackTrace16(float[] trc)
Un-pack a trace from a SCALAR16 compression buffer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.nio.ByteBuffer _buf
java.nio.FloatBuffer _fbuf
short[] _ibuf
int _ibufLengthFloat
int _numsamp
int _numsamp2
int _nwindows
int _recordLength
int _recordLengthFloat
int _recordLengthShort
java.nio.ShortBuffer _sbuf
int _scalarLengthShort
float[] _scalars
int _tracePosition
int _type
public static int NATIVE
public static int SCALAR16
Constructor Detail |
---|
public SeisCompress(int type, int numsamp, java.nio.ByteBuffer buf)
type
- compression type (i.e. SeisCompress.NATIVE)numsamp
- input number of samples per tracebuf
- buffer that will be used for compressed tracesMethod Detail |
---|
public static void main(java.lang.String[] args) throws SeisException
SeisException
int numWindows(int numsamp)
numsamp
- input number of samples per trace
public void packFrame(int ntrc, float[][] frm)
ntrc
- input number of traces to compressfrm
- array of traces to compresspublic void packTrace(float[] trc)
trc
- Array to contain unpacked trace samplespublic void packTrace16(float[] trc)
trc
- Array to contain unpacked trace samplespublic int position()
public int position(int tracePosition)
tracePosition
- desired buffer position in trace units
public static int recordLength(int type, int numsamp)
type
- type of compression for which to calculate record lengthnumsamp
- input number of samples per trace
public void unpackFrame(int ntrc, float[][] trc)
ntrc
- input number of traces to recovertrc
- array of traces to recoverpublic void unpackTrace(float[] trc)
trc
- Array to contain unpacked trace samplespublic void unpackTrace16(float[] trc)
trc
- Array to contain unpacked trace samples
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |