hdf5opencv.h
Go to the documentation of this file.
1 //
2 // Created by julian on 21.09.16.
3 //
4 
5 #ifndef ECHELLESIMULATOR_HDF5OPENCV_H
6 #define ECHELLESIMULATOR_HDF5OPENCV_H
7 
8 // Copyright (C) 2010 Daniel Maturana
9 // This file is part of hdf5opencv.
10 //
11 // hdf5opencv is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // hdf5opencv is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with hdf5opencv. If not, see <http://www.gnu.org/licenses/>.
23 //
24 
25 #ifndef HDF5OPENCV_KVHWT01S
26 #define HDF5OPENCV_KVHWT01S
27 
28 #include <stdexcept>
29 #include <exception>
30 #include <string>
31 
32 #include "opencv/cv.h"
33 
34 // #include "hdf5.h"
35 #include "H5Cpp.h"
36 
37 #if (H5_VERS_MINOR==6)
38 #include "H5LT.h"
39 #else
40 #include "hdf5_hl.h"
41 #endif
42 
43 namespace hdf5opencv
44 {
45 
46  class Hdf5OpenCVException : public std::runtime_error {
47  public:
48  Hdf5OpenCVException(const std::string& what_arg) :
49  std::runtime_error(what_arg) { }
50  };
51 
52  void hdf5create(const char *filename,
53  bool overwrite = false);
54 
55  void hdf5save(const char * filename,
56  const char * dataset_name,
57  cv::Mat& dataset,
58  bool overwrite = false);
59 
60  void hdf5save(const char * filename,
61  const char * dataset_name,
62  const char * strbuf,
63  bool overwrite = false);
64 
65  void hdf5load(const char * filename,
66  const char * dataset_name,
67  cv::Mat& dataset);
68 
69  void hdf5load(const char * filename,
70  const char * dataset_name,
71  char ** strbuf);
72 
73 } /* hdf5opencv */
74 
75 #endif /* end of include guard: HDF5OPENCV_KVHWT01S */
76 
77 #endif //ECHELLESIMULATOR_HDF5OPENCV_H
void hdf5load(const char *filename, const char *dataset_name, cv::Mat &dataset)
Definition: hdf5opencv.cpp:151
void hdf5create(const char *filename, bool overwrite=false)
Definition: hdf5opencv.cpp:263
void hdf5save(const char *filename, const char *dataset_name, cv::Mat &dataset, bool overwrite=false)
Definition: hdf5opencv.cpp:92
Definition: hdf5opencv.h:46
Hdf5OpenCVException(const std::string &what_arg)
Definition: hdf5opencv.h:48
Definition: hdf5opencv.h:43