1 /***************************************************************************
2 * This file is part of Tecorrec. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
5 * Tecorrec is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
10 * Tecorrec is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with Tecorrec. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
25 * @brief Hurrendously Large Images.
33 /** Hurrendously Large Images.
34 * This class is designed to help keep very large image files under control.
35 * This involves partial loading, mipmapping, and loading into GL textures.
36 * The assumption is that when processing we are only interested in the full
37 * resolution data (although probably only a small part of it).
44 * Constructors + destructor
47 /// Primary constructor.
48 tcHLImage(const QString
& filename
);
57 /// Get the width of the image.
60 /// Get the height of the image.
67 /// Get the thumbnail of the entire image.
68 GLuint
thumbnailTexture();
70 /** Set up the current texture with a full resolution portion of the image.
71 * Writes back to the coordinates to ensure they are accurate.
72 * @returns false on failure - in which case perhaps the region is too big
73 * try using thumbnailTexture in that case instead
75 bool setupTexture(double* x1
, double* y1
, double* x2
, double* y2
);
77 /// Prefetch a portion of the image.
78 void prefetch(int x
, int y
, int w
, int h
);
86 /// Width of the image file.
89 /// Height of the image file.
92 /// GDAL dataset object.
93 GDALDataset
* m_dataset
;
95 /// Thumbnail texture.