Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Corryvreckan
Corryvreckan
Commits
e1d7d51c
Commit
e1d7d51c
authored
Jul 03, 2018
by
Simon Spannagel
Browse files
ROI: if no ROI given, always return true when checking
parent
27b10c3c
Pipeline
#434444
passed with stages
in 3 minutes and 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/core/detector/Detector.cpp
View file @
e1d7d51c
...
...
@@ -285,6 +285,11 @@ double Detector::inPixelY(const PositionVector3D<Cartesian3D<double>> localPosit
// Check if track position is within ROI:
bool
Detector
::
isWithinROI
(
const
Track
*
track
)
{
// Empty region of interest:
if
(
m_roi
.
empty
())
{
return
true
;
}
// Check that track is within region of interest using winding number algorithm
auto
localIntercept
=
this
->
getLocalIntercept
(
track
);
auto
coordinates
=
std
::
make_pair
(
this
->
getColumn
(
localIntercept
),
this
->
getRow
(
localIntercept
));
...
...
@@ -299,6 +304,11 @@ bool Detector::isWithinROI(const Track* track) {
// Check if cluster is within ROI and/or touches ROI border:
bool
Detector
::
isWithinROI
(
Cluster
*
cluster
)
{
// Empty region of interest:
if
(
m_roi
.
empty
())
{
return
true
;
}
// Loop over all pixels of the cluster
for
(
auto
&
pixel
:
(
*
cluster
->
pixels
()))
{
if
(
winding_number
(
pixel
->
coordinates
(),
m_roi
)
==
0
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment