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. More...
|
|
| Mask (cpl_size width, cpl_size height) |
| Class constructor. More...
|
|
| Mask (const Mask &mask) |
| Copy constructor. More...
|
|
| Mask (const Mask &mask, const cpl_size llx, const cpl_size lly, const cpl_size urx, const cpl_size ury) |
| Copy constructor. More...
|
|
| Mask (const Image &image) |
| Copy constructor. More...
|
|
| Mask (const Image &image, double lo_cut, double hi_cut) |
| Copy constructor. More...
|
|
virtual | ~Mask () |
| Class destructor. More...
|
|
bool | IsMask () const |
| Check is CPL mask is not null. More...
|
|
void | GetMaskPtr (void **data_ptr) const |
| Get pointer to CPL mask data. More...
|
|
void * | GetMaskPtr () const |
| Get pointer to mask data. More...
|
|
cpl_mask * | GetCplMask () const |
| Get CPL mask pointer. More...
|
|
void | SetCplMask (cpl_mask *mask) |
| Set CPL mask. More...
|
|
cpl_size | GetWidth () const |
| Get mask width. More...
|
|
cpl_size | GetHeight () const |
| Get mask height. More...
|
|
void | Get (cpl_size width, cpl_size height, bool *value) const |
| Get value of an element in the mask. More...
|
|
bool | Get (cpl_size width, cpl_size height) const |
| Get value of an element in the mask. More...
|
|
void | Set (cpl_size row, cpl_size col, bool value) |
| Set an element value in the mask. More...
|
|
Mask & | operator= (const Mask &) |
| Overload operator=. More...
|
|
bool | operator== (const Mask &) const |
| Overload operator==. More...
|
|
bool | operator!= (const Mask &) const |
| Overload operator !=. More...
|
|
| Error () |
| Class constructor. More...
|
|
virtual | ~Error () |
| Class destructor. More...
|
|
void | ResetCplError () |
| Reset CPL error and internal error flag. More...
|
|
bool | CheckCplError () const |
| Check if there is an error in CPL. More...
|
|
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
Class constructor.
- Returns
- none
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
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
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
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
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
Class destructor.
- Returns
- none
void 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
bool 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
cpl_mask* odp::Mask::GetCplMask |
( |
| ) |
const |
|
inline |
Get CPL mask pointer.
- Returns
- CPL mask pointer
cpl_size odp::Mask::GetHeight |
( |
| ) |
const |
|
inline |
Get mask height.
- Returns
- Image height
void 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
void* odp::Mask::GetMaskPtr |
( |
| ) |
const |
|
inline |
Get pointer to mask data.
- Returns
- Pointer to the mask data
cpl_size odp::Mask::GetWidth |
( |
| ) |
const |
|
inline |
Get mask width.
- Returns
- Image width
bool odp::Mask::IsMask |
( |
| ) |
const |
|
inline |
Check is CPL mask is not null.
- Returns
- TRUE is CPL mask is not null, FALSE otherwise.
bool 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.
Mask & odp::Mask::operator= |
( |
const Mask & |
mask | ) |
|
Overload operator=.
- Parameters
-
[in] | mask | Input mask to be compared |
- Returns
- Reference to the object
bool 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.
void 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
void odp::Mask::SetCplMask |
( |
cpl_mask * |
mask | ) |
|
|
inline |
Set CPL mask.
- Parameters
-
- Returns
- none
std::ostream& operator<< |
( |
std::ostream & |
os, |
|
|
const Mask & |
mask |
|
) |
| |
|
friend |
cpl_mask* odp::Mask::m_cpl_mask |
|
protected |
The documentation for this class was generated from the following files: