h5geo 0.4.0
C++17 and python API to work with geo-data (seismic, wells, maps, other in process) based on HDF5. Aimed at geoscientists and developers.
Loading...
Searching...
No Matches
H5Vol Class Referenceabstract

Provides API to work with volumes. More...

#include <h5vol.h>

Inheritance diagram for H5Vol:
H5BaseObject H5Base H5BaseImpl< H5Vol > H5BaseObjectImpl< H5Vol > H5VolImpl

Public Member Functions

virtual bool writeData (Eigen::Ref< Eigen::MatrixXf > data, const size_t &iX0, const size_t &iY0, const size_t &iZ0, const size_t &nX, const size_t &nY, const size_t &nZ, const std::string &dataUnits="")=0
 Write subvolume starting from iX0, iY0, iZ0 indices. data matrix is of size: nRows=nX, nCols=nY*nZ.
 
virtual bool readSEGYSTACK (const std::string &segy, const size_t &ilHdrOffset, const size_t &ilHdrSize, const size_t &xlHdrOffset, const size_t &xlHdrSize, const size_t &xHdrOffset, const size_t &xHdrSize, const size_t &yHdrOffset, const size_t &yHdrSize, double sampRate, size_t nSamp=0, size_t nTrc=0, h5geo::SegyFormat format=static_cast< h5geo::SegyFormat >(0), h5geo::Endian endian=static_cast< h5geo::Endian >(0), std::function< void(double)> progressCallback=nullptr)=0
 Read SEGY STACK data, i.e. nTrc should be equal to nil*nxl. After reading origin, spacings, orientation, and angular units will be set.
 
virtual bool setDomain (const h5geo::Domain &domain)=0
 Set domain for the map (TVD, TVDSS, TWT, OWT)
 
virtual bool setOrigin (Eigen::Ref< Eigen::Vector3d > v, const std::string &lengthUnits="", const std::string &temporalUnits="", bool doCoordTransform=false)=0
 Set coordinates of origin.
 
virtual bool setSpacings (Eigen::Ref< Eigen::Vector3d > v, const std::string &lengthUnits="", const std::string &temporalUnits="")=0
 Set X,Y,Z unrotated spacings.
 
virtual bool setOrientation (double val, const std::string &angularUnits="")=0
 Set XY plane orientation.
 
virtual bool resize (size_t nx, size_t ny, size_t nz)=0
 Resize volume.
 
virtual Eigen::MatrixXf getData (const size_t &iX0, const size_t &iY0, const size_t &iZ0, const size_t &nX, const size_t &nY, const size_t &nZ, const std::string &dataUnits="")=0
 Read subvolume starting from iX0, iY0, iZ0 indices. data matrix is of size: nRows=nX, nCols=nY*nZ.
 
virtual h5geo::Domain getDomain ()=0
 Get domain (TVD, TVDSS, TWT, OWT)
 
virtual Eigen::VectorXd getOrigin (const std::string &lengthUnits="", const std::string &temporalUnits="", bool doCoordTransform=false)=0
 Get coordinates of origin.
 
virtual Eigen::VectorXd getSpacings (const std::string &lengthUnits="", const std::string &temporalUnits="")=0
 Get X,Y,Z unrotated spacings.
 
virtual double getOrientation (const std::string &angularUnits="")=0
 Get XY plane orientation.
 
virtual size_t getNX ()=0
 Get number of X values.
 
virtual size_t getNY ()=0
 Get number of Y values.
 
virtual size_t getNZ ()=0
 Get number of Z values.
 
virtual H5VolParam getParam ()=0
 Get parameters that were used to create current map.
 
virtual H5VolContaineropenVolContainer () const =0
 Open H5VolContainer where current vol resides.
 
virtual std::optional< h5gt::DataSet > getVolD () const =0
 Get current vol's DataSet.
 
virtual bool exportToSEGY (const std::string &segyFile, h5geo::Endian endian=h5geo::Endian::Big, std::function< void(double)> progressCallback=nullptr)=0
 
virtual bool recreateVolD (size_t nX, size_t nY, size_t nZ, size_t xChunk, size_t yChunk, size_t zChunk, unsigned compressionLevel)=0
 Unlink and create new dataset without copying data.
 
- Public Member Functions inherited from H5BaseObject
virtual H5BasePointsopenPoints (const std::string &name)=0
 Open H5BasePoints derived points.
 
virtual H5BasePointsopenPoints (h5gt::Group group)=0
 Open H5BasePoints derived points.
 
virtual H5HorizonopenHorizon (const std::string &name)=0
 
virtual H5HorizonopenHorizon (h5gt::Group group)=0
 
virtual H5Points1createPoints1 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5Points1createPoints1 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5Points2createPoints2 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5Points2createPoints2 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5Points3createPoints3 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5Points3createPoints3 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5Points4createPoints4 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5Points4createPoints4 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag)=0
 
virtual H5HorizoncreateHorizon (std::string &name, H5HorizonParam &p, h5geo::CreationType createFlag)=0
 
virtual H5HorizoncreateHorizon (h5gt::Group group, H5HorizonParam &p, h5geo::CreationType createFlag)=0
 
virtual bool setSpatialReference (const std::string &str)=0
 Set spatial reference for current geo-object using authName:code form.
 
virtual bool setSpatialReference (const std::string &authName, const std::string &code)=0
 Set spatial reference for current geo-object.
 
virtual bool setLengthUnits (const std::string &str)=0
 Set length units for the current geo-object.
 
virtual bool setTemporalUnits (const std::string &str)=0
 Set temporal units for the current geo-object.
 
virtual bool setAngularUnits (const std::string &str)=0
 Set angular units for the current geo-object.
 
virtual bool setDataUnits (const std::string &str)=0
 Set data units for the current geo-object.
 
virtual bool setNullValue (double val)=0
 Set NULL value for the current geo-object.
 
virtual std::string getSpatialReference ()=0
 Get spatial reference for current geo-object.
 
virtual std::string getLengthUnits ()=0
 Get length units for the current geo-object.
 
virtual std::string getTemporalUnits ()=0
 Get temporal units for the current geo-object.
 
virtual std::string getAngularUnits ()=0
 Get angular units for the current geo-object.
 
virtual std::string getDataUnits ()=0
 Get data units for the current geo-object.
 
virtual double getNullValue ()=0
 Get NULL value for the current geo-object.
 
virtual h5gt::File getH5File () const =0
 Get HDF5 file.
 
virtual h5gt::Group getObjG () const =0
 Get HDF5 Group.
 
virtual std::string getName () const =0
 Get geo-object's name without path.
 
virtual std::string getFullName () const =0
 Get geo-object's name with full path to that object.
 
virtual std::vector< h5gt::Group > getObjGroupList (const h5geo::ObjectType &objType, bool recursive)=0
 Find all geo-objects of specified type within current geo-object and return them as vector of Groups.
 
virtual std::vector< std::string > getObjNameList (const h5geo::ObjectType &objType, bool recursive)=0
 Find all geo-objects of specified type within current geo-object and return them as vector of names.
 
virtual size_t getObjCount (const h5geo::ObjectType &objType, bool recursive)=0
 Get number of geo-objects of specified type within current geo-object.
 
virtual bool isEqual (H5BaseObject *other) const =0
 Check if geo-objects are the same.
 
virtual bool operator== (const H5BaseObject &other) const =0
 Check if geo-objects are the same (compares HDF5 Groups)
 
virtual bool operator!= (const H5BaseObject &other) const =0
 Check if geo-objects are not the same (compares HDF5 Groups)
 
- Public Member Functions inherited from H5Base
virtual H5Baseclone ()=0
 
virtual void Delete ()=0
 

Detailed Description

Provides API to work with volumes.

Volume is an object that is represented by a regular 3D grid.

Member Function Documentation

◆ getData()

virtual Eigen::MatrixXf H5Vol::getData ( const size_t & iX0,
const size_t & iY0,
const size_t & iZ0,
const size_t & nX,
const size_t & nY,
const size_t & nZ,
const std::string & dataUnits = "" )
pure virtual

Read subvolume starting from iX0, iY0, iZ0 indices. data matrix is of size: nRows=nX, nCols=nY*nZ.

Implemented in H5VolImpl.

◆ getDomain()

virtual h5geo::Domain H5Vol::getDomain ( )
pure virtual

Get domain (TVD, TVDSS, TWT, OWT)

Implemented in H5VolImpl.

◆ getNX()

virtual size_t H5Vol::getNX ( )
pure virtual

Get number of X values.

Implemented in H5VolImpl.

◆ getNY()

virtual size_t H5Vol::getNY ( )
pure virtual

Get number of Y values.

Implemented in H5VolImpl.

◆ getNZ()

virtual size_t H5Vol::getNZ ( )
pure virtual

Get number of Z values.

Implemented in H5VolImpl.

◆ getOrientation()

virtual double H5Vol::getOrientation ( const std::string & angularUnits = "")
pure virtual

Get XY plane orientation.

Implemented in H5VolImpl.

◆ getOrigin()

virtual Eigen::VectorXd H5Vol::getOrigin ( const std::string & lengthUnits = "",
const std::string & temporalUnits = "",
bool doCoordTransform = false )
pure virtual

Get coordinates of origin.

Implemented in H5VolImpl.

◆ getParam()

virtual H5VolParam H5Vol::getParam ( )
pure virtual

Get parameters that were used to create current map.

Implemented in H5VolImpl.

◆ getSpacings()

virtual Eigen::VectorXd H5Vol::getSpacings ( const std::string & lengthUnits = "",
const std::string & temporalUnits = "" )
pure virtual

Get X,Y,Z unrotated spacings.

Implemented in H5VolImpl.

◆ getVolD()

virtual std::optional< h5gt::DataSet > H5Vol::getVolD ( ) const
pure virtual

Get current vol's DataSet.

Implemented in H5VolImpl.

◆ openVolContainer()

virtual H5VolContainer * H5Vol::openVolContainer ( ) const
pure virtual

Open H5VolContainer where current vol resides.

Implemented in H5VolImpl.

◆ readSEGYSTACK()

virtual bool H5Vol::readSEGYSTACK ( const std::string & segy,
const size_t & ilHdrOffset,
const size_t & ilHdrSize,
const size_t & xlHdrOffset,
const size_t & xlHdrSize,
const size_t & xHdrOffset,
const size_t & xHdrSize,
const size_t & yHdrOffset,
const size_t & yHdrSize,
double sampRate,
size_t nSamp = 0,
size_t nTrc = 0,
h5geo::SegyFormat format = static_cast< h5geo::SegyFormat >(0),
h5geo::Endian endian = static_cast< h5geo::Endian >(0),
std::function< void(double)> progressCallback = nullptr )
pure virtual

Read SEGY STACK data, i.e. nTrc should be equal to nil*nxl. After reading origin, spacings, orientation, and angular units will be set.

Parameters
segy
ilHdrOffsetINLINE offset in bytes
ilHdrSizeINLINE size in bytes
xlHdrOffsetXLINE offset in bytes
xlHdrSizeXLINE size in bytes
xHdrOffsetX-coord offset in bytes
xHdrSizeX-coord size in bytes
yHdrOffsetY-coord offset in bytes
yHdrSizeY-coord size in bytes
sampRatesampling rate of SEGY file (must know the sign)
nSampnumber of samples in SEGY (if 0 then try automatically detect)
nTrcnumber of traces in SEGY (if 0 then try automatically detect)
formatSEGY format (ibm32, ieee32 or int4)
endianBig or Little
progressCallback
Returns

Implemented in H5VolImpl.

◆ recreateVolD()

virtual bool H5Vol::recreateVolD ( size_t nX,
size_t nY,
size_t nZ,
size_t xChunk,
size_t yChunk,
size_t zChunk,
unsigned compressionLevel )
pure virtual

Unlink and create new dataset without copying data.

Implemented in H5VolImpl.

◆ resize()

virtual bool H5Vol::resize ( size_t nx,
size_t ny,
size_t nz )
pure virtual

Resize volume.

Implemented in H5VolImpl.

◆ setDomain()

virtual bool H5Vol::setDomain ( const h5geo::Domain & domain)
pure virtual

Set domain for the map (TVD, TVDSS, TWT, OWT)

Implemented in H5VolImpl.

◆ setOrientation()

virtual bool H5Vol::setOrientation ( double val,
const std::string & angularUnits = "" )
pure virtual

Set XY plane orientation.

Implemented in H5VolImpl.

◆ setOrigin()

virtual bool H5Vol::setOrigin ( Eigen::Ref< Eigen::Vector3d > v,
const std::string & lengthUnits = "",
const std::string & temporalUnits = "",
bool doCoordTransform = false )
pure virtual

Set coordinates of origin.

Implemented in H5VolImpl.

◆ setSpacings()

virtual bool H5Vol::setSpacings ( Eigen::Ref< Eigen::Vector3d > v,
const std::string & lengthUnits = "",
const std::string & temporalUnits = "" )
pure virtual

Set X,Y,Z unrotated spacings.

Implemented in H5VolImpl.

◆ writeData()

virtual bool H5Vol::writeData ( Eigen::Ref< Eigen::MatrixXf > data,
const size_t & iX0,
const size_t & iY0,
const size_t & iZ0,
const size_t & nX,
const size_t & nY,
const size_t & nZ,
const std::string & dataUnits = "" )
pure virtual

Write subvolume starting from iX0, iY0, iZ0 indices. data matrix is of size: nRows=nX, nCols=nY*nZ.

Implemented in H5VolImpl.


The documentation for this class was generated from the following file: