13 #error This is a C++ include file and cannot be used from plain C
20 #include "cpl_image.h"
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);
251 inline cpl_size
GetSize()
const;
267 inline bool Status()
const;
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_FLOAT);
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_FLOAT);
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);
void Load(const std::string filename, const cpl_size plane=0, const cpl_size extension=0, cpl_type type=CPL_TYPE_FLOAT)
Load CPL image from a FITS file.
Definition: image.cpp:365
Image & operator+=(const double)
Overload operator+=.
Definition: image.cpp:510
void Unload()
Release CPL image.
Definition: image.cpp:325
This class is C++ wrapper for a CPL image object. It provides a simplified interface that allows to c...
Definition: image.hpp:43
void SetCplImage(cpl_image *image)
Set CPL image.
bool operator!=(const Image &) const
Overload operator!=.
Definition: image.cpp:654
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:271
cpl_size GetTypeSize() const
Get size of the image built-in type.
Definition: image.cpp:166
void SetBadPixelMap(const Mask &mask)
Set the bad pixel map.
Definition: image.cpp:733
Image & operator*=(const double)
Overload operator*=.
Definition: image.cpp:577
cpl_image * m_cpl_image
Definition: image.hpp:762
void Absolute()
Computes the image absolute.
Definition: image.cpp:220
This class handle the errors produced by the calling of image processing routines.
Definition: error.hpp:34
void Normalise(cpl_norm norm=CPL_NORM_SCALE)
Normalize the CPL image.
Definition: image.cpp:229
Image & operator=(const Image &)
Overload operator=.
Definition: image.cpp:601
bool Status() const
Get image status.
void Rebin(cpl_size xstart, cpl_size ystart, cpl_size xstep, cpl_size ystep, Image &new_image)
Image rebin.
Definition: image.cpp:284
Image & operator*(const double)
Overload operator*.
Definition: image.cpp:488
double Get(cpl_size xpos, cpl_size ypos) const
Get the value of a pixel at a given position.
Definition: image.cpp:682
void * GetImagePtr() const
Get pointer to image data.
virtual ~Image()
Class destructor.
Definition: image.cpp:146
cpl_size GetSize() const
Get image size.
void Logarithm(const double base)
Computes the image logarithm.
Definition: image.cpp:200
Image & operator-=(const double)
Overload operator-=.
Definition: image.cpp:532
bool IsImage() const
Check is CPL image is valid.
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:332
Image & operator+(const double)
Overload operator+.
Definition: image.cpp:421
cpl_size CountBadPixelMap()
Count the bad pixels.
Definition: image.cpp:751
void FillNoise(const double min_pix, const double max_pix)
It generates a CPL image with uniform random noise distribution.
Definition: image.cpp:303
void Power(const double exponent)
Computes the image power.
Definition: image.cpp:210
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:312
cpl_size GetWidth() const
Get image width.
void Set(cpl_size xpos, cpl_size ypos, double value)
Set the value of a pixel at a given position.
Definition: image.cpp:718
This class is C++ wrapper for a CPL mask object. It provides a simplified interface that allows to ca...
Definition: mask.hpp:37
cpl_type m_cpl_type
Definition: image.hpp:761
bool operator==(const Image &) const
Overload operator==.
Definition: image.cpp:626
cpl_size GetHeight() const
Get image height.
void Exponential(const double base)
Computes the image exponential.
Definition: image.cpp:190
void FFT(Image *imaginary, unsigned mode=CPL_FFT_DEFAULT)
Fast Fourier Transfor of a CPL image.
Definition: image.cpp:248
void Save(const std::string filename, cpl_type type=CPL_TYPE_FLOAT)
Save CPL image into a FITS file.
Definition: image.cpp:347
cpl_type GetCplType() const
Get CPL image type.
Image()
Class constructor.
Definition: image.cpp:24
cpl_image * GetCplImage() const
Get CPL image.
void Turn(int rotation=-1)
Rotate CPL image.
Definition: image.cpp:238
Image & operator/=(const double)
Overload operator/=.
Definition: image.cpp:554
Image & operator-(const double)
Overload operator-.
Definition: image.cpp:444
Image & operator/(const double)
Overload operator/.
Definition: image.cpp:466