ddt  1.0.0
imageHelpers.hpp
Go to the documentation of this file.
1 
20 #ifndef IMAGEHELPERS_HPP_
21 #define IMAGEHELPERS_HPP_
22 
23 //#include <algorithm>
24 //#include <cctype>
25 #include <tuple>
26 #include <vector>
27 #include <string>
28 
29 //#include <sys/stat.h>
30 
31 #include <cpl.h>
32 
33 // namespace ddt {
34 
44 std::vector<int> SubarrayLineInt(cpl_image *image, std::tuple<int, int> start,
45  std::tuple<int, int> end);
46 
51 std::vector<int> SubarrayLineInt(cpl_image *image, int x0, int y0, int x1,
52  int y1);
53 
58 std::vector<double> SubarrayLineDouble(cpl_image *image, int x0, int y0,
59  const int x1, const int y1);
60 
65 std::vector<std::vector<int>> SubarrayRectInt(cpl_image *image,
66  std::tuple<int, int> start,
67  std::tuple<int, int> end);
68 
74 std::vector<std::vector<int>> SubarrayRectInt(cpl_image *image, int llx,
75  int lly, int urx, int ury);
76 
81 cpl_image *SubImageRect(cpl_image *image, std::tuple<int, int> start,
82  std::tuple<int, int> end);
83 
88 cpl_image *SubImageRect(cpl_image *image, int llx, int lly, int urx, int ury);
89 
98 cpl_image *SubImageRectOutside(const cpl_image *const image, const int llx,
99  const int lly, const int urx, const int ury);
100 
113 cpl_image *SubImageCircular(const cpl_image *const image, const int xcenter,
114  const int ycenter, const int radius);
115 
128 cpl_image *SubImageCircularOutside(const cpl_image *const image,
129  const int xcenter, const int ycenter,
130  const int radius);
131 
145 double PixelDistance(const double startx, const double starty,
146  const double endx, const double endy,
147  double *const xoffset = nullptr,
148  double *const yoffset = nullptr);
149 
165 double PixelDistanceDegrees(const cpl_propertylist *const property_list,
166  const double startx, const double starty,
167  const double endx, const double endy,
168  double *const xoffsetdeg, double *const yoffsetdeg);
169 
175 double PixelToDegreesScalingFactor(const cpl_propertylist *const property_list);
176 
183 std::string ConvertDegreesToString(double deg);
184 
185 //} // namespace ddt
186 
187 #endif /* IMAGEHELPERS_HPP_ */
188 
std::vector< double > SubarrayLineDouble(cpl_image *image, int x0, int y0, const int x1, const int y1)
Definition: imageHelpers.cpp:87
double PixelDistance(const double startx, const double starty, const double endx, const double endy, double *const xoffset=nullptr, double *const yoffset=nullptr)
Definition: imageHelpers.cpp:302
cpl_image * SubImageCircularOutside(const cpl_image *const image, const int xcenter, const int ycenter, const int radius)
Definition: imageHelpers.cpp:269
std::vector< std::vector< int > > SubarrayRectInt(cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
Definition: imageHelpers.cpp:125
std::vector< int > SubarrayLineInt(cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
Definition: imageHelpers.cpp:34
double PixelDistanceDegrees(const cpl_propertylist *const property_list, const double startx, const double starty, const double endx, const double endy, double *const xoffsetdeg, double *const yoffsetdeg)
Definition: imageHelpers.cpp:317
double PixelToDegreesScalingFactor(const cpl_propertylist *const property_list)
Definition: imageHelpers.cpp:340
cpl_image * SubImageRect(cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
Definition: imageHelpers.cpp:173
std::string ConvertDegreesToString(double deg)
Definition: imageHelpers.cpp:364
cpl_image * SubImageCircular(const cpl_image *const image, const int xcenter, const int ycenter, const int radius)
Definition: imageHelpers.cpp:230
cpl_image * SubImageRectOutside(const cpl_image *const image, const int llx, const int lly, const int urx, const int ury)
Definition: imageHelpers.cpp:201