| 257 | } |
| 258 | |
| 259 | double TIFFImage::getMaxValue(int channel) { |
| 260 | if (!_maxValues.empty() && channel > 0 && channel < _maxValues.size()) { |
| 261 | return _maxValues[channel]; |
| 262 | } |
| 263 | else if (!_maxValues.empty()) { |
| 264 | return *std::max_element(_maxValues.begin(), _maxValues.end()); |
| 265 | } |
| 266 | else { |
| 267 | return std::numeric_limits<double>::max(); |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | void TIFFImage::cleanup() { |
| 272 | _tileSizesPerLevel.clear(); |