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
H5VolImpl Class Reference
Inheritance diagram for H5VolImpl:
H5BaseObjectImpl< H5Vol > H5BaseImpl< H5Vol > H5Vol H5BaseObject H5Base

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="") override
 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) override
 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) override
 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) override
 Set coordinates of origin.
 
virtual bool setSpacings (Eigen::Ref< Eigen::Vector3d > v, const std::string &lengthUnits="", const std::string &temporalunits="") override
 Set X,Y,Z unrotated spacings.
 
virtual bool setOrientation (double val, const std::string &angularUnits="") override
 Set XY plane orientation.
 
virtual bool resize (size_t nx, size_t ny, size_t nz) override
 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="") override
 Read subvolume starting from iX0, iY0, iZ0 indices. data matrix is of size: nRows=nX, nCols=nY*nZ.
 
virtual h5geo::Domain getDomain () override
 Get domain (TVD, TVDSS, TWT, OWT)
 
virtual Eigen::VectorXd getOrigin (const std::string &lengthUnits="", const std::string &temporalUnits="", bool doCoordTransform=false) override
 Get coordinates of origin.
 
virtual Eigen::VectorXd getSpacings (const std::string &lengthUnits="", const std::string &temporalUnits="") override
 Get X,Y,Z unrotated spacings.
 
virtual double getOrientation (const std::string &angularUnits="") override
 Get XY plane orientation.
 
virtual size_t getNX () override
 Get number of X values.
 
virtual size_t getNY () override
 Get number of Y values.
 
virtual size_t getNZ () override
 Get number of Z values.
 
virtual H5VolParam getParam () override
 Get parameters that were used to create current map.
 
virtual H5VolContaineropenVolContainer () const override
 Open H5VolContainer where current vol resides.
 
virtual std::optional< h5gt::DataSet > getVolD () const override
 Get current vol's DataSet.
 
virtual bool exportToSEGY (const std::string &segyFile, h5geo::Endian endian=h5geo::Endian::Big, std::function< void(double)> progressCallback=nullptr) override
 
virtual bool recreateVolD (size_t nX, size_t nY, size_t nZ, size_t xChunk, size_t yChunk, size_t zChunk, unsigned compressionLevel) override
 Unlink and create new dataset without copying data.
 
- Public Member Functions inherited from H5BaseObjectImpl< H5Vol >
virtual H5BasePointsopenPoints (const std::string &name) override
 Open H5BasePoints derived points.
 
virtual H5BasePointsopenPoints (h5gt::Group group) override
 Open H5BasePoints derived points.
 
virtual H5HorizonopenHorizon (const std::string &name) override
 
virtual H5HorizonopenHorizon (h5gt::Group group) override
 
virtual H5Points1createPoints1 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5Points1createPoints1 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5Points2createPoints2 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5Points2createPoints2 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5Points3createPoints3 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5Points3createPoints3 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5Points4createPoints4 (std::string &name, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5Points4createPoints4 (h5gt::Group group, H5PointsParam &p, h5geo::CreationType createFlag) override
 
virtual H5HorizoncreateHorizon (std::string &name, H5HorizonParam &p, h5geo::CreationType createFlag) override
 
virtual H5HorizoncreateHorizon (h5gt::Group group, H5HorizonParam &p, h5geo::CreationType createFlag) override
 
virtual H5Baseclone () override
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
H5Baseclone ()
 
virtual bool setSpatialReference (const std::string &str) override
 Set spatial reference for current geo-object using authName:code form.
 
virtual bool setSpatialReference (const std::string &authName, const std::string &code) override
 Set spatial reference for current geo-object.
 
virtual bool setLengthUnits (const std::string &str) override
 Set length units for the current geo-object.
 
virtual bool setTemporalUnits (const std::string &str) override
 Set temporal units for the current geo-object.
 
virtual bool setAngularUnits (const std::string &str) override
 Set angular units for the current geo-object.
 
virtual bool setDataUnits (const std::string &str) override
 Set data units for the current geo-object.
 
virtual bool setNullValue (double val) override
 Set NULL value for the current geo-object.
 
virtual std::string getSpatialReference () override
 Get spatial reference for current geo-object.
 
virtual std::string getLengthUnits () override
 Get length units for the current geo-object.
 
virtual std::string getTemporalUnits () override
 Get temporal units for the current geo-object.
 
virtual std::string getAngularUnits () override
 Get angular units for the current geo-object.
 
virtual std::string getDataUnits () override
 Get data units for the current geo-object.
 
virtual double getNullValue () override
 Get NULL value for the current geo-object.
 
virtual h5gt::File getH5File () const override
 Get HDF5 file.
 
virtual h5gt::Group getObjG () const override
 Get HDF5 Group.
 
virtual std::string getName () const override
 Get geo-object's name without path.
 
virtual std::string getFullName () const override
 Get geo-object's name with full path to that object.
 
virtual std::vector< h5gt::Group > getObjGroupList (const h5geo::ObjectType &objType, bool recursive) override
 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) override
 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) override
 Get number of geo-objects of specified type within current geo-object.
 
virtual bool isEqual (H5BaseObject *other) const override
 Check if geo-objects are the same.
 
virtual bool operator== (const H5BaseObject &other) const override
 Check if geo-objects are the same (compares HDF5 Groups)
 
virtual bool operator!= (const H5BaseObject &other) const override
 Check if geo-objects are not the same (compares HDF5 Groups)
 
- Public Member Functions inherited from H5BaseImpl< H5Vol >
virtual void Delete () override
 

Protected Member Functions

 H5VolImpl (const h5gt::Group &group)
 
- Protected Member Functions inherited from H5BaseObjectImpl< H5Vol >
 H5BaseObjectImpl (const h5gt::Group &group)
 
std::optional< h5gt::Group > getParentG (const h5geo::ObjectType &objType)
 getParent Search for parent of type ObjectType for the objG
 
virtual std::optional< h5gt::Group > getGroupOpt (h5gt::Group &parent, const std::string &groupName) const
 
virtual std::optional< h5gt::DataSet > getDatasetOpt (const h5gt::Group &parent, const std::string &datasetName) const
 
- Protected Member Functions inherited from H5BaseImpl< H5Vol >
virtual std::vector< h5gt::Group > getChildGroupList (h5gt::Group &group, const h5geo::ObjectType &objType, bool recursive=false)
 
virtual std::vector< std::string > getChildNameList (h5gt::Group &group, const h5geo::ObjectType &objType, const std::string &referencePath, bool recursive=false)
 referencePath to get relative path from it (set to empty to get full path)
 
virtual size_t getChildCount (h5gt::Group &group, const h5geo::ObjectType &objType, bool recursive=false)
 
std::optional< h5gt::Group > createObject (std::string &objName, h5gt::File parentFile, const h5geo::ObjectType &objType, void *p, h5geo::CreationType createFlag)
 createObject Creates new object. If CREATE_UNDER_NEW_NAME then objName will be chaged to be unique in its parent file.
 
std::optional< h5gt::Group > createObject (std::string &objName, h5gt::Group parentGroup, const h5geo::ObjectType &objType, void *p, h5geo::CreationType createFlag)
 createObject Creates new object. If CREATE_UNDER_NEW_NAME then objName will be chaged to be unique in its parent group.
 
std::optional< h5gt::Group > createObject (h5gt::Group objG, const h5geo::ObjectType &objType, void *p, h5geo::CreationType createFlag)
 
bool isSuccessor (const h5gt::Group &parentG, const h5gt::Group &childG)
 isSuccessor checks whether childG is successor of parentG
 
bool isSuccessor (const std::string &parent, const std::string &child)
 isSuccessor works only with absolute path!
 

Friends

class H5VolContainerImpl
 
class H5BaseObjectImpl< H5Vol >
 
H5Volh5geo::openVol (h5gt::Group group)
 

Additional Inherited Members

- Static Protected Member Functions inherited from H5BaseImpl< H5Vol >
static std::optional< h5gt::File > createContainer (std::string &fileName, const h5geo::ContainerType &containerType, h5geo::CreationType createFlag)
 
static std::optional< h5gt::File > createContainer (h5gt::File h5File, const h5geo::ContainerType &containerType, h5geo::CreationType createFlag)
 
- Protected Attributes inherited from H5BaseObjectImpl< H5Vol >
h5gt::Group objG
 

Member Function Documentation

◆ exportToSEGY()

bool H5VolImpl::exportToSEGY ( const std::string & segyFile,
h5geo::Endian endian = h5geo::Endian::Big,
std::function< void(double)> progressCallback = nullptr )
overridevirtual

Implements H5Vol.

◆ getData()

Eigen::MatrixXf H5VolImpl::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 = "" )
overridevirtual

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

Implements H5Vol.

◆ getDomain()

h5geo::Domain H5VolImpl::getDomain ( )
overridevirtual

Get domain (TVD, TVDSS, TWT, OWT)

Implements H5Vol.

◆ getNX()

size_t H5VolImpl::getNX ( )
overridevirtual

Get number of X values.

Implements H5Vol.

◆ getNY()

size_t H5VolImpl::getNY ( )
overridevirtual

Get number of Y values.

Implements H5Vol.

◆ getNZ()

size_t H5VolImpl::getNZ ( )
overridevirtual

Get number of Z values.

Implements H5Vol.

◆ getOrientation()

double H5VolImpl::getOrientation ( const std::string & angularUnits = "")
overridevirtual

Get XY plane orientation.

Implements H5Vol.

◆ getOrigin()

Eigen::VectorXd H5VolImpl::getOrigin ( const std::string & lengthUnits = "",
const std::string & temporalUnits = "",
bool doCoordTransform = false )
overridevirtual

Get coordinates of origin.

Implements H5Vol.

◆ getParam()

H5VolParam H5VolImpl::getParam ( )
overridevirtual

Get parameters that were used to create current map.

Implements H5Vol.

◆ getSpacings()

Eigen::VectorXd H5VolImpl::getSpacings ( const std::string & lengthUnits = "",
const std::string & temporalUnits = "" )
overridevirtual

Get X,Y,Z unrotated spacings.

Implements H5Vol.

◆ getVolD()

std::optional< h5gt::DataSet > H5VolImpl::getVolD ( ) const
overridevirtual

Get current vol's DataSet.

Implements H5Vol.

◆ openVolContainer()

H5VolContainer * H5VolImpl::openVolContainer ( ) const
overridevirtual

Open H5VolContainer where current vol resides.

Implements H5Vol.

◆ readSEGYSTACK()

bool H5VolImpl::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 )
overridevirtual

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

Implements H5Vol.

◆ recreateVolD()

bool H5VolImpl::recreateVolD ( size_t nX,
size_t nY,
size_t nZ,
size_t xChunk,
size_t yChunk,
size_t zChunk,
unsigned compressionLevel )
overridevirtual

Unlink and create new dataset without copying data.

Implements H5Vol.

◆ resize()

bool H5VolImpl::resize ( size_t nx,
size_t ny,
size_t nz )
overridevirtual

Resize volume.

Implements H5Vol.

◆ setDomain()

bool H5VolImpl::setDomain ( const h5geo::Domain & domain)
overridevirtual

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

Implements H5Vol.

◆ setOrientation()

bool H5VolImpl::setOrientation ( double val,
const std::string & angularUnits = "" )
overridevirtual

Set XY plane orientation.

Implements H5Vol.

◆ setOrigin()

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

Set coordinates of origin.

Implements H5Vol.

◆ setSpacings()

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

Set X,Y,Z unrotated spacings.

Implements H5Vol.

◆ writeData()

bool H5VolImpl::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 = "" )
overridevirtual

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

Implements H5Vol.


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