1 /*
2  */
3 
4 /*
5 
6     Copyright (C) 2014 Ferrero Andrea
7 
8     This program is free software: you can redistribute it and/or modify
9     it under the terms of the GNU General Public License as published by
10     the Free Software Foundation, either version 3 of the License, or
11     (at your option) any later version.
12 
13     This program is distributed in the hope that it will be useful,
14     but WITHOUT ANY WARRANTY; without even the implied warranty of
15     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16     GNU General Public License for more details.
17 
18     You should have received a copy of the GNU General Public License
19     along with this program. If not, see <http://www.gnu.org/licenses/>.
20 
21 
22  */
23 
24 /*
25 
26     These files are distributed with PhotoFlow - http://aferrero2707.github.io/PhotoFlow/
27 
28  */
29 
30 
31 #ifndef PF_IMAGE_HIERARCHY__HH
32 #define PF_IMAGE_HIERARCHY__HH
33 
34 #include <vips/vips.h>
35 #include <vector>
36 
37 namespace PF
38 {
39   struct IHElement
40   {
41     VipsImage* image;
42     int padding;
43   };
44 
45   struct IHArray
46   {
47     unsigned int size;
48     IHElement* vec;
49   };
50 
51   void image_hierarchy_free(IHArray* array);
52   IHArray* image_hierarchy_new();
53   void image_hierarchy_add_element(IHArray* array, VipsImage* el, int padding);
54   void image_hierarchy_fill(VipsImage* dest, int padding, std::vector<VipsImage*>& parents);
55   int image_hierarchy_compare_images(VipsImage* i0, VipsImage* i1);
56 }
57 
58 #endif
59