Crewes Seismic I/O Library File Index. Function Documentation. Functions to access seimic header definitions, страница 14

Get fails if the corresponding data type is not defined in the seismic header definition  at the requested byte.

Parameters:

id   identification number of the seismic file header instance to access

byt   byte number in trace header from which the value should be retrieved. Starts at 0.

hdrValue   output argument for value of the header

Returns:

non-zero on failure (see seisio.h for error definitions).

char * seisioTrcHdr_getInternalData (int id)

Returns a pointer to the data segment of the trace header.

Returns:

null for invalid id.

Parameters:

id   identification number of the seismic trace header instance to access

int seisioTrcHdr_new (int seisioHdrDefnID)

Creates a new seismic trace header object instance.

Parameters:

seisioHdrDefnID   identification number of an open seimic header defnition instance

Returns:

id of new seismic trace header object.

int seisioTrcHdr_putF4 (int id, const char * hdrName, float hdrValue)

Put a value (float) into the data segment.

Returns non-zero on failure (see seisio.h for error definitions). Put fails if the corresponding data type is not defined in the seismic header definition at the requested byte.

Arguments: id identification number of the seismic trace header instance to access hdrName name of the header to access value value to place in the header

int seisioTrcHdr_putI2 (int id, const char * hdrName, int16 hdrValue)

Put a value (int16) into the data segment.

Put fails if the corresponding data type is not defined in the seismic header definition at the requested byte.

Parameters:

id   identification number of the seismic trace header instance to access

hdrName   name of the header to access

value   value to place in the header

Returns:

non-zero on failure (see seisio.h for error definitions).

int seisioTrcHdr_putI4 (int id, const char * hdrName, int32 hdrValue)

Put a value (int32) into the data segment.

Returns non-zero on failure (see seisio.h for error definitions). Put fails if the corresponding data type is not defined in the seismic header definition at the requested byte.

Arguments: id identification number of the seismic trace header instance to access hdrName name of the header to access value value to place in the header

int seisioTrcHdr_setHdr (int id, char * hdr)

Sets the trace header from an array of chars (length must be 240).

The header should be formatted in big endian binary.

Returns:

non-zero on error (see seisio.h for error definitions).

Parameters:

id   identification number of the seismic trace header instance to access

hdr   trace header source


seisioUtl.c File Reference

seisio Utilities - don't operate on any seisio objects.

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

#include "seisio.h"

#include "seisioHdrDefn.h"

Functions

·  int seisioUtl_getEndian (void)

Gets the processor's native byte ordering (endian-ness).

·  char* seisioUtl_getErrorStr (int errNum)

Gets the error message text associated with a seisio error number.

·  int16 seisioUtl_reverseBytes_int16 (int16 arg)

Reverses the two bytes in a 16 bit integer.

·  int32 seisioUtl_reverseBytes_int32 (int32 arg)

Reverses the four bytes in a 32 bit integer.

·  float seisioUtl_reverseBytes_float (float arg)

Reverse the four bytes in a 32 bit floating point number.

·  void seisioUtl_ieeeflt32_ibmflt32 (float *in, float *out, int n)

Converts a 32 bit IEEE floating point number to 32 bit IBM floating point format.

·  void seisioUtl_ibmflt32_ieeeflt32 (float *in, float *out, int n)

Converts a 32 bit IBM floating point number to 32 bit IEEE floating point format.

·  void seisioUtl_gain32_flt32 (int32 *i, float*o, int n)

Converts 32 bit gain/value number to 32 bit floating-point number.

·  void seisioUtl_ascii_ebcdic (const char *input, char *output, int n)