EleFits  4.0.1
A modern C++ API on top of CFitsIO
Public Member Functions | Public Attributes | List of all members
Euclid::Fits::Test::SmallRaster Class Reference

#include <TestRaster.h>

Class Description

A 2D image Raster of floats.

Inheritance diagram for Euclid::Fits::Test::SmallRaster:
[legend]

Public Member Functions

 SmallRaster (long width=3, long height=2)
 Generate a SmallRaster with given width and height.
 
virtual ~SmallRaster ()=default
 Destructor.
 
bool approx (const Raster< float > &other, double tol=0.01) const
 Shortcut for rasterApprox.
 
- Public Member Functions inherited from Euclid::Fits::VecRaster< float >
virtual ~VecRaster ()=default
 Destructor.
 
 VecRaster (const VecRaster &)=default
 Copy constructor.
 
 VecRaster (VecRaster &&)=default
 Move constructor.
 
 VecRaster (Position< 2 > shape, std::vector< std::decay_t< float >> vec)
 Create a raster with given shape and values. More...
 
 VecRaster (Position< 2 > shape)
 Create a VecRaster with given shape and empty data.
 
 VecRaster ()=default
 Create an empty VecRaster.
 
VecRasteroperator= (const VecRaster &)=default
 Copy assignment.
 
VecRasteroperator= (VecRaster &&)=default
 Move assignment.
 
const std::vector< std::decay_t< float > > & vector () const
 Const reference to the vector.
 
std::vector< std::decay_t< float > > & moveTo (std::vector< std::decay_t< float >> &destination)
 Move the vector outside the raster. More...
 
- Public Member Functions inherited from Euclid::Fits::Raster< float, 2 >
virtual ~Raster ()=default
 Destructor.
 
 Raster (const Raster< float, n > &rhs)=default
 Copy constructor.
 
 Raster (Raster< float, n > &&rhs)=default
 Move constructor.
 
 Raster (Position< n > rasterShape)
 Create a raster with given shape.
 
Raster< float, n > & operator= (const Raster< float, n > &rhs)=default
 Copy assignment.
 
Raster< float, n > & operator= (Raster< float, n > &&rhs)=default
 Move assignment.
 
const Position< n > & shape () const
 Get the raster shape.
 
Region< n > domain () const
 Get raster domain. More...
 
long dimension () const
 Dimension. More...
 
long size () const
 Number of pixels.
 
long length () const
 Length along given axis.
 
const float * data () const
 Const pointer to the first data element.
 
float * data ()
 Pointer to the first data element.
 
long index (const Position< n > &pos) const
 Raw index of a position.
 
const float & operator[] (const Position< n > &pos) const
 Pixel at given position.
 
float & operator[] (const Position< n > &pos)
 Pixel at given position.
 
const float & at (const Position< n > &pos) const
 Access the value at given position. More...
 
float & at (const Position< n > &pos)
 Access the value at given position. More...
 
const PtrRaster< const float, m > slice (const Region< n > &region) const
 Create a slice from a given region. More...
 
PtrRaster< float, m > slice (const Region< n > &region)
 Create a slice from a given region. More...
 
const PtrRaster< const float, n > section (long front, long back) const
 Create a section at given index. More...
 
PtrRaster< float, n > section (long front, long back)
 Create a section at given index. More...
 
const PtrRaster< const float, n==-1 ? -1 :n - 1 > section (long index) const
 Create a section at given index. More...
 
PtrRaster< float, n==-1 ? -1 :n - 1 > section (long index)
 Create a section at given index. More...
 
bool isContiguous (const Region< n > &region) const
 Check whether a region is made of contiguous values in memory. More...
 

Public Attributes

long width
 Raster width.
 
long height
 Raster height.
 

Additional Inherited Members

- Public Types inherited from Euclid::Fits::Raster< float, 2 >
using Value = float
 The pixel value type.
 
- Static Public Attributes inherited from Euclid::Fits::Raster< float, 2 >
static constexpr long Dim
 The dimension template parameter. More...
 

The documentation for this class was generated from the following file: