8#include "h5geo_export.h"
9#include "private/h5enum.h"
10#include "private/h5easyhull.h"
11#include "private/h5interpolation.h"
12#include "private/h5polyfit.h"
13#include "private/h5sort.h"
30#include <h5gt/H5File.hpp>
31#include <h5gt/H5Group.hpp>
32#include <h5gt/H5DataSet.hpp>
33#include <h5gt/H5DataSpace.hpp>
34#include <h5gt/H5Attribute.hpp>
39#error "unsupported char size"
43 O32_LITTLE_ENDIAN = 0x03020100ul,
44 O32_BIG_ENDIAN = 0x00010203ul,
45 O32_PDP_ENDIAN = 0x01000302ul,
46 O32_HONEYWELL_ENDIAN = 0x02030001ul
50 unsigned char bytes[4];
52} o32_host_order = { { 0, 1, 2, 3 } };
54#define O32_HOST_ORDER (o32_host_order.value)
60template<
typename Object,
typename T,
61 typename std::enable_if<
62 std::is_same<Object, h5gt::File>::value ||
63 std::is_same<Object, h5gt::Group>::value>::type* =
nullptr>
66 const std::string& datasetPath,
70 const std::string& unitsFrom =
"",
71 const std::string& unitsTo =
"");
74template<
typename Object,
typename D,
75 typename std::enable_if<
76 (std::is_same<Object, h5gt::File>::value ||
77 std::is_same<Object, h5gt::Group>::value) &&
78 std::is_arithmetic<typename D::Scalar>::value>::type* =
nullptr>
81 const std::string& datasetPath,
82 Eigen::DenseBase<D>& M,
83 const std::string& unitsFrom =
"",
84 const std::string& unitsTo =
"");
87template<
typename Object,
typename T,
88 typename std::enable_if<
89 (std::is_same<Object, h5gt::File>::value ||
90 std::is_same<Object, h5gt::Group>::value) &&
91 std::is_arithmetic<T>::value>::type* =
nullptr>
94 const std::string& datasetPath,
96 const std::string& unitsFrom =
"",
97 const std::string& unitsTo =
"");
100template<
typename Object,
typename T,
101 typename std::enable_if<
102 (std::is_same<Object, h5gt::File>::value ||
103 std::is_same<Object, h5gt::Group>::value) &&
104 std::is_arithmetic<T>::value>::type* =
nullptr>
107 const std::string& datasetPath,
109 const std::string& unitsFrom =
"",
110 const std::string& unitsTo =
"");
113template<
typename Object,
typename T,
114 typename std::enable_if<
115 std::is_same<Object, h5gt::File>::value ||
116 std::is_same<Object, h5gt::Group>::value>::type* =
nullptr>
119 const std::string& datasetPath,
123 const std::string& unitsFrom =
"",
124 const std::string& unitsTo =
"");
127template<
typename Object,
typename D,
128 typename std::enable_if<
129 (std::is_same<Object, h5gt::File>::value ||
130 std::is_same<Object, h5gt::Group>::value) &&
131 std::is_arithmetic<typename D::Scalar>::value>::type* =
nullptr>
134 const std::string& datasetPath,
135 Eigen::DenseBase<D>& M,
136 const std::string& unitsFrom =
"",
137 const std::string& unitsTo =
"");
140template<
typename Object,
typename T,
141 typename std::enable_if<
142 (std::is_same<Object, h5gt::File>::value ||
143 std::is_same<Object, h5gt::Group>::value) &&
144 std::is_arithmetic<T>::value>::type* =
nullptr>
147 const std::string& datasetPath,
149 const std::string& unitsFrom =
"",
150 const std::string& unitsTo =
"");
153template<
typename Object,
typename T,
154 typename std::enable_if<
155 (std::is_same<Object, h5gt::File>::value ||
156 std::is_same<Object, h5gt::Group>::value) &&
157 std::is_arithmetic<T>::value>::type* =
nullptr>
160 const std::string& datasetPath,
162 const std::string& unitsFrom =
"",
163 const std::string& unitsTo =
"");
166template <
typename Object,
typename T,
167 typename std::enable_if<
168 std::is_same<Object, h5gt::File>::value ||
169 std::is_same<Object, h5gt::Group>::value>::type* =
nullptr>
172 const std::string& datasetPath,
175 const std::string& unitsFrom =
"",
176 const std::string& unitsTo =
"");
179template<
typename Object,
typename D,
180 typename std::enable_if<
181 (std::is_same<Object, h5gt::File>::value ||
182 std::is_same<Object, h5gt::Group>::value ||
183 std::is_same<Object, h5gt::DataSet>::value) &&
184 std::is_arithmetic<typename D::Scalar>::value>::type* =
nullptr>
187 const std::string& datasetPath,
188 Eigen::DenseBase<D>& M,
189 const std::string& unitsFrom =
"",
190 const std::string& unitsTo =
"");
193template<
typename Object,
194 typename std::enable_if<
195 std::is_same<Object, h5gt::File>::value ||
196 std::is_same<Object, h5gt::Group>::value ||
197 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
200 const std::string& datasetPath,
201 const std::string& unitsFrom =
"",
202 const std::string& unitsTo =
"");
205template<
typename Object,
206 typename std::enable_if<
207 std::is_same<Object, h5gt::File>::value ||
208 std::is_same<Object, h5gt::Group>::value ||
209 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
212 const std::string& datasetPath,
213 const std::string& unitsFrom =
"",
214 const std::string& unitsTo =
"");
217template <
typename Object,
typename T,
218 typename std::enable_if<
219 std::is_same<Object, h5gt::File>::value ||
220 std::is_same<Object, h5gt::Group>::value ||
221 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
224 const std::string& attrName,
227 const std::string& unitsFrom =
"",
228 const std::string& unitsTo =
"");
231template<
typename Object,
typename D,
232 typename std::enable_if<
233 (std::is_same<Object, h5gt::File>::value ||
234 std::is_same<Object, h5gt::Group>::value ||
235 std::is_same<Object, h5gt::DataSet>::value) &&
236 std::is_arithmetic<typename D::Scalar>::value>::type* =
nullptr>
239 const std::string& attrName,
240 Eigen::DenseBase<D>& v,
241 const std::string& unitsFrom =
"",
242 const std::string& unitsTo =
"");
245template <
typename Object,
typename T,
246 typename std::enable_if<
247 (std::is_same<Object, h5gt::File>::value ||
248 std::is_same<Object, h5gt::Group>::value ||
249 std::is_same<Object, h5gt::DataSet>::value) &&
250 std::is_arithmetic<T>::value>::type* =
nullptr>
253 const std::string& attrName,
255 const std::string& unitsFrom =
"",
256 const std::string& unitsTo =
"");
259template <
typename Object,
typename T,
260 typename std::enable_if<
261 (std::is_same<Object, h5gt::File>::value ||
262 std::is_same<Object, h5gt::Group>::value ||
263 std::is_same<Object, h5gt::DataSet>::value) &&
264 std::is_arithmetic<T>::value>::type* =
nullptr>
267 const std::string& attrName,
269 const std::string& unitsFrom =
"",
270 const std::string& unitsTo =
"");
273template <
typename Object,
typename T,
274 typename std::enable_if<
275 std::is_same<Object, h5gt::File>::value ||
276 std::is_same<Object, h5gt::Group>::value||
277 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
280 const std::string& attrName,
283 const std::string& unitsFrom =
"",
284 const std::string& unitsTo =
"");
287template<
typename Object,
288 typename std::enable_if<
289 std::is_same<Object, h5gt::File>::value ||
290 std::is_same<Object, h5gt::Group>::value ||
291 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
294 const std::string& attrName,
295 const std::string& str);
298template<
typename Object,
typename D,
299 typename std::enable_if<
300 (std::is_same<Object, h5gt::File>::value ||
301 std::is_same<Object, h5gt::Group>::value ||
302 std::is_same<Object, h5gt::DataSet>::value) &&
303 std::is_arithmetic<typename D::Scalar>::value>::type* =
nullptr>
306 const std::string& attrName,
307 Eigen::DenseBase<D>& v,
308 const std::string& unitsFrom =
"",
309 const std::string& unitsTo =
"");
312template <
typename Object,
typename T,
313 typename std::enable_if<
314 (std::is_same<Object, h5gt::File>::value ||
315 std::is_same<Object, h5gt::Group>::value ||
316 std::is_same<Object, h5gt::DataSet>::value) &&
317 std::is_arithmetic<T>::value>::type* =
nullptr>
320 const std::string& attrName,
322 const std::string& unitsFrom =
"",
323 const std::string& unitsTo =
"");
326template <
typename Object,
typename T,
327 typename std::enable_if<
328 (std::is_same<Object, h5gt::File>::value ||
329 std::is_same<Object, h5gt::Group>::value ||
330 std::is_same<Object, h5gt::DataSet>::value) &&
331 std::is_arithmetic<T>::value>::type* =
nullptr>
334 const std::string& attrName,
336 const std::string& unitsFrom =
"",
337 const std::string& unitsTo =
"");
340template <
typename Object,
typename T,
341 typename std::enable_if<
342 std::is_same<Object, h5gt::File>::value ||
343 std::is_same<Object, h5gt::Group>::value||
344 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
347 const std::string& attrName,
352template <
typename Object,
typename T,
353 typename std::enable_if<
354 (std::is_same<Object, h5gt::File>::value ||
355 std::is_same<Object, h5gt::Group>::value ||
356 std::is_same<Object, h5gt::DataSet>::value) &&
357 std::is_enum<T>::value>::type* =
nullptr>
360 const std::string& attrName,
364template <
typename Object,
typename T,
365 typename std::enable_if<
366 (std::is_same<Object, h5gt::File>::value ||
367 std::is_same<Object, h5gt::Group>::value ||
368 std::is_same<Object, h5gt::DataSet>::value) &&
369 std::is_enum<T>::value>::type* =
nullptr>
372 const std::string& attrName,
376template <
typename Object,
typename T,
377 typename std::enable_if<
378 std::is_same<Object, h5gt::File>::value ||
379 std::is_same<Object, h5gt::Group>::value ||
380 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
383 const std::string& attrName,
388template<
typename Object,
typename T,
389 typename std::enable_if<
390 (std::is_same<Object, h5gt::File>::value ||
391 std::is_same<Object, h5gt::Group>::value ||
392 std::is_same<Object, h5gt::DataSet>::value) &&
393 std::is_enum<T>::value>::type* =
nullptr>
397template<
typename Object,
typename T,
398 typename std::enable_if<
399 (std::is_same<Object, h5gt::File>::value ||
400 std::is_same<Object, h5gt::Group>::value ||
401 std::is_same<Object, h5gt::DataSet>::value) &&
402 std::is_enum<T>::value>::type* =
nullptr>
406template<
typename Object,
407 typename std::enable_if<
408 std::is_same<Object, h5gt::File>::value ||
409 std::is_same<Object, h5gt::Group>::value ||
410 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
414template<
typename Object,
415 typename std::enable_if<
416 std::is_same<Object, h5gt::File>::value ||
417 std::is_same<Object, h5gt::Group>::value ||
418 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
420 Object&
object,
const std::string& attrName,
421 const std::string& unitsFrom =
"",
422 const std::string& unitsTo =
"");
425template<
typename Object,
426 typename std::enable_if<
427 std::is_same<Object, h5gt::File>::value ||
428 std::is_same<Object, h5gt::Group>::value ||
429 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
431 Object&
object,
const std::string& attrName,
432 const std::string& unitsFrom =
"",
433 const std::string& unitsTo =
"");
436template<
typename Object,
437 typename std::enable_if<
438 std::is_same<Object, h5gt::File>::value ||
439 std::is_same<Object, h5gt::Group>::value ||
440 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
442 Object&
object,
const std::string& attrName,
443 const std::string& unitsFrom =
"",
444 const std::string& unitsTo =
"");
447template<
typename Object,
448 typename std::enable_if<
449 std::is_same<Object, h5gt::File>::value ||
450 std::is_same<Object, h5gt::Group>::value ||
451 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
453 Object&
object,
const std::string& attrName,
454 const std::string& unitsFrom =
"",
455 const std::string& unitsTo =
"");
458template<
typename Object,
459 typename std::enable_if<
460 std::is_same<Object, h5gt::File>::value ||
461 std::is_same<Object, h5gt::Group>::value ||
462 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
464 Object&
object,
const std::string& attrName,
465 const std::string& unitsFrom =
"",
466 const std::string& unitsTo =
"");
469template<
typename Object,
470 typename std::enable_if<
471 std::is_same<Object, h5gt::File>::value ||
472 std::is_same<Object, h5gt::Group>::value ||
473 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
475 Object&
object,
const std::string& attrName,
476 const std::string& unitsFrom =
"",
477 const std::string& unitsTo =
"");
494 h5gt::DataSet& dataset,
495 const std::string& attrName,
496 const Eigen::DenseBase<D>& v,
505 h5gt::DataSet& dataset,
506 const std::string& attrName);
510H5GEO_EXPORT std::optional<h5gt::File> openFile(
511 const std::string& fileName);
512H5GEO_EXPORT std::optional<h5gt::Group> openGroup(
513 const std::string& fileName,
514 const std::string& groupName);
515H5GEO_EXPORT std::optional<h5gt::DataSet> openDataSet(
516 const std::string& fileName,
517 const std::string& dsetName);
519H5GEO_EXPORT std::vector<std::string> getRawBinHeaderNames();
520H5GEO_EXPORT std::vector<std::string> getRawTraceHeaderNames();
543 double src_x0,
double src_dx,
size_t src_nx,
544 double src_y0,
double src_dy,
size_t src_ny,
546 double rec_x0,
double rec_dx,
size_t rec_nx,
547 double rec_y0,
double rec_dy,
size_t rec_ny,
562H5GEO_EXPORT std::map<std::string, Eigen::VectorXd>
564 double x0,
double dx,
size_t nx,
565 double y0,
double dy,
size_t ny,
575 const std::string& bigger,
576 const std::string& smaller,
577 const CaseSensitivity& caseSensitivity = CaseSensitivity::CASE_INSENSITIVE);
583 std::string & mainStr,
const std::string & toErase);
589 std::string & mainStr,
const std::string & toErase);
591H5GEO_EXPORT
char getDelimiter(
592 const Delimiter& delimiter);
599 const std::vector<std::string> &nameList,
600 std::string baseName = std::string());
602H5GEO_EXPORT std::vector<std::string> splitString(
603 const std::string &s,
const std::string delimiter);
605H5GEO_EXPORT
void splitHeaderNames(
606 const std::vector<std::string> &headerNamesToSplit,
607 std::vector<std::string> &fullHeaderNames,
608 std::vector<std::string> &shortHeaderNames);
610H5GEO_EXPORT
void splitHeaderBytes(
611 const std::vector<std::string> &headerNamesToSplit,
612 std::vector<int> &bytesStart,
613 std::vector<int> &nBytes);
620H5GEO_EXPORT std::vector<std::string>
splitPath(
630H5GEO_EXPORT std::vector<std::string>
splitPath(
631 std::string path, std::string& filteredPath);
642 const std::string& path,
643 std::string& objName);
645H5GEO_EXPORT std::string getRelativePath(
646 const std::string& referencePath,
647 const std::string& objPath,
648 const CaseSensitivity& caseSensitivity = CaseSensitivity::CASE_INSENSITIVE);
650H5GEO_EXPORT
void getTraceHeaderNames(
651 std::vector<std::string> &fullHeaderNames,
652 std::vector<std::string> &shortHeaderNames);
653H5GEO_EXPORT std::vector<std::string> getTraceHeaderShortNames();
654H5GEO_EXPORT std::vector<std::string> getTraceHeaderFullNames();
656H5GEO_EXPORT
void getBinHeaderNames(
657 std::vector<std::string> &fullHeaderNames,
658 std::vector<std::string> &shortHeaderNames);
659H5GEO_EXPORT std::vector<std::string> getBinHeaderShortNames();
660H5GEO_EXPORT std::vector<std::string> getBinHeaderFullNames();
662H5GEO_EXPORT
void getTraceHeaderBytes(
663 std::vector<int> &bytesStart,
664 std::vector<int> &nBytes);
665H5GEO_EXPORT
void getBinHeaderBytes(
666 std::vector<int> &bytesStart,
667 std::vector<int> &nBytes);
669H5GEO_EXPORT
size_t getTraceHeaderCount();
670H5GEO_EXPORT
size_t getBinHeaderCount();
678 h5gt::DataSet& dataset,
679 const std::string& attrName);
776 const Eigen::Ref<const Eigen::VectorXf>& il,
777 const Eigen::Ref<const Eigen::VectorXf>& xl,
778 const Eigen::Ref<const Eigen::VectorXf>& x,
779 const Eigen::Ref<const Eigen::VectorXf>& y,
787 bool &isPlanReversed);
790 const Eigen::Ref<const Eigen::VectorXd>& il,
791 const Eigen::Ref<const Eigen::VectorXd>& xl,
792 const Eigen::Ref<const Eigen::VectorXd>& x,
793 const Eigen::Ref<const Eigen::VectorXd>& y,
801 bool &isPlanReversed);
803H5GEO_EXPORT
bool getSurveyInfoFromUnsortedData(
804 Eigen::Ref<Eigen::MatrixXf> il_xl,
805 Eigen::Ref<Eigen::VectorXf> x,
806 Eigen::Ref<Eigen::VectorXf> y,
814 bool &isPlanReversed);
816H5GEO_EXPORT
bool getSurveyInfoFromUnsortedData(
817 Eigen::Ref<Eigen::MatrixXd> il_xl,
818 Eigen::Ref<Eigen::VectorXd> x,
819 Eigen::Ref<Eigen::VectorXd> y,
827 bool &isPlanReversed);
836 const Eigen::Ref<const Eigen::VectorXf>& x,
837 const Eigen::Ref<const Eigen::VectorXf>& y,
838 float eps = std::numeric_limits<float>::epsilon());
841 const Eigen::Ref<const Eigen::VectorXd>& x,
842 const Eigen::Ref<const Eigen::VectorXd>& y,
843 double eps = std::numeric_limits<double>::epsilon());
846template<
typename Object,
847 typename std::enable_if<
848 std::is_same<Object, h5gt::File>::value ||
849 std::is_same<Object, h5gt::Group>::value ||
850 std::is_same<Object, h5gt::DataSet>::value>::type* =
nullptr>
851bool deleteAllAttributes(Object&
object);
855template<
typename Object,
856 typename std::enable_if<
857 std::is_same<Object, h5gt::File>::value ||
858 std::is_same<Object, h5gt::Group>::value>::type* =
nullptr>
869 Eigen::DenseBase<T>
const & M);
871template<
typename D,
typename T,
872 typename std::enable_if<
873 std::is_arithmetic<T>::value>::type* =
nullptr>
874h5gt::ElementSet rowCols2ElementSet(
876 const Eigen::DenseBase<D>& cols);
878template<
typename D,
typename T,
879 typename std::enable_if<
880 std::is_arithmetic<T>::value>::type* =
nullptr>
881h5gt::ElementSet rowsCol2ElementSet(
882 const Eigen::DenseBase<D>& rows,
892 const Eigen::DenseBase<D>& rows,
893 const Eigen::DenseBase<D>& cols);
896 typename std::enable_if<
897 std::is_arithmetic<T>::value>::type* =
nullptr>
898h5gt::ElementSet rowCols2ElementSet(
900 const std::vector<T>& cols);
903 typename std::enable_if<
904 std::is_arithmetic<T>::value>::type* =
nullptr>
905h5gt::ElementSet rowsCol2ElementSet(
906 const std::vector<T>& rows,
915 typename std::enable_if<
916 std::is_arithmetic<T>::value>::type* =
nullptr>
918 const std::vector<T>& rows,
919 const std::vector<T>& cols);
925#include "private/h5core_sr_settings.h"
928#include "private/h5coreimpl.h"
929#include "private/h5core_segy.h"
Provides API to work with seismic.
Definition h5seis.h:33
Basic namespace.
Definition h5base.h:29
std::vector< float > readFloatVecAttribute(Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:763
Eigen::VectorXd readDoubleEigenVecAttribute(Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:805
std::vector< double > readDoubleVecAttribute(Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:777
bool unlinkContent(Object &object)
unlinkContent Unlink everything in group
Definition h5coreimpl.h:897
H5GEO_EXPORT std::string generateName(const std::vector< std::string > &nameList, std::string baseName=std::string())
generateName generates unique name by adding "_i"
Definition h5core.cpp:481
bool _overwriteDataset(Object &node, const std::string &datasetPath, T *M, size_t nH5Rows, size_t nH5Cols, const std::string &unitsFrom="", const std::string &unitsTo="")
Create or overwrite DataSet.
Definition h5coreimpl.h:128
bool _readEnumAttribute(Object &holder, const std::string &attrName, T *v, size_t nElem)
Read enum data from Attribute.
Definition h5coreimpl.h:431
h5gt::ElementSet rowsCols2ElementSet(const Eigen::DenseBase< D > &rows, const Eigen::DenseBase< D > &cols)
rowsCols2ElementSet select rectilinear block of elements, i.e. uses double loop to select every possi...
Definition h5coreimpl.h:958
Eigen::VectorX< T > getDataFromIndexedDataset(h5gt::DataSet &dataset, const std::string &attrName)
Get data from indexed DataSet.
Definition h5coreimpl.h:851
bool _readDataset(Object &node, const std::string &datasetPath, T *M, size_t nElem, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from DataSet to buffer.
Definition h5coreimpl.h:222
bool readDataset(Object &node, const std::string &datasetPath, Eigen::DenseBase< D > &M, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from DataSet.
Definition h5coreimpl.h:262
bool _overwriteAttribute(Object &holder, const std::string &attrName, T *v, size_t nElem, const std::string &unitsFrom="", const std::string &unitsTo="")
Create or overwrite Attribute.
Definition h5coreimpl.h:501
bool _readAttribute(Object &holder, const std::string &attrName, T *v, size_t nElem, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:322
bool writeDataToIndexedDataset(h5gt::DataSet &dataset, const std::string &attrName, const Eigen::DenseBase< D > &v, bool resize)
writeDataToIndexedDataset Try to write vector to dataset with attribute where attribute is a single v...
Definition h5coreimpl.h:815
bool overwriteDataset(Object &node, const std::string &datasetPath, Eigen::DenseBase< D > &M, const std::string &unitsFrom="", const std::string &unitsTo="")
Create or overwrite DataSet.
Definition h5coreimpl.h:175
H5GEO_EXPORT bool getSurveyInfoFromSortedData(const Eigen::Ref< const Eigen::VectorXf > &il, const Eigen::Ref< const Eigen::VectorXf > &xl, const Eigen::Ref< const Eigen::VectorXf > &x, const Eigen::Ref< const Eigen::VectorXf > &y, double &origin_x, double &origin_y, double &orientation, double &ilSpacing, double &xlSpacing, bool &isILReversed, bool &isXLReversed, bool &isPlanReversed)
getSurveyInfoFromSortedData It is assumed that il, xl, x, y are IL_XL sorted: ind=sort_rows(il_xl),...
Definition h5core.cpp:948
bool overwriteResizableDataset(Object &node, const std::string &datasetPath, Eigen::DenseBase< D > &M, const std::string &unitsFrom="", const std::string &unitsTo="")
Resize and overwrite DataSet or create it if not exists.
Definition h5coreimpl.h:81
H5GEO_EXPORT std::string splitPathToParentAndObj(const std::string &path, std::string &objName)
splitPathToParentAndObj Return path to parent and object name. E.g. if path = /a/s then it returns /a...
Definition h5core.cpp:579
double readDoubleAttribute(Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:748
Eigen::MatrixXf readFloatEigenMtxDataset(Object &node, const std::string &datasetPath, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from DataSet.
Definition h5coreimpl.h:289
H5GEO_EXPORT ptrdiff_t getIndexFromAttribute(h5gt::DataSet &dataset, const std::string &attrName)
getIndexFromAttribute Get row/col from Datasets with attributes where attribute reflects the row/col ...
Definition h5core.cpp:701
Eigen::VectorXf readFloatEigenVecAttribute(Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:791
H5GEO_EXPORT std::vector< std::string > splitPath(std::string path)
splitPath Split path of type /path///to/where/things/happen// to output vector {"path",...
Definition h5core.cpp:544
float readFloatAttribute(Object &object, const std::string &attrName, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:734
bool readAttribute(Object &holder, const std::string &attrName, Eigen::DenseBase< D > &v, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from Attribute.
Definition h5coreimpl.h:361
H5GEO_EXPORT bool generatePRESTKGeometry(H5Seis *seis, double src_x0, double src_dx, size_t src_nx, double src_y0, double src_dy, size_t src_ny, double src_z, double rec_x0, double rec_dx, size_t rec_nx, double rec_y0, double rec_dy, size_t rec_ny, double rec_z, double orientation, bool moveRec)
As the generated geometry may be pretty big we write it to H5Seis object without returning any data.
Definition h5core.cpp:229
H5GEO_EXPORT std::map< std::string, Eigen::VectorXd > generateSTKGeometry(double x0, double dx, size_t nx, double y0, double dy, size_t ny, double z, double orientation)
Convenient function to generate STACK geometry.
Definition h5core.cpp:372
bool _overwriteResizableDataset(Object &node, const std::string &datasetPath, T *M, size_t nH5Rows, size_t nH5Cols, const std::string &unitsFrom="", const std::string &unitsTo="")
Resize and overwrite DataSet or create it if not exists.
Definition h5coreimpl.h:33
std::string readStringAttribute(Object &object, const std::string &attrName)
Read enum data from Attribute.
Definition h5coreimpl.h:714
bool overwriteAttribute(Object &holder, const std::string &attrName, const std::string &str)
Create or overwrite Attribute.
Definition h5coreimpl.h:549
std::vector< T > readEnumVecAttribute(Object &object, const std::string &attrName)
Read data from Attribute.
Definition h5coreimpl.h:475
H5GEO_EXPORT bool compareStrings(const std::string &bigger, const std::string &smaller, const CaseSensitivity &caseSensitivity=CaseSensitivity::CASE_INSENSITIVE)
compareStrings Return true if strings are equal.
Definition h5core.cpp:421
H5GEO_EXPORT void eraseAllSubStr(std::string &mainStr, const std::string &toErase)
eraseAllSubStr Erase all Occurrences of given substring from main string.
Definition h5core.cpp:454
H5GEO_EXPORT void eraseSubStr(std::string &mainStr, const std::string &toErase)
eraseSubStr First Occurrence of given substring from main string.
Definition h5core.cpp:442
Eigen::MatrixXd readDoubleEigenMtxDataset(Object &node, const std::string &datasetPath, const std::string &unitsFrom="", const std::string &unitsTo="")
Read data from DataSet.
Definition h5coreimpl.h:305
Eigen::VectorX< ptrdiff_t > find_index(Eigen::DenseBase< T > const &M)
find_index find all non-zero elements's indexes. Possible usage: Eigen::VectorX<ptrdiff_t> ind = find...
Definition h5coreimpl.h:910
bool _overwriteEnumAttribute(Object &holder, const std::string &attrName, T *v, size_t nElem)
Create or overwrite registered enum Attribute.
Definition h5coreimpl.h:627
H5GEO_EXPORT bool isStraightLine(const Eigen::Ref< const Eigen::VectorXf > &x, const Eigen::Ref< const Eigen::VectorXf > &y, float eps=std::numeric_limits< float >::epsilon())
check if all points lay on the same straight line taken from here: https://helloacm....
Definition h5core.cpp:1084
bool overwriteEnumAttribute(Object &holder, const std::string &attrName, T &v)
Create or overwrite registered enum Attribute.
Definition h5coreimpl.h:668
T readEnumAttribute(Object &object, const std::string &attrName)
Read data from Attribute.
Definition h5coreimpl.h:462