SourceXtractorPlusPlus
0.15
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
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/Property/PixelCoordinateList.h
"
27
#include "
SEImplementation/CheckImages/CheckImages.h
"
28
#include "
SEImplementation/Plugin/GroupInfo/GroupInfo.h
"
29
30
#include "
SEImplementation/CheckImages/GroupIdCheckImage.h
"
31
32
namespace
SourceXtractor {
33
34
void
GroupIdCheckImage::handleMessage
(
const
std::shared_ptr<SourceGroupInterface>
& group) {
35
auto
check_image =
CheckImages::getInstance
().
getGroupImage
();
36
if
(check_image) {
37
// get the ID of the group
38
auto
group_id = group->getProperty<
GroupInfo
>().getGroupId();
39
40
for
(
auto
& source : *group) {
41
auto
& coordinates = source.getProperty<
PixelCoordinateList
>();
42
43
// iterate over the pixels and set the group_id value
44
for
(
auto
& coord : coordinates.getCoordinateList()) {
45
check_image->setValue(coord.m_x, coord.m_y, group_id);
46
}
47
}
48
}
49
}
50
51
}
52
PixelCoordinateList.h
std::shared_ptr< SourceGroupInterface >
SourceXtractor::PixelCoordinateList
Definition:
PixelCoordinateList.h:31
GroupInfo.h
SourceXtractor::CheckImages::getGroupImage
std::shared_ptr< WriteableImage< int > > getGroupImage() const
Definition:
CheckImages.h:70
SourceGroupInterface.h
SourceXtractor::CheckImages::getInstance
static CheckImages & getInstance()
Definition:
CheckImages.h:136
GroupIdCheckImage.h
SourceXtractor::GroupInfo
Definition:
GroupInfo.h:32
SourceXtractor::GroupIdCheckImage::handleMessage
virtual void handleMessage(const std::shared_ptr< SourceGroupInterface > &group)
Definition:
GroupIdCheckImage.cpp:34
CheckImages.h
Generated by
1.8.5