PICCANTE  0.4
The hottest HDR imaging library!
tile.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_UTIL_TILE_HPP
19 #define PIC_UTIL_TILE_HPP
20 
21 #include <string>
22 
23 #include "../base.hpp"
24 
25 #include "../image.hpp"
26 #include "../util/bbox.hpp"
27 
28 namespace pic {
29 
33 class Tile
34 {
35 public:
36  int startX, startY;
37  int width, height;
38  std::string name;
40 
44  Tile()
45  {
46  startX = -1;
47  startY = -1;
48  width = -1;
49  height = -1;
50  name = "";
51  tile = NULL;
52  }
53 
55  {
56  if(tile != NULL) {
57  delete tile;
58  }
59 
60  tile = NULL;
61  }
62 
69  BBox getBBox(int img_width, int img_height)
70  {
71  BBox ret;
72  ret.setBox(startX,
73  startX + width,
74  startY,
75  startY + height,
76  0, 1, img_width, img_height, 1);
77  return ret;
78  }
79 };
80 
81 } // end namespace pic
82 
83 #endif /* PIC_UTIL_TILE_HPP */
84 
The BBox class manages the creation of bounding boxes for images.
Definition: bbox.hpp:29
int height
Definition: tile.hpp:37
void setBox(int x0, int x1, int y0, int y1, int z0, int z1, int width, int height, int frames)
setBox sets a BBox up.
Definition: bbox.hpp:129
BBox getBBox(int img_width, int img_height)
getBBox
Definition: tile.hpp:69
std::string name
Definition: tile.hpp:38
int startX
Definition: tile.hpp:36
The Image class stores an image as buffer of float.
Definition: image.hpp:60
Tile()
Tile.
Definition: tile.hpp:44
Image * tile
Definition: tile.hpp:39
int startY
Definition: tile.hpp:36
Definition: bilateral_separation.hpp:25
~Tile()
Definition: tile.hpp:54
The Tile class.
Definition: tile.hpp:33
int width
Definition: tile.hpp:37