13#error This is a C++ include file and cannot be used from plain C
66 explicit Image(
const cpl_size size_x,
67 const cpl_size size_y,
101 explicit Image(
const Image &image, cpl_type type);
188 const cpl_size startx,
189 const cpl_size starty,
190 const cpl_size size_single_det_x,
191 const cpl_size size_single_det_y,
192 const cpl_size size_gap_x,
193 const cpl_size size_gap_y);
304 const cpl_size pos_x,
305 const cpl_size pos_y);
315 void Save(
const std::string filename,
316 cpl_type type=CPL_TYPE_FLOAT);
328 void Load(
const std::string filename,
329 const cpl_size plane=0,
330 const cpl_size extension=0,
331 cpl_type type=CPL_TYPE_UNSPECIFIED);
348 void Load(
const std::string filename,
353 const cpl_size plane=0,
354 const cpl_size extension=0,
355 cpl_type type=CPL_TYPE_UNSPECIFIED);
379 double Get(cpl_size xpos, cpl_size ypos)
const;
389 void Get(cpl_size xpos, cpl_size ypos,
double *value);
399 void Set(cpl_size xpos, cpl_size ypos,
double value);
458 void Power (
const double exponent);
488 void Normalise (cpl_norm norm=CPL_NORM_SCALE);
501 void Turn (
int rotation=-1);
514 void FFT (
Image *imaginary,
unsigned mode=CPL_FFT_DEFAULT);
531 double assign_lo_cut,
532 double assign_hi_cut);
545 void Rebin(cpl_size xstart,
564 const double max_pix);
583 const double sigma_x,
584 const double sigma_y);
This class handle the errors produced by the calling of image processing routines.
Definition error.hpp:35
This class is C++ wrapper for a CPL image object. It provides a simplified interface that allows to c...
Definition image.hpp:44
bool Status() const
Get image status.
void FillNoise(const double min_pix, const double max_pix)
It generates a CPL image with uniform random noise distribution.
Definition image.cpp:283
void SetBadPixelMap(const Mask &mask)
Set the bad pixel map.
Definition image.cpp:684
cpl_type GetCplType() const
Get CPL image type.
cpl_image * m_cpl_image
Definition image.hpp:762
void Exponential(const double base)
Computes the image exponential.
Definition image.cpp:180
void Copy(const Image &, const cpl_size pos_x, const cpl_size pos_y)
Copy input image object in the coordinates specified.
Definition image.cpp:310
Image & operator*(const double)
Overload operator*.
Definition image.cpp:455
Image & operator=(const Image &)
Overload operator=.
Definition image.cpp:558
cpl_image * GetCplImage() const
Get CPL image.
Image & operator*=(const double)
Overload operator*=.
Definition image.cpp:536
bool IsImage() const
Check is CPL image is valid.
Image & operator+(const double)
Overload operator+.
Definition image.cpp:394
void FillGaussian(const double cen_x, const double cen_y, const double norm, const double sigma_x, const double sigma_y)
It generates an image from a 2d gaussian function.
Definition image.cpp:291
void Load(const std::string filename, const cpl_size plane=0, const cpl_size extension=0, cpl_type type=CPL_TYPE_UNSPECIFIED)
Load CPL image from a FITS file.
Definition image.cpp:340
cpl_size GetWidth() const
Get image width.
void Save(const std::string filename, cpl_type type=CPL_TYPE_FLOAT)
Save CPL image into a FITS file.
Definition image.cpp:324
void Turn(int rotation=-1)
Rotate CPL image.
Definition image.cpp:223
Image & operator/(const double)
Overload operator/.
Definition image.cpp:435
void SetCplImage(cpl_image *image)
Set CPL image.
void Unload()
Release CPL image.
Definition image.cpp:303
bool operator==(const Image &) const
Overload operator==.
Definition image.cpp:582
cpl_size CountBadPixelMap()
Count the bad pixels.
Definition image.cpp:700
virtual ~Image()
Class destructor.
Definition image.cpp:137
Image(const Mask &mask, const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury)
Copy constructor.
Image & operator/=(const double)
Overload operator/=.
Definition image.cpp:515
void Absolute()
Computes the image absolute.
Definition image.cpp:207
double Get(cpl_size xpos, cpl_size ypos) const
Get the value of a pixel at a given position.
Definition image.cpp:638
void Set(cpl_size xpos, cpl_size ypos, double value)
Set the value of a pixel at a given position.
Definition image.cpp:671
void Normalise(cpl_norm norm=CPL_NORM_SCALE)
Normalize the CPL image.
Definition image.cpp:215
cpl_type m_cpl_type
Definition image.hpp:761
void Logarithm(const double base)
Computes the image logarithm.
Definition image.cpp:189
void * GetImagePtr() const
Get pointer to image data.
void Rebin(cpl_size xstart, cpl_size ystart, cpl_size xstep, cpl_size ystep, Image &new_image)
Image rebin.
Definition image.cpp:265
void Power(const double exponent)
Computes the image power.
Definition image.cpp:198
void FFT(Image *imaginary, unsigned mode=CPL_FFT_DEFAULT)
Fast Fourier Transfor of a CPL image.
Definition image.cpp:232
cpl_size GetHeight() const
Get image height.
cpl_size GetSize() const
Get image size.
Image()
Class constructor.
Definition image.cpp:23
Image & operator-(const double)
Overload operator-.
Definition image.cpp:415
Image & operator+=(const double)
Overload operator+=.
Definition image.cpp:475
bool operator!=(const Image &) const
Overload operator!=.
Definition image.cpp:610
Image & operator-=(const double)
Overload operator-=.
Definition image.cpp:495
void Threshold(double lo_cut, double hi_cut, double assign_lo_cut, double assign_hi_cut)
Threshold a CPL image to a given interval.
Definition image.cpp:253
cpl_size GetTypeSize() const
Get size of the image built-in type.
Definition image.cpp:156
This class is C++ wrapper for a CPL mask object. It provides a simplified interface that allows to ca...
Definition mask.hpp:38