SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
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
28
30
31namespace SourceXtractor {
32
34 auto hdu_index = source.getProperty<DetectionFrameInfo>().getHduIndex();
35 auto check_image = CheckImages::getInstance().getSegmentationImage(hdu_index);
36 if (check_image != nullptr) {
37 const auto& coordinates = source.getProperty<PixelCoordinateList>();
38
39 // get the ID for each detected source
40 const auto& source_id = source.getProperty<SourceId>().getDetectionId();
41
42 // iterate over the pixels and set the detection_id value
43 for (auto& coord : coordinates.getCoordinateList()) {
44 check_image->setValue(coord.m_x, coord.m_y, source_id);
45 }
46 }
47}
48
49}
static CheckImages & getInstance()
void handleMessage(const SourceInterface &source) override
The SourceInterface is an abstract "source" that has properties attached to it.