|
OpenZGY/C++ API and Internals (ALPHA)
Access seismic data stored in ZGY format.
|
Argument package for creating a ZGY file. More...
#include <api.h>
Public Member Functions | |
| void | dump (std::ostream &out) |
| Output in human readable form for debugging. | |
| ZgyWriterArgs & | filename (const std::string &value) |
| Set file to open. More... | |
| ZgyWriterArgs & | iocontext (const IOContext *value) |
| Set credentials and other configuration. More... | |
| ZgyWriterArgs & | compressor (const compressor_t &value) |
| Set functor for compressing full resolution data. | |
| ZgyWriterArgs & | compressor (const std::string &name, const std::vector< std::string > &args) |
| Set functor for compressing full resolution data. More... | |
| ZgyWriterArgs & | zfp_compressor (float snr) |
| Set functor for compressing full resolution data. More... | |
| ZgyWriterArgs & | lodcompressor (const compressor_t &value) |
| Set functor for compressing low resolution data. | |
| ZgyWriterArgs & | lodcompressor (const std::string &name, const std::vector< std::string > &args) |
| Set functor for compressing low resolution data. More... | |
| ZgyWriterArgs & | zfp_lodcompressor (float snr) |
| Set functor for compressing low resolution data. More... | |
| ZgyWriterArgs & | size (std::int64_t ni, std::int64_t nj, std::int64_t nk) |
| Set size of the survey. More... | |
| ZgyWriterArgs & | bricksize (std::int64_t ni, std::int64_t nj, std::int64_t nk) |
| Set size of one brick. More... | |
| ZgyWriterArgs & | datatype (SampleDataType value) |
| Set type of samples in each brick. | |
| ZgyWriterArgs & | datarange (float lo, float hi) |
| Set scaling factors. More... | |
| ZgyWriterArgs & | zunit (UnitDimension dimension, const std::string &name, double factor) |
| Set vertical unit. More... | |
| ZgyWriterArgs & | hunit (UnitDimension dimension, const std::string &name, double factor) |
| Set horizontal unit. More... | |
| ZgyWriterArgs & | ilstart (float value) |
| Set first (ordinal 0) inline number. More... | |
| ZgyWriterArgs & | ilinc (float value) |
| Set inline number increment between two adjacent ordinal values. More... | |
| ZgyWriterArgs & | xlstart (float value) |
| Set first (ordinal 0) crossline number. More... | |
| ZgyWriterArgs & | xlinc (float value) |
| Set crossline number increment between two adjacent ordinal values. More... | |
| ZgyWriterArgs & | zstart (float value) |
| Set first time/depth. More... | |
| ZgyWriterArgs & | zinc (float value) |
| Set increment (distance between samples) in vertical direction. More... | |
| ZgyWriterArgs & | corners (const corners_t &value) |
| Set survey corner points in world coordinates. More... | |
| ZgyWriterArgs & | metafrom (const std::shared_ptr< OpenZGY::IZgyReader > &) |
| Copy metadata from existing file. More... | |
Argument package for creating a ZGY file.
This is a short lived helper class for passing arguments to the functions that create a ZGY file. Needed because there are a lot of arguments and C++ doesn't allow keyword arguments. Do NOT use this class for holding on to the information.
Information not set explicitly will be defaulted. The following two statements give the same result:
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::bricksize | ( | std::int64_t | ni, |
| std::int64_t | nj, | ||
| std::int64_t | nk | ||
| ) |
Set size of one brick.
Almost always (64,64,64). Change at your own peril.
| ZgyWriterArgs & OpenZGY::ZgyWriterArgs::compressor | ( | const std::string & | name, |
| const std::vector< std::string > & | args | ||
| ) |
Set functor for compressing full resolution data.
This overload uses a factory to look up the compressor.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::corners | ( | const corners_t & | value | ) |
Set survey corner points in world coordinates.
The corners are ordered origin, last inline (i.e. i=last, j=0), last crossline, diagonal.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::datarange | ( | float | lo, |
| float | hi | ||
| ) |
Set scaling factors.
For integral storage this specifies the two floating point numbers that correspond to the lowest and highest representable integer value. So for int8 files, -128 will be converted to "lo" and +127 will be converted to "hi".
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::filename | ( | const std::string & | value | ) |
Set file to open.
If starting with sd:// this opens a file on seismic store.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::hunit | ( | UnitDimension | dimension, |
| const std::string & | name, | ||
| double | factor | ||
| ) |
Set horizontal unit.
| dimension | cartesian length or (unsupported) polat coordinates, |
| name | for annotation only. |
| factor | multiply by this factor to convert from storage units to SI units. |
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::ilinc | ( | float | value | ) |
Set inline number increment between two adjacent ordinal values.
For maximum portability the inline and crossline start and increment should be integral numbers. Some applications might choose to convert them to int.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::ilstart | ( | float | value | ) |
Set first (ordinal 0) inline number.
For maximum portability the inline and crossline start and increment should be integral numbers. Some applications might choose to convert them to int.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::iocontext | ( | const IOContext * | value | ) |
Set credentials and other configuration.
This depends on the back-end. For local files you normally don't need to pass anything here.
| ZgyWriterArgs & OpenZGY::ZgyWriterArgs::lodcompressor | ( | const std::string & | name, |
| const std::vector< std::string > & | args | ||
| ) |
Set functor for compressing low resolution data.
This overload uses a factory to look up the compressor.
| ZgyWriterArgs & OpenZGY::ZgyWriterArgs::metafrom | ( | const std::shared_ptr< OpenZGY::IZgyReader > & | reader | ) |
Copy metadata from existing file.
Set most of the metadata from an open file descriptor. Typically used when the file to be created is to be computed from an existing file. Typically this will be called first so the settings don't inadverently shadow something set explicitly.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::size | ( | std::int64_t | ni, |
| std::int64_t | nj, | ||
| std::int64_t | nk | ||
| ) |
Set size of the survey.
| ni | number of inlines (slowest varying index). |
| nj | number of crosslines. |
| nk | number of samples per trace (fastest). |
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::xlinc | ( | float | value | ) |
Set crossline number increment between two adjacent ordinal values.
For maximum portability the inline and crossline start and increment should be integral numbers. Some applications might choose to convert them to int.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::xlstart | ( | float | value | ) |
Set first (ordinal 0) crossline number.
For maximum portability the inline and crossline start and increment should be integral numbers. Some applications might choose to convert them to int.
| ZgyWriterArgs & OpenZGY::ZgyWriterArgs::zfp_compressor | ( | float | snr | ) |
Set functor for compressing full resolution data.
This overload uses a factory to look up the ZGY compressor. It is just a convenience that is shorter to type.
| ZgyWriterArgs & OpenZGY::ZgyWriterArgs::zfp_lodcompressor | ( | float | snr | ) |
Set functor for compressing low resolution data.
This overload uses a factory to look up the ZGY compressor. It is just a convenience that is shorter to type.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::zinc | ( | float | value | ) |
Set increment (distance between samples) in vertical direction.
Vertical annotation is generally safe to have non-integral.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::zstart | ( | float | value | ) |
Set first time/depth.
Vertical annotation is generally safe to have non-integral.
| ZgyWriterArgs& OpenZGY::ZgyWriterArgs::zunit | ( | UnitDimension | dimension, |
| const std::string & | name, | ||
| double | factor | ||
| ) |
Set vertical unit.
| dimension | time or depth (a.k.a. length). |
| name | for annotation only. |
| factor | multiply by this factor to convert from storage units to SI units. |
1.8.17