19 size_t start_at_index)
20 : m_detector(detector)
21 , m_index(start_at_index)
22 , m_maxIndex(m_detector->sizeOfRegionOfInterest())
26 throw std::runtime_error(
"SimulationAreaIterator::SimulationAreaIterator() "
27 "-> Error. Invalid initial index");
72 size_t result = ++currentIndex;
Defines class DetectorMask.
Defines common detector interface.
Abstract detector interface.
size_t sizeOfRegionOfInterest() const
The size of the "Region of Interest". Same as totalSize() if no region of interest has been explicitl...
size_t regionOfInterestIndexToDetectorIndex(size_t regionOfInterestIndex) const
Convert an index of the region of interest to an index of the detector. If no region of interest is s...
const DetectorMask * detectorMask() const
An iterator for SimulationArea.
size_t detectorIndex() const
SimulationAreaIterator createEnd() const
Convenience function to create an end-iterator matching to this iterator.
Mode
Mode how the points shall be traversed.
@ regionOfInterest
iterate over all points in "region of interest", no matter whether masked
size_t nextIndex(size_t currentIndex)
size_t m_maxIndex
ROI related maximum index.
bool isMasked(size_t index) const
Check whether masked according to the actual mode (always false if mode is regionOfInterest)....
const IDetector * m_detector
SimulationAreaIterator(const IDetector *detector, Mode mode, size_t start_at_index)
SimulationAreaIterator & operator++()
prefix increment
size_t m_index
ROI related index.
static SimulationAreaIterator createBegin(const IDetector *detector, Mode mode)
Create begin-iterator to iterate over all points according to the given mode.