1 #ifndef TIFFDENSITYFILE_H
3 #define TIFFDENSITYFILE_H
16 bool init(
const std::string &fileName);
17 int getWidth()
const {
return m_width; }
18 int getHeight()
const {
return m_height; }
19 double getValue(
int x,
int y)
const;
21 bool readTiffFile(
const std::string &fileName);
23 int m_width, m_height;
24 std::vector<double> m_values;
30 Tile(
size_t s) { m_buffer.resize(s); }
31 Tile(
const Tile &src) { m_buffer = src.m_buffer; }
32 float *getData() { assert(m_buffer.size() > 0);
return &(m_buffer[0]); }
34 std::vector<float> m_buffer;
38 inline double TIFFDensityFile::getValue(
int x,
int y)
const
40 assert(x >= 0 && x < m_width);
41 assert(y >= 0 && y < m_height);
43 int idx = x + y*m_width;
44 assert(idx >= 0 && idx < m_values.size());
49 #endif // TIFFDENSITYFILE_H
Base class which allows an error message to be set.
Definition: errorbase.h:49