PICCANTE  0.4
The hottest HDR imaging library!
image_sampler.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_IMAGE_SAMPLERS_IMAGE_SAMPLER_HPP
19 #define PIC_IMAGE_SAMPLERS_IMAGE_SAMPLER_HPP
20 
21 #include "../image.hpp"
22 #include "../util/image_sampler.hpp"
23 
24 namespace pic {
25 
30 {
31 protected:
32  int dirs[3];
33 
34 public:
35 
40 
42 
43  void SetDirection(unsigned int direction)
44  {
45  dirs[ direction % 3] = 1;
46  dirs[(direction + 1) % 3] = 0;
47  dirs[(direction + 2) % 3] = 0;
48  }
49 
57  virtual void SampleImage(Image *img, float x, float y, float *vOut) {}
58 
66  virtual void SampleImageUC(Image *img, float x, float y, float *vOut) {}
67 
76  virtual void SampleImage(Image *img, float x, float y, float t, float *vOut) {}
77 };
78 
79 } // end namespace pic
80 
81 #endif /* PIC_IMAGE_SAMPLERS_IMAGE_SAMPLER_HPP */
ImageSampler()
ImageSampler.
Definition: image_sampler.hpp:39
The ImageSampler class.
Definition: image_sampler.hpp:29
virtual void SampleImageUC(Image *img, float x, float y, float *vOut)
SampleImageUC samples an image in unnormalized coordinates [0,width-1]x[0,height-1].
Definition: image_sampler.hpp:66
~ImageSampler()
Definition: image_sampler.hpp:41
int dirs[3]
Definition: image_sampler.hpp:32
virtual void SampleImage(Image *img, float x, float y, float t, float *vOut)
SampleImage samples an image in uniform coordiantes.
Definition: image_sampler.hpp:76
The Image class stores an image as buffer of float.
Definition: image.hpp:60
Definition: bilateral_separation.hpp:25
virtual void SampleImage(Image *img, float x, float y, float *vOut)
SampleImage samples an image in uniform coordiantes.
Definition: image_sampler.hpp:57
void SetDirection(unsigned int direction)
Definition: image_sampler.hpp:43