ddt  0.1
imageHelpers.hpp
Go to the documentation of this file.
1 // @copyright
2 // (c) Copyright ESO 2020
3 // All Rights Reserved
4 // ESO (eso.org) is an Intergovernmental Organization, and therefore special
5 // legal conditions apply.
6 //
7 // @file imageHelpers.hpp
8 // @brief Helper function declaration.
9 //
10 // This file is part of the DDT Image Handling Library and
11 // provides helper functions for handling of CPL images.
12 //
13 // @author Christoph Bortlisz, CGI
14 // @since 2020/07/29
15 //
16 
17 #ifndef IMAGEHELPERS_HPP_
18 #define IMAGEHELPERS_HPP_
19 
20 //#include <algorithm>
21 //#include <cctype>
22 #include <tuple>
23 #include <vector>
24 
25 //#include <sys/stat.h>
26 
27 #include <cpl.h>
28 
29 // namespace ddt {
30 
47 std::vector<int> SubarrayLineInt(cpl_image *image, std::tuple<int, int> start,
48  std::tuple<int, int> end);
49 
54 std::vector<int> SubarrayLineInt(cpl_image *image, int x0, int y0, int x1,
55  int y1);
56 
61 std::vector<double> SubarrayLineDouble(cpl_image *image, int x0, int y0,
62  const int x1, const int y1);
63 
67 std::vector<std::vector<int>> SubarrayRectInt(cpl_image *image,
68  std::tuple<int, int> start,
69  std::tuple<int, int> end);
70 
75 std::vector<std::vector<int>> SubarrayRectInt(cpl_image *image, int llx,
76  int lly, int urx, int ury);
77 
81 cpl_image *SubImageRect(cpl_image *image, std::tuple<int, int> start,
82  std::tuple<int, int> end);
83 
87 cpl_image *SubImageRect(cpl_image *image, int llx, int lly, int urx, int ury);
88 
94 cpl_image *SubImageCircular(cpl_image *image, int xcenter, int ycenter,
95  int radius);
96 
97 //} // namespace ddt
98 
99 #endif /* IMAGEHELPERS_HPP_ */
SubarrayLineInt
std::vector< int > SubarrayLineInt(cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
Definition: imageHelpers.cpp:37
SubImageCircular
cpl_image * SubImageCircular(cpl_image *image, int xcenter, int ycenter, int radius)
Definition: imageHelpers.cpp:202
SubarrayRectInt
std::vector< std::vector< int > > SubarrayRectInt(cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
Definition: imageHelpers.cpp:128
SubImageRect
cpl_image * SubImageRect(cpl_image *image, std::tuple< int, int > start, std::tuple< int, int > end)
Definition: imageHelpers.cpp:176
SubarrayLineDouble
std::vector< double > SubarrayLineDouble(cpl_image *image, int x0, int y0, const int x1, const int y1)
Definition: imageHelpers.cpp:90