SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
CheckImages
SourceIdCheckImage.cpp
Go to the documentation of this file.
1
17
/*
18
* SegmentationCheckImage.h
19
*
20
* Created on: Dec 11, 2017
21
* Author: mschefer
22
*/
23
24
#include "
SEImplementation/Plugin/DetectionFrameInfo/DetectionFrameInfo.h
"
25
#include "
SEImplementation/Property/PixelCoordinateList.h
"
26
#include "
SEImplementation/CheckImages/CheckImages.h
"
27
#include "
SEImplementation/Plugin/SourceIDs/SourceID.h
"
28
29
#include "
SEImplementation/CheckImages/SourceIdCheckImage.h
"
30
31
namespace
SourceXtractor
{
32
33
void
SourceIdCheckImage::handleMessage
(
const
SourceGroupInterface
&
group
) {
34
auto
hdu_index
=
group
.cbegin()->getProperty<
DetectionFrameInfo
>().getHduIndex();
35
auto
check_image
=
CheckImages::getInstance
().getPartitionImage(
hdu_index
);
36
if
(
check_image
!=
nullptr
) {
37
for
(
auto
&
source
:
group
) {
38
const
auto
&
coordinates
=
source
.getProperty<
PixelCoordinateList
>();
39
40
// get the ID for each (multithresholded) source
41
const
auto
&
source_id
=
source
.getProperty<
SourceID
>().getId();
42
43
// iterate over the pixels and set the source-id value
44
for
(
auto
& coord :
coordinates
.getCoordinateList()) {
45
check_image
->setValue(coord.m_x, coord.m_y,
source_id
);
46
}
47
}
48
}
49
}
50
51
}
CheckImages.h
DetectionFrameInfo.h
PixelCoordinateList.h
SourceID.h
SourceIdCheckImage.h
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition
CheckImages.h:158
SourceXtractor::DetectionFrameInfo
Definition
DetectionFrameInfo.h:29
SourceXtractor::PixelCoordinateList
Definition
PixelCoordinateList.h:33
SourceXtractor::SourceGroupInterface
Defines the interface used to group sources.
Definition
SourceGroupInterface.h:38
SourceXtractor::SourceID
Definition
SourceID.h:33
SourceXtractor::SourceIdCheckImage::handleMessage
void handleMessage(const SourceGroupInterface &group) override
Definition
SourceIdCheckImage.cpp:33
std::function
SourceXtractor
Definition
Aperture.h:30
Generated by
1.10.0