![]() |
EleFits
4.0.1
A modern C++ API on top of CFitsIO
|
Image data 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<n, long> or std::vector<long>;std::vector.Raster is an abstract class, to be extended with an actual data container. Two such concrete classes are provided:
PtrRaster merely stores a pointer to the data array;VecRaster owns itself the data as an std::vector.You can create your own raster types by inheriting from Raster.
All functions which return a Raster really 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 HDU regions;PositionIterator is used to screen a region like. Classes | |
| struct | Euclid::Fits::Position< n > |
| n-dimensional pixel position or image shape, i.e. set of integer coordinates. More... | |
| class | Euclid::Fits::PositionIterator< n > |
A helper class to screen a Region. More... | |
| class | Euclid::Fits::Raster< T, n > |
| Raster of a n-dimensional image (2D by default). More... | |
| class | Euclid::Fits::PtrRaster< T, n > |
| Raster of a n-dimensional image (2D by default). More... | |
| class | Euclid::Fits::VecRaster< T, n > |
| Copy constructor. More... | |
| struct | Euclid::Fits::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... | |
Functions | |
| template<typename T , typename... Longs> | |
| PtrRaster< T, sizeof...(Longs)> | Euclid::Fits::makeRaster (T *data, Longs... shape) |
| Shortcut to create a raster from a shape and data without specifying the template parameters. More... | |
| template<typename T , typename... Longs> | |
| VecRaster< T, sizeof...(Longs)> | Euclid::Fits::makeRaster (std::vector< T > data, Longs... shape) |
| Shortcut to create a raster from a shape and data without specifying the template parameters. More... | |