SourceXtractorPlusPlus
0.13
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
auto
check_image =
CheckImages::getInstance
().
getSegmentationImage
();
34
if
(check_image !=
nullptr
) {
35
auto
coordinates = source->getProperty<
PixelCoordinateList
>();
36
37
// get the ID for each detected source
38
const
auto
& source_id = source->getProperty<
SourceId
>().getDetectionId();
39
40
// iterate over the pixels and set the detection_id value
41
for
(
auto
& coord : coordinates.getCoordinateList()) {
42
check_image->setValue(coord.m_x, coord.m_y, source_id);
43
}
44
}
45
}
46
47
}
PixelCoordinateList.h
std::shared_ptr
SourceId.h
SourceXtractor::PixelCoordinateList
Definition:
PixelCoordinateList.h:31
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition:
CheckImages.h:136
DetectionIdCheckImage.h
SourceXtractor::CheckImages::getSegmentationImage
std::shared_ptr< WriteableImage< int > > getSegmentationImage() const
Definition:
CheckImages.h:54
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