BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
RegionOfInterest (const IDetector2D &detector, double xlow, double ylow, double xup, double yup) | |
RegionOfInterest (const OutputData< double > &data, double xlow, double ylow, double xup, double yup) | |
RegionOfInterest & | operator= (const RegionOfInterest &other)=delete |
RegionOfInterest * | clone () const |
~RegionOfInterest () | |
double | getXlow () const |
double | getYlow () const |
double | getXup () const |
double | getYup () const |
size_t | detectorIndex (size_t roiIndex) const |
size_t | roiIndex (size_t detectorIndex) const |
size_t | roiSize () const |
size_t | detectorSize () const |
bool | isInROI (size_t detectorIndex) const |
std::unique_ptr< IAxis > | clipAxisToRoi (size_t axis_index, const IAxis &axis) const |
virtual void | transferToCPP () |
Private Member Functions | |
RegionOfInterest (double xlow, double ylow, double xup, double yup) | |
RegionOfInterest (const RegionOfInterest &other) | |
size_t | xcoord (size_t index, const std::vector< size_t > &dims) const |
size_t | ycoord (size_t index, const std::vector< size_t > &dims) const |
void | initFrom (const IAxis &x_axis, const IAxis &y_axis) |
Private Attributes | |
std::unique_ptr< Rectangle > | m_rectangle |
size_t | m_ax1 |
size_t | m_ay1 |
size_t | m_ax2 |
size_t | m_ay2 |
size_t | m_glob_index0 |
std::vector< size_t > | m_detector_dims |
std::vector< size_t > | m_roi_dims |
Defines rectangular area for the detector which will be simulated/fitted.
Definition at line 30 of file RegionOfInterest.h.
RegionOfInterest::RegionOfInterest | ( | const IDetector2D & | detector, |
double | xlow, | ||
double | ylow, | ||
double | xup, | ||
double | yup | ||
) |
Definition at line 19 of file RegionOfInterest.cpp.
References IDetector::getAxis(), and initFrom().
Referenced by clone().
RegionOfInterest::RegionOfInterest | ( | const OutputData< double > & | data, |
double | xlow, | ||
double | ylow, | ||
double | xup, | ||
double | yup | ||
) |
Definition at line 26 of file RegionOfInterest.cpp.
References OutputData< T >::getAxis(), OutputData< T >::getRank(), and initFrom().
|
default |
|
private |
Definition at line 37 of file RegionOfInterest.cpp.
|
private |
Definition at line 50 of file RegionOfInterest.cpp.
|
delete |
|
virtual |
Implements ICloneable.
Definition at line 43 of file RegionOfInterest.cpp.
References RegionOfInterest().
Referenced by IDetector2D::IDetector2D().
double RegionOfInterest::getXlow | ( | ) | const |
Definition at line 57 of file RegionOfInterest.cpp.
References m_rectangle.
Referenced by SimulationToPython::defineDetector(), and initFrom().
double RegionOfInterest::getYlow | ( | ) | const |
Definition at line 62 of file RegionOfInterest.cpp.
References m_rectangle.
Referenced by SimulationToPython::defineDetector(), and initFrom().
double RegionOfInterest::getXup | ( | ) | const |
Definition at line 67 of file RegionOfInterest.cpp.
References m_rectangle.
Referenced by SimulationToPython::defineDetector(), and initFrom().
double RegionOfInterest::getYup | ( | ) | const |
Definition at line 72 of file RegionOfInterest.cpp.
References m_rectangle.
Referenced by SimulationToPython::defineDetector(), and initFrom().
size_t RegionOfInterest::detectorIndex | ( | size_t | roiIndex | ) | const |
Converts roi index to the detector index.
Definition at line 77 of file RegionOfInterest.cpp.
References m_detector_dims, m_glob_index0, m_roi_dims, roiIndex(), xcoord(), and ycoord().
Referenced by SimulationArea::detectorIndex(), and isInROI().
size_t RegionOfInterest::roiIndex | ( | size_t | detectorIndex | ) | const |
Converts global detector index to ROI index.
Definition at line 83 of file RegionOfInterest.cpp.
References m_ax1, m_ax2, m_ay1, m_ay2, m_detector_dims, m_roi_dims, xcoord(), and ycoord().
Referenced by detectorIndex().
size_t RegionOfInterest::roiSize | ( | ) | const |
Number of detector bins in ROI area.
Definition at line 96 of file RegionOfInterest.cpp.
References m_roi_dims.
Referenced by SimulationArea::SimulationArea().
size_t RegionOfInterest::detectorSize | ( | ) | const |
Number of detector bins.
Definition at line 101 of file RegionOfInterest.cpp.
References m_detector_dims.
bool RegionOfInterest::isInROI | ( | size_t | detectorIndex | ) | const |
Definition at line 106 of file RegionOfInterest.cpp.
References detectorIndex(), m_ax2, m_ay2, m_detector_dims, xcoord(), and ycoord().
std::unique_ptr< IAxis > RegionOfInterest::clipAxisToRoi | ( | size_t | axis_index, |
const IAxis & | axis | ||
) | const |
Definition at line 117 of file RegionOfInterest.cpp.
References IAxis::getBin(), IAxis::getName(), m_ax1, m_ax2, m_ay1, m_ay2, Bin1D::m_lower, and Bin1D::m_upper.
|
inlineprivate |
Definition at line 80 of file RegionOfInterest.h.
Referenced by detectorIndex(), isInROI(), and roiIndex().
|
inlineprivate |
Definition at line 85 of file RegionOfInterest.h.
Referenced by detectorIndex(), isInROI(), and roiIndex().
Definition at line 125 of file RegionOfInterest.cpp.
References IAxis::findClosestIndex(), getXlow(), getXup(), getYlow(), getYup(), m_ax1, m_ax2, m_ay1, m_ay2, m_detector_dims, m_glob_index0, m_roi_dims, and IAxis::size().
Referenced by RegionOfInterest().
|
inlinevirtualinherited |
Used for Python overriding of clone (see swig/tweaks.py)
Definition at line 34 of file ICloneable.h.
|
private |
|
private |
Number of bins on detector axes corresponding to roi-rectangle.
Definition at line 73 of file RegionOfInterest.h.
Referenced by clipAxisToRoi(), initFrom(), and roiIndex().
|
private |
Definition at line 73 of file RegionOfInterest.h.
Referenced by clipAxisToRoi(), initFrom(), and roiIndex().
|
private |
Definition at line 73 of file RegionOfInterest.h.
Referenced by clipAxisToRoi(), initFrom(), isInROI(), and roiIndex().
|
private |
Definition at line 73 of file RegionOfInterest.h.
Referenced by clipAxisToRoi(), initFrom(), isInROI(), and roiIndex().
|
private |
Detector global index corresponding to the lower left corner of ROI.
Definition at line 75 of file RegionOfInterest.h.
Referenced by detectorIndex(), and initFrom().
|
private |
Definition at line 76 of file RegionOfInterest.h.
Referenced by detectorIndex(), detectorSize(), initFrom(), isInROI(), and roiIndex().
|
private |
Definition at line 77 of file RegionOfInterest.h.
Referenced by detectorIndex(), initFrom(), roiIndex(), and roiSize().