1.3.1
CCC
 
segy.cpp File Reference
#include "OutputFormat/segy.h"
#include "Basic/Utilities.hpp"
#include "Basic/File.hpp"
#include "Db/Db.hpp"
#include "Db/DbGrid.hpp"
#include "geoslib_old_f.h"
#include "geoslib_enum.h"
#include <stdio.h>
#include <string.h>
#include <math.h>

Classes

struct  RefPt
 
struct  RefStats
 

Macros

#define MAT(i, j)   (mat[2 * (i) + (j)])
 
#define SWAP_INT16(x)   (x) = ((0x00ff & ((x))>>8) | (0xff00 & ((x))<<8))
 
#define SWAP_INT32(x)
 

Functions

void st_get_trace_params (traceHead *Theader, int *iline, int *xline, double *delta, double *xtrace, double *ytrace)
 
SegYArg segy_array (const char *filesegy, DbGrid *surf2D, const String &top_name, const String &bot_name, const String &top_aux, const String &bot_aux, double thickmin, int option, int nz_ss, int verbOption, int iline_min, int iline_max, int xline_min, int xline_max, double modif_high, double modif_low, double modif_scale, int codefmt)
 
Grid segy_summary (const char *filesegy, DbGrid *surf2D, const String &name_top, const String &name_bot, double thickmin, int option, int nz_ss, int verbOption, int iline_min, int iline_max, int xline_min, int xline_max, double modif_high, double modif_low, double modif_scale, int codefmt)
 
int db_segy (const char *filesegy, DbGrid *grid3D, DbGrid *surf2D, const String &name_top, const String &name_bot, double thickmin, int option, int nz_ss, int verbOption, int iline_min, int iline_max, int xline_min, int xline_max, double modif_high, double modif_low, double modif_scale, int codefmt, const NamingConvention &namconv)
 

Macro Definition Documentation

◆ MAT

#define MAT (   i,
 
)    (mat[2 * (i) + (j)])

◆ SWAP_INT16

#define SWAP_INT16 (   x)    (x) = ((0x00ff & ((x))>>8) | (0xff00 & ((x))<<8))

◆ SWAP_INT32

#define SWAP_INT32 (   x)
Value:
(x) = ((0x000000ff & ((x))>>24) | \
(0x0000ff00 & ((x))>>8) | \
(0x00ff0000 & ((x))<<8) | \
(0xff000000 & ((x))<<24))
#define x

Function Documentation

◆ db_segy()

int db_segy ( const char *  filesegy,
DbGrid grid3D,
DbGrid surf2D,
const String name_top,
const String name_bot,
double  thickmin,
int  option,
int  nz_ss,
int  verbOption,
int  iline_min,
int  iline_max,
int  xline_min,
int  xline_max,
double  modif_high,
double  modif_low,
double  modif_scale,
int  codefmt,
const NamingConvention namconv 
)

Read the contents of a SEGY file

Returns
Error return code
Parameters
[in]filesegyName of the SEGY file
[in]grid3DDb containing the resulting 3-D grid
[in]surf2DDb containing the top, Bottom and Reference surfaces This file is optional
[in]name_topRank of variable containing the Top Surface (or 0)
[in]name_botRank of variable containing the Bottom Surface (or 0)
[in]thickminMinimum thickness (or 0)
[in]optionFlattening option: 0 no flattening; 1 flattening from top; -1 flattening from bottom -2 squeeze and stretch option 2 averaging from 3-D to 2-D
[in]nz_ssDeprecated argument
[in]verbOptionVerbose option
[in]iline_minMinimum Inline number included (if defined)
[in]iline_maxMaximum Inline number included (if defined)
[in]xline_minMinimum Xline number included (if defined)
[in]xline_maxMaximum Xline number included (if defined)
[in]modif_highUpper truncation (when defined)
[in]modif_lowLower truncation (when defined)
[in]modif_scaleScaling value (when defined)
[in]codefmtReading format
[in]namconvNaming convention

: In the case of Squeeze and Stretch (S&S), the number of layers

: is meaningless. It is fixed by the user, unless defined

: by the output grid (if flag_store == 1)

Remarks
For filling the 3-D grid
- 2-D characteristics of the grid are taken into account
- no attention is paid to the vertical mesh value.

◆ segy_array()

SegYArg segy_array ( const char *  filesegy,
DbGrid surf2D,
const String top_name,
const String bot_name,
const String top_aux,
const String bot_aux,
double  thickmin,
int  option,
int  nz_ss,
int  verbOption,
int  iline_min,
int  iline_max,
int  xline_min,
int  xline_max,
double  modif_high,
double  modif_low,
double  modif_scale,
int  codefmt 
)

Read the contents of a SEGY file

Returns
A SegYArg structure which contains:
- a vector of trace vectors
- a vector of trace descriptors
The Descriptor for each trace contains:
0: Absolute rank for the trace number
1: Cross-Line number
2: In-Line number
3: Coordinate along X
4: Coordinate along Y
5: Minimum Elevation
6: Maximum Elevation
7: Minimum Value
8: Maximum value
9: Thickness
10: Number of values
11: Minimum Elevation of Auxiliary surface
12: Maximum Elevation of Auxiliary surface
Parameters
[in]filesegyName of the SEGY file
[in]surf2DDb containing the top, Bottom and Reference surfaces This file is optional
[in]top_nameName of variable containing the Top Surface (or "")
[in]bot_nameName of variable containing the Bottom Surface (or "")
[in]top_auxName of auxiliary variable containing a Top (or "")
[in]bot_auxName of auxiliary variable containing a Top (or "")
[in]thickminMinimum thickness (or 0)
[in]optionFlattening option: 0 no flattening; 1 flattening from top; -1 flattening from bottom -2 squeeze and stretch option 2 averaging from 3-D to 2-D
[in]nz_ssNumber of layers for different options (see details)
[in]verbOptionVerbose option
[in]iline_minMinimum Inline number included (if defined)
[in]iline_maxMaximum Inline number included (if defined)
[in]xline_minMinimum Xline number included (if defined)
[in]xline_maxMaximum Xline number included (if defined)
[in]modif_highUpper truncation (when defined)
[in]modif_lowLower truncation (when defined)
[in]modif_scaleScaling value (when defined)
[in]codefmtReading format

In the case of Squeeze and Stretch (S&S), the number of layers

is meaningless. It is fixed by the user.

◆ segy_summary()

Grid segy_summary ( const char *  filesegy,
DbGrid surf2D,
const String name_top,
const String name_bot,
double  thickmin,
int  option,
int  nz_ss,
int  verbOption,
int  iline_min,
int  iline_max,
int  xline_min,
int  xline_max,
double  modif_high,
double  modif_low,
double  modif_scale,
int  codefmt 
)

Read the contents of a SEGY file and returns the structure SegyRead which captures the main characteristics of the SEGY grid

Parameters
[in]filesegyName of the SEGY file
[in]surf2DDb containing the top, Bottom and Reference surfaces This file is optional
[in]name_topRank of variable containing the Top Surface (or 0)
[in]name_botRank of variable containing the Bottom Surface (or 0)
[in]thickminMinimum thickness (or 0)
[in]optionFlattening option: 0 no flattening; 1 flattening from top; -1 flattening from bottom -2 squeeze and stretch option 2 averaging from 3-D to 2-D
[in]nz_ssNumber of layers for different options (see details)
[in]verbOptionVerbose option
[in]iline_minMinimum Inline number included (if defined)
[in]iline_maxMaximum Inline number included (if defined)
[in]xline_minMinimum Xline number included (if defined)
[in]xline_maxMaximum Xline number included (if defined)
[in]modif_highUpper truncation (when defined)
[in]modif_lowLower truncation (when defined)
[in]modif_scaleScaling value (when defined)
[in]codefmtReading format

: In the case of Squeeze and Stretch (S&S), the number of layers

: is meaningless. It is fixed by the user, unless defined

: by the output grid (if flag_store == 1)

◆ st_get_trace_params()

void st_get_trace_params ( traceHead Theader,
int *  iline,
int *  xline,
double *  delta,
double *  xtrace,
double *  ytrace 
)

Get Trace characteristics