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
h5horizon.h
1#ifndef H5HORIZON_H
2#define H5HORIZON_H
3
4#include "h5baseobject.h"
5
6#include <Eigen/Dense>
7
9
16class H5Horizon : public H5BaseObject
17{
18protected:
19 virtual ~H5Horizon() = default;
20
21public:
23 virtual bool writeData(
24 Eigen::Ref<Eigen::MatrixXd> M,
25 const std::string& unitsFrom = "",
26 const std::string& unitsTo = "") = 0;
27
29 virtual Eigen::MatrixXd getData(
30 const std::string& unitsFrom = "",
31 const std::string& unitsTo = "") = 0;
32
34 virtual bool writeComponent(
35 const std::string& componentName,
36 Eigen::Ref<Eigen::VectorXd> v,
37 const std::string& unitsFrom = "",
38 const std::string& unitsTo = "") = 0;
39
41 virtual Eigen::VectorXd getComponent(
42 const std::string& componentName,
43 const std::string& unitsFrom = "",
44 const std::string& unitsTo = "") = 0;
45
47 virtual bool setNPoints(size_t n) = 0;
49 virtual bool setNComponents(size_t n) = 0;
53 virtual bool setComponents(const std::map<std::string, size_t>& components) = 0;
55 virtual bool setDomain(const h5geo::Domain& domain) = 0;
56
58 virtual H5BaseContainer* openContainer() const = 0;
60 virtual size_t getNPoints() = 0;
62 virtual size_t getNComponents() = 0;
64 virtual std::map<std::string, size_t> getComponents() = 0;
66 virtual h5geo::Domain getDomain() = 0;
67
69 virtual H5HorizonParam getParam() = 0;
70
72 virtual std::optional<h5gt::DataSet> getHorizonD() const = 0;
73};
74
75using H5Horizon_ptr = std::unique_ptr<H5Horizon, h5geo::ObjectDeleter>;
76
77#endif // H5HORIZON_H
Base class for geo-containers.
Definition h5basecontainer.h:9
Base class for geo-objects.
Definition h5baseobject.h:13
Provides API to work with horizons.
Definition h5horizon.h:17
virtual H5BaseContainer * openContainer() const =0
Open container where current points resides.
virtual bool writeComponent(const std::string &componentName, Eigen::Ref< Eigen::VectorXd > v, const std::string &unitsFrom="", const std::string &unitsTo="")=0
Write single component to DataSet.
virtual size_t getNComponents()=0
Return number of dimension for the horizon.
virtual std::map< std::string, size_t > getComponents()=0
Return component names and corresponding HDF5 rows.
virtual bool setNComponents(size_t n)=0
Resize columns of HDF5 DataSet.
virtual bool setNPoints(size_t n)=0
Resize rows of HDF5 DataSet.
virtual H5HorizonParam getParam()=0
Get parameters that were used to create current points.
virtual bool writeData(Eigen::Ref< Eigen::MatrixXd > M, const std::string &unitsFrom="", const std::string &unitsTo="")=0
Write data to DataSet.
virtual std::optional< h5gt::DataSet > getHorizonD() const =0
Get current points DataSet.
virtual Eigen::VectorXd getComponent(const std::string &componentName, const std::string &unitsFrom="", const std::string &unitsTo="")=0
Read single component from DataSet.
virtual bool setDomain(const h5geo::Domain &domain)=0
Set domain for the points (TVD, TVDSS, TWT, OWT)
virtual h5geo::Domain getDomain()=0
Get domain (TVD, TVDSS, TWT, OWT)
virtual bool setComponents(const std::map< std::string, size_t > &components)=0
Set components.
virtual size_t getNPoints()=0
Return number of points for the horizon.
virtual Eigen::MatrixXd getData(const std::string &unitsFrom="", const std::string &unitsTo="")=0
Read data from DataSet.
Class for creating H5Horizon.
Definition h5base.h:87