PICCANTE  0.4
The hottest HDR imaging library!
image_vec.hpp
Go to the documentation of this file.
1 /*
2 
3 PICCANTE
4 The hottest HDR imaging library!
5 http://vcg.isti.cnr.it/piccante
6 
7 Copyright (C) 2014
8 Visual Computing Laboratory - ISTI CNR
9 http://vcg.isti.cnr.it
10 First author: Francesco Banterle
11 
12 This Source Code Form is subject to the terms of the Mozilla Public
13 License, v. 2.0. If a copy of the MPL was not distributed with this
14 file, You can obtain one at http://mozilla.org/MPL/2.0/.
15 
16 */
17 
18 #ifndef PIC_GL_IMAGE_RAW_VEC_HPP
19 #define PIC_GL_IMAGE_RAW_VEC_HPP
20 
21 #include <vector>
22 
23 #include "../base.hpp"
24 
25 #include "../gl/image.hpp"
26 
27 namespace pic {
28 
32 typedef std::vector<ImageGL*> ImageGLVec;
33 
40 {
41  ImageGLVec ret;
42  ret.push_back(img);
43  return ret;
44 }
45 
53 {
54  ImageGLVec ret;
55  ret.push_back(img1);
56  ret.push_back(img2);
57  return ret;
58 }
59 
68 {
69  ImageGLVec ret;
70  ret.push_back(img1);
71  ret.push_back(img2);
72  ret.push_back(img3);
73  return ret;
74 }
75 
82 PIC_INLINE bool ImageGLVecCheck(ImageGLVec &imgIn, int minInputImages)
83 {
84  int n;
85  if(minInputImages < 0) {
86  n = int(imgIn.size());
87  } else {
88  if(imgIn.size() < minInputImages) {
89  return false;
90  }
91 
92  n = minInputImages;
93  }
94 
95  for(int i = 0; i < n; i ++) {
96  if(imgIn[i] == NULL) {
97  return false;
98  } else {
99  /*
100  * if(!imgIn[i]->isValid()) {
101  return false;
102  }*/
103  }
104  }
105 
106  return true;
107 }
108 
109 } // end namespace pic
110 
111 #endif /* PIC_GL_IMAGE_RAW_VEC_HPP */
112 
PIC_INLINE ImageGLVec SingleGL(ImageGL *img)
SingleGL creates a single for filters input.
Definition: image_vec.hpp:39
The ImageGL class.
Definition: image.hpp:42
#define PIC_INLINE
Definition: base.hpp:33
PIC_INLINE ImageGLVec TripleGL(ImageGL *img1, ImageGL *img2, ImageGL *img3)
TripleGL creates a triple for filters input.
Definition: image_vec.hpp:67
PIC_INLINE ImageGLVec DoubleGL(ImageGL *img1, ImageGL *img2)
DoubleGL creates a couple for filters input.
Definition: image_vec.hpp:52
Definition: bilateral_separation.hpp:25
PIC_INLINE bool ImageGLVecCheck(ImageGLVec &imgIn, int minInputImages)
ImageGLVecCheck.
Definition: image_vec.hpp:82
std::vector< ImageGL * > ImageGLVec
ImageGLVec an std::vector of pic::ImageGL.
Definition: image_vec.hpp:32