SourceXtractorPlusPlus
0.8
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
CheckImages
DetectionIdCheckImage.cpp
Go to the documentation of this file.
1
17
/*
18
* DetectionIdCheckImage.cpp
19
*
20
* Created on: Jun 25, 2018
21
* Author: mschefer
22
*/
23
24
#include "
SEImplementation/Property/PixelCoordinateList.h
"
25
#include "
SEImplementation/CheckImages/CheckImages.h
"
26
#include "
SEImplementation/Property/SourceId.h
"
27
28
#include "
SEImplementation/CheckImages/DetectionIdCheckImage.h
"
29
30
namespace
SourceXtractor {
31
32
void
DetectionIdCheckImage::handleMessage
(
const
std::shared_ptr<SourceInterface>
& source) {
33
if
(
m_check_image
) {
34
CheckImages::getInstance
().
lock
();
35
36
auto
coordinates = source->getProperty<
PixelCoordinateList
>();
37
38
// get the ID for each detected source
39
const
auto
& source_id = source->getProperty<
SourceId
>().getDetectionId();
40
41
// iterate over the pixels and set the detection_id value
42
for
(
auto
& coord : coordinates.getCoordinateList()) {
43
m_check_image
->setValue(coord.m_x, coord.m_y, source_id);
44
}
45
46
CheckImages::getInstance
().
unlock
();
47
}
48
}
49
50
}
PixelCoordinateList.h
std::shared_ptr
SourceId.h
SourceXtractor::PixelCoordinateList
Definition:
PixelCoordinateList.h:30
SourceXtractor::CheckImages::unlock
void unlock()
Definition:
CheckImages.h:126
SourceXtractor::DetectionIdCheckImage::m_check_image
std::shared_ptr< WriteableImage< unsigned int > > m_check_image
Definition:
DetectionIdCheckImage.h:43
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition:
CheckImages.h:114
SourceXtractor::CheckImages::lock
void lock()
Definition:
CheckImages.h:122
DetectionIdCheckImage.h
SourceXtractor::SourceId
Definition:
SourceId.h:31
SourceXtractor::DetectionIdCheckImage::handleMessage
virtual void handleMessage(const std::shared_ptr< SourceInterface > &source)
Definition:
DetectionIdCheckImage.cpp:32
CheckImages.h
Generated by
1.8.5