41 Buffer::Buffer() : p_sample(0), p_nsamps(0), p_line(0), p_nlines(0),
42 p_band(0), p_nbands(0), p_npixels(0), p_buf(0),
43 p_pixelType(None), p_rawbuf(0) { }
58 p_nsamps(nsamps), p_nlines(nlines),
59 p_nbands(nbands), p_pixelType(type) {
64 string message =
"Invalid value for sample dimensions (nsamps)";
68 string message =
"Invalid value for line dimensions (nlines)";
72 string message =
"Invalid value for band dimensions (nbands)";
119 const int start_line,
120 const int start_band) {
189 i_line =
Line(index);
190 i_band =
Band(index);
224 (i_line -
p_line) * (p_nsamps) +
261 string message =
"Input and output buffers are not the same size";
266 string message =
"Input and output buffers are not the same pixel type";
270 size_t n =
sizeof(double);
303 isSubareaOfIn &= (endSample <= otherEndSample);
304 isSubareaOfIn &= (endLine <= otherEndLine);
305 isSubareaOfIn &= (endBand <= otherEndBand);
308 for (
int i = 0; i <
size(); i++) {
313 return isSubareaOfIn;
323 p_nsamps(rhs.p_nsamps), p_nlines(rhs.p_nlines),
324 p_nbands(rhs.p_nbands), p_pixelType(rhs.p_pixelType) {