This class is C++ wrapper for a CPL mask object. It provides a simplified interface that allows to call CPL routines from INS applications.
More...
#include <mask.hpp>
|
| Mask () |
| Class constructor.
|
|
| Mask (cpl_size width, cpl_size height) |
| Class constructor.
|
|
| Mask (const Mask &mask) |
| Copy constructor.
|
|
| Mask (const Mask &mask, const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) |
| Copy constructor.
|
|
| Mask (const Image &image) |
| Copy constructor.
|
|
| Mask (const Image &image, double lo_cut, double hi_cut) |
| Copy constructor.
|
|
virtual | ~Mask () |
| Class destructor.
|
|
bool | IsMask () const |
| Check is CPL mask is not null.
|
|
void | GetMaskPtr (void **data_ptr) const |
| Get pointer to CPL mask data.
|
|
void * | GetMaskPtr () const |
| Get pointer to mask data.
|
|
cpl_mask * | GetCplMask () const |
| Get CPL mask pointer.
|
|
void | SetCplMask (cpl_mask *mask) |
| Set CPL mask.
|
|
cpl_size | GetWidth () const |
| Get mask width.
|
|
cpl_size | GetHeight () const |
| Get mask height.
|
|
void | Get (cpl_size width, cpl_size height, bool *value) const |
| Get value of an element in the mask.
|
|
bool | Get (cpl_size width, cpl_size height) const |
| Get value of an element in the mask.
|
|
void | Set (cpl_size row, cpl_size col, bool value) |
| Set an element value in the mask.
|
|
Mask & | operator= (const Mask &) |
| Overload operator=.
|
|
bool | operator== (const Mask &) const |
| Overload operator==.
|
|
bool | operator!= (const Mask &) const |
| Overload operator !=.
|
|
| Error () |
| Class constructor.
|
|
virtual | ~Error () |
| Class destructor.
|
|
void | ResetCplError () |
| Reset CPL error and internal error flag.
|
|
bool | CheckCplError () const |
| Check if there is an error in CPL.
|
|
|
std::string | GetErrorMsg () const |
| Get CPL error message.
|
|
This class is C++ wrapper for a CPL mask object. It provides a simplified interface that allows to call CPL routines from INS applications.
Mask - CPL mask wrapper class
- See also
- CPL Reference: http://www.eso.org/observing/cpl/reference_3.0/ or above
◆ Mask() [1/6]
Class constructor.
- Returns
- none
◆ Mask() [2/6]
ifw::odp::Mask::Mask |
( |
cpl_size | width, |
|
|
cpl_size | height ) |
|
explicit |
Class constructor.
- Parameters
-
[in] | width | Number of mask rows |
[in] | height | Number of mask columns |
- Returns
- none
- See also
- CPL function: cpl_mask_new
◆ Mask() [3/6]
ifw::odp::Mask::Mask |
( |
const Mask & | mask | ) |
|
|
explicit |
Copy constructor.
- Parameters
-
[in] | mask | Reference to the mask to be copied |
- Returns
- none
- See also
- CPL function: cpl_mask_duplicate
◆ Mask() [4/6]
ifw::odp::Mask::Mask |
( |
const Mask & | mask, |
|
|
const cpl_size | llx, |
|
|
const cpl_size | lly, |
|
|
const cpl_size | urx, |
|
|
const cpl_size | ury ) |
|
explicit |
Copy constructor.
- Parameters
-
[in] | mask | Reference to the mask to be copied |
[in] | llx | Lower left X coordinate. |
[in] | lly | Lower left Y coordinate. |
[in] | urx | Upper right X coordinate. |
[in] | ury | Upper right Y coordinate. |
- Returns
- none
- See also
- CPL function: cpl_mask_extract
◆ Mask() [5/6]
ifw::odp::Mask::Mask |
( |
const Image & | image | ) |
|
|
explicit |
Copy constructor.
- Parameters
-
[in] | image | Reference to the image that will copied into the mask |
- Returns
- none
This constructor can be used to load a mask from a cpl_image object. It goes through each value of the image and set mask value to CPL_BINARY_1 if the image pixel value at that position is different from zero.
- See also
- CPL function: cpl_mask_new
◆ Mask() [6/6]
ifw::odp::Mask::Mask |
( |
const Image & | image, |
|
|
double | lo_cut, |
|
|
double | hi_cut ) |
|
explicit |
Copy constructor.
- Parameters
-
[in] | image | Reference to the image that will copied into the mask |
[in] | lo_cut | Lower bound for threshold |
[in] | hi_cut | Higher bound for threshold |
- Returns
- none
- See also
- CPL function: cpl_mask_threshold_image_create
◆ ~Mask()
ifw::odp::Mask::~Mask |
( |
| ) |
|
|
virtual |
Class destructor.
- Returns
- none
◆ Get() [1/2]
bool ifw::odp::Mask::Get |
( |
cpl_size | width, |
|
|
cpl_size | height ) const |
Get value of an element in the mask.
- Parameters
-
[in] | width | Row identifier. |
[in] | height | Column identifier. |
- Returns
- value of an element in the mask.
- See also
- CPL function: cpl_mask_get
◆ Get() [2/2]
void ifw::odp::Mask::Get |
( |
cpl_size | width, |
|
|
cpl_size | height, |
|
|
bool * | value ) const |
Get value of an element in the mask.
- Parameters
-
[in] | width | Row identifier. |
[in] | height | Column identifier. |
[out] | value | Value of the element. |
- Returns
- none
- See also
- CPL function: cpl_mask_get
◆ GetCplMask()
cpl_mask * ifw::odp::Mask::GetCplMask |
( |
| ) |
const |
|
inline |
Get CPL mask pointer.
- Returns
- CPL mask pointer
◆ GetHeight()
cpl_size ifw::odp::Mask::GetHeight |
( |
| ) |
const |
|
inline |
Get mask height.
- Returns
- Image height
◆ GetMaskPtr() [1/2]
void * ifw::odp::Mask::GetMaskPtr |
( |
| ) |
const |
|
inline |
Get pointer to mask data.
- Returns
- Pointer to the mask data
◆ GetMaskPtr() [2/2]
void ifw::odp::Mask::GetMaskPtr |
( |
void ** | data_ptr | ) |
const |
Get pointer to CPL mask data.
- Parameters
-
[out] | data_ptr | Pointer to the mask data. |
- Returns
- none
- See also
- CPL function: cpl_mask_get_data
◆ GetWidth()
cpl_size ifw::odp::Mask::GetWidth |
( |
| ) |
const |
|
inline |
Get mask width.
- Returns
- Image width
◆ IsMask()
bool ifw::odp::Mask::IsMask |
( |
| ) |
const |
|
inline |
Check is CPL mask is not null.
- Returns
- TRUE is CPL mask is not null, FALSE otherwise.
◆ operator!=()
bool ifw::odp::Mask::operator!= |
( |
const Mask & | mask | ) |
const |
Overload operator !=.
- Parameters
-
[in] | mask | Input mask to be compared |
- Returns
- True or false depending of the operator result.
◆ operator=()
Mask & ifw::odp::Mask::operator= |
( |
const Mask & | mask | ) |
|
Overload operator=.
- Parameters
-
[in] | mask | Input mask to be compared |
- Returns
- Reference to the object
◆ operator==()
bool ifw::odp::Mask::operator== |
( |
const Mask & | mask | ) |
const |
Overload operator==.
- Parameters
-
[in] | mask | Input mask to be compared |
- Returns
- True or false depending of the operator result.
◆ Set()
void ifw::odp::Mask::Set |
( |
cpl_size | row, |
|
|
cpl_size | col, |
|
|
bool | value ) |
Set an element value in the mask.
- Parameters
-
[in] | row | Row identifier. |
[in] | col | Column identifier. |
[in] | value | Value of the element. |
- Returns
- none
- See also
- CPL function: cpl_mask_set
◆ SetCplMask()
void ifw::odp::Mask::SetCplMask |
( |
cpl_mask * | mask | ) |
|
|
inline |
Set CPL mask.
- Parameters
-
- Returns
- none
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const Mask & | mask ) |
|
friend |
◆ m_cpl_mask
cpl_mask* ifw::odp::Mask::m_cpl_mask |
|
protected |
The documentation for this class was generated from the following files: