Image data unit containers and tools.
The central class for image data representation is Raster. It is the in-memory representation of the n-D arrays of FITS. A raster is defined by:
N;T;Position<N>, which is a sequence of indices, and can be viewed as an alias of std::array<long, N> or std::vector<long>;std::vector.Two specialization are provided for convenience:
PtrRaster merely stores a pointer to the data array;VecRaster owns itself the data as an std::vector.Functions which return a Raster generally return a VecRaster (e.g. ImageRaster::read()). All methods which take a Raster as input accept whatever flavor of it.
For convenience, makeRaster() functions enable raster creation without template parameters.
In addition, a few helper classes are defined:
Position, which was already mentioned, represents the shape of the raster, as well as the pixel positions;Region is a pair of Positions used for example to represent the raster domain or to read and write image regions;PositionIterator is used to screen a region – it is instanciated by begin() and end(), which in turn enables range loops over regions, e.g. for (const auto& p : image.domain()). Typedefs | |
| template<typename T , long N = 2> | |
| using | PtrRaster = Raster< T, N, T * > |
Raster which points to some external data (TContainer = T*). | |
| template<typename T , long N = 2> | |
| using | VecRaster = Raster< T, N, std::vector< T > > |
Raster which owns a data vector (TContainer = std::vector<T>). | |
Classes | |
| class | Position< N > |
| n-dimensional pixel position or image shape, i.e. set of integer coordinates. More... | |
| class | PositionIterator< N > |
A helper class to screen a Region. More... | |
| class | Raster< T, N, TContainer > |
| Data of a n-dimensional image (2D by default). More... | |
| struct | Region< N > |
| A n-D rectangle region, defined by its front and back positions (both inclusive), or front position and shape. More... | |
Macros | |
| #define | ELEFITS_FOREACH_RASTER_TYPE(MACRO) |
| Loop over supported raster types. More... | |