82{
83 c3index omegaPeak = peak.cell[0];
84 c3index phiPeak = peak.cell[1];
85
86 c3index omegaLowerBound = std::max<unsigned short>(0, omegaPeak - m_peakFindingParams.omegaTrim);
87 c3index omegaUpperBound = std::min<unsigned short>(m_peakFindingParams.nOmega, omegaPeak + m_peakFindingParams.omegaTrim + 1);
88
89 for (c3index cotIdx = 0; cotIdx < m_peakFindingParams.nCot; ++cotIdx) {
90 for (c3index omegaIdx = omegaLowerBound; omegaIdx < omegaUpperBound; ++omegaIdx) {
91 c3index phiCell = phiPeak + omegaPeak - omegaIdx;
92 c3index relativePhi = phiCell - phiPeak;
93
94 if (relativePhi > 0) {
96 phiCell - m_peakFindingParams.phiTrim,
97 static_cast<c3index>(phiCell + m_peakFindingParams.phiTrim + std::floor(2.4 * relativePhi)),
98 omegaIdx,
99 cotIdx
100 };
101 clearHoughSpaceRow(firstBounds);
102 } else if (relativePhi < 0) {
104 static_cast<c3index>(phiCell - m_peakFindingParams.phiTrim + std::ceil(2.4 * relativePhi)),
105 phiCell + m_peakFindingParams.phiTrim + 1,
106 omegaIdx,
107 cotIdx
108 };
109 clearHoughSpaceRow(secondBounds);
110 } else {
112 phiCell - m_peakFindingParams.phiTrim,
113 phiCell + m_peakFindingParams.phiTrim + 1,
114 omegaIdx,
115 cotIdx
116 };
117 clearHoughSpaceRow(thirdBounds);
118 }
119 }
120 }
121}