This class describes a tiff grayscale.
More...
#include <tiff_grayscale.hh>
|
| TIFFGrayscale (const std::filesystem::path &filename, std::size_t max_cache=8) |
| Constructs a new instance. More...
|
|
const TIFFGrayscaleRow & | operator[] (std::size_t row) const |
| Array indexer row operator. More...
|
|
double | operator() (double pos_x, double pos_y) noexcept |
| TIFF value by position call operator. More...
|
|
std::size_t | size () const |
| The size of rows for this file. More...
|
|
std::size_t | rows () const |
| The size of rows for this file. More...
|
|
std::size_t | cols () const |
| The size of cols for this file. More...
|
|
This class describes a tiff grayscale.
This class opens, closes, and query information from a single tiff image. Data can be queried using matrix like indices with the bracket operator or using space coordinates using the parenthesis operator.
◆ TIFFGrayscale()
Dune::Copasi::TIFFGrayscale::TIFFGrayscale |
( |
const std::filesystem::path & |
filename, |
|
|
std::size_t |
max_cache = 8 |
|
) |
| |
|
explicit |
Constructs a new instance.
- Parameters
-
[in] | filename | The filename |
[in] | max_cache | The maximum row cache. |
◆ cols()
std::size_t Dune::Copasi::TIFFGrayscale::cols |
( |
| ) |
const |
The size of cols for this file.
- Returns
- Number of cols in this file
◆ operator()()
double Dune::Copasi::TIFFGrayscale::operator() |
( |
double |
pos_x, |
|
|
double |
pos_y |
|
) |
| |
|
noexcept |
TIFF value by position call operator.
Here we assume that TIFFTAG_RESOLUTIONUNIT has same units as the grid. Since we never check grid units, we also do not check tiff units
- Parameters
-
[in] | pos_x | The x position in same units as the tiff file |
[in] | pos_y | The y position in same units as the tiff file |
- Returns
- Scaled TIFF value if x and y are in the TIFF domain, 0 otherwise
◆ operator[]()
const TIFFGrayscaleRow & Dune::Copasi::TIFFGrayscale::operator[] |
( |
std::size_t |
row | ) |
const |
Array indexer row operator.
- Warning
- Row object is only a proxy object and ... TODO
- Parameters
-
- Returns
- The row
◆ rows()
std::size_t Dune::Copasi::TIFFGrayscale::rows |
( |
| ) |
const |
The size of rows for this file.
- Returns
- Number of rows in this file
◆ size()
std::size_t Dune::Copasi::TIFFGrayscale::size |
( |
| ) |
const |
The size of rows for this file.
- Returns
- Number of rows in this file
The documentation for this class was generated from the following file: