BornAgain
1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
|
Collection of detector masks.
Definition at line 42 of file DetectorMask.h.
Public Member Functions | |
DetectorMask (const DetectorMask &other) | |
DetectorMask (const IAxis &xAxis, const IAxis &yAxis) | |
~DetectorMask () | |
void | addMask (const IShape2D &shape, bool mask_value) |
Add mask to the stack of detector masks. The value "true" means that the area will be excluded from the analysis. More... | |
bool | hasMasks () const |
Returns true if has masks. More... | |
bool | isMasked (size_t index) const |
int | numberOfMaskedChannels () const |
size_t | numberOfMasks () const |
DetectorMask & | operator= (const DetectorMask &other) |
const MaskPattern * | patternAt (size_t iMask) const |
Private Member Functions | |
void | process_masks () |
Private Attributes | |
std::vector< bool > | m_masked |
int | m_number_of_masked_channels |
OwningVector< MaskPattern > | m_stack |
const IAxis * | m_xAxis |
const IAxis * | m_yAxis |
Definition at line 35 of file DetectorMask.cpp.
|
default |
DetectorMask::DetectorMask | ( | const DetectorMask & | other | ) |
Definition at line 44 of file DetectorMask.cpp.
void DetectorMask::addMask | ( | const IShape2D & | shape, |
bool | mask_value | ||
) |
Add mask to the stack of detector masks. The value "true" means that the area will be excluded from the analysis.
shape | The shape of mask. |
mask_value | The value of mask |
Definition at line 63 of file DetectorMask.cpp.
References IShape2D::clone(), OwningVector< T >::emplace_back(), m_stack, and process_masks().
bool DetectorMask::hasMasks | ( | ) | const |
Returns true if has masks.
Definition at line 74 of file DetectorMask.cpp.
References OwningVector< T >::empty(), and m_stack.
bool DetectorMask::isMasked | ( | size_t | index | ) | const |
Definition at line 69 of file DetectorMask.cpp.
References m_masked, and m_number_of_masked_channels.
|
inline |
size_t DetectorMask::numberOfMasks | ( | ) | const |
Definition at line 79 of file DetectorMask.cpp.
References m_stack, and OwningVector< T >::size().
DetectorMask & DetectorMask::operator= | ( | const DetectorMask & | other | ) |
Definition at line 53 of file DetectorMask.cpp.
References m_masked, m_number_of_masked_channels, and m_stack.
const MaskPattern * DetectorMask::patternAt | ( | size_t | iMask | ) | const |
Definition at line 84 of file DetectorMask.cpp.
References OwningVector< T >::at(), and m_stack.
|
private |
Definition at line 89 of file DetectorMask.cpp.
References IAxis::bin(), IShape2D::contains(), MaskPattern::doMask, OwningVector< T >::empty(), m_masked, m_number_of_masked_channels, m_stack, m_xAxis, m_yAxis, MaskPattern::shape, OwningVector< T >::size(), and IAxis::size().
Referenced by addMask().
|
private |
Definition at line 77 of file DetectorMask.h.
Referenced by isMasked(), operator=(), and process_masks().
|
private |
Definition at line 78 of file DetectorMask.h.
Referenced by isMasked(), numberOfMaskedChannels(), operator=(), and process_masks().
|
private |
Definition at line 73 of file DetectorMask.h.
Referenced by addMask(), hasMasks(), numberOfMasks(), operator=(), patternAt(), and process_masks().
|
private |
Definition at line 71 of file DetectorMask.h.
Referenced by process_masks().
|
private |
Definition at line 72 of file DetectorMask.h.
Referenced by process_masks().