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
3780de8b
Commit
3780de8b
authored
Nov 09, 2018
by
Simon Spannagel
Browse files
Fix bug in ClusteringSpatial introduced when fixing compiler warnings
parent
dfd6ef56
Pipeline
#579849
passed with stages
in 4 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/modules/ClusteringSpatial/ClusteringSpatial.cpp
View file @
3780de8b
...
...
@@ -58,10 +58,12 @@ StatusCode ClusteringSpatial::run(std::shared_ptr<Clipboard> clipboard) {
int
nRows
=
m_detector
->
nPixelsY
();
int
nCols
=
m_detector
->
nPixelsX
();
//
F
ill the hitmap with pixels
for
(
auto
&
pixel
:
(
*
pixels
))
{
//
Pre-f
ill the hitmap with pixels
for
(
auto
pixel
:
(
*
pixels
))
{
hitmap
[
pixel
->
row
()][
pixel
->
column
()]
=
pixel
;
}
for
(
auto
pixel
:
(
*
pixels
))
{
if
(
used
[
pixel
])
{
continue
;
}
...
...
@@ -75,8 +77,7 @@ StatusCode ClusteringSpatial::run(std::shared_ptr<Clipboard> clipboard) {
// Somewhere to store found neighbours
Pixels
neighbours
;
// Now we check the neighbours and keep adding more hits while there are
// connected pixels
// Now we check the neighbours and keep adding more hits while there are connected pixels
while
(
addedPixel
)
{
addedPixel
=
false
;
...
...
@@ -89,8 +90,7 @@ StatusCode ClusteringSpatial::run(std::shared_ptr<Clipboard> clipboard) {
if
(
col
<
0
||
col
>=
nCols
)
continue
;
// If no pixel in this position, or is already in a cluster, do
// nothing
// If no pixel in this position, or is already in a cluster, do nothing
if
(
!
hitmap
[
row
][
col
])
continue
;
if
(
used
[
hitmap
[
row
][
col
]])
...
...
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