SourceXtractorPlusPlus
0.19
SourceXtractor++, the next generation SExtractor
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
GroupIdCheckImage.cpp
Go to the documentation of this file.
1
17
/*
18
* GroupIdCheckImage.cpp
19
*
20
* Created on: 2019 M01 30
21
* Author: mschefer
22
*/
23
24
#include "
SEFramework/Source/SourceGroupInterface.h
"
25
26
#include "
SEImplementation/Plugin/DetectionFrameInfo/DetectionFrameInfo.h
"
27
#include "
SEImplementation/Property/PixelCoordinateList.h
"
28
#include "
SEImplementation/CheckImages/CheckImages.h
"
29
#include "
SEImplementation/Plugin/GroupInfo/GroupInfo.h
"
30
31
#include "
SEImplementation/CheckImages/GroupIdCheckImage.h
"
32
33
namespace
SourceXtractor {
34
35
void
GroupIdCheckImage::handleMessage
(
const
SourceGroupInterface
& group) {
36
auto
hdu_index = group.
cbegin
()->getProperty<
DetectionFrameInfo
>().getHduIndex();
37
auto
check_image =
CheckImages::getInstance
().
getGroupImage
(hdu_index);
38
if
(check_image) {
39
// get the ID of the group
40
auto
group_id = group.
getProperty
<
GroupInfo
>().getGroupId();
41
42
for
(
auto
& source : group) {
43
auto
& coordinates = source.getProperty<
PixelCoordinateList
>();
44
45
// iterate over the pixels and set the group_id value
46
for
(
auto
& coord : coordinates.getCoordinateList()) {
47
check_image->setValue(coord.m_x, coord.m_y, group_id);
48
}
49
}
50
}
51
}
52
53
}
54
PixelCoordinateList.h
SourceXtractor::CheckImages::getGroupImage
std::shared_ptr< WriteableImage< int > > getGroupImage(size_t index) const
Definition:
CheckImages.h:74
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition:
SourceInterface.h:57
SourceXtractor::DetectionFrameInfo
Definition:
DetectionFrameInfo.h:29
SourceXtractor::PixelCoordinateList
Definition:
PixelCoordinateList.h:31
GroupInfo.h
SourceGroupInterface.h
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition:
CheckImages.h:150
SourceXtractor::GroupIdCheckImage::handleMessage
void handleMessage(const SourceGroupInterface &group) override
Definition:
GroupIdCheckImage.cpp:35
GroupIdCheckImage.h
SourceXtractor::SourceGroupInterface::cbegin
virtual const_iterator cbegin() const =0
SourceXtractor::SourceGroupInterface
Defines the interface used to group sources.
Definition:
SourceGroupInterface.h:37
SourceXtractor::GroupInfo
Definition:
GroupInfo.h:32
DetectionFrameInfo.h
CheckImages.h
Generated by
1.8.5