SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEFramework
src
lib
Pipeline
Deblending.cpp
Go to the documentation of this file.
1
23
#include "
SEFramework/Pipeline/Deblending.h
"
24
25
namespace
SourceXtractor
{
26
27
Deblending::Deblending
(
std::vector
<
std::shared_ptr<DeblendStep>
>
deblend_steps
)
28
: m_deblend_steps(
std
::
move
(
deblend_steps
)) {
29
}
30
31
void
Deblending::receiveSource
(
std::unique_ptr<SourceGroupInterface>
group
) {
32
33
// Applies every DeblendStep to the SourceGroup
34
for
(
auto
&
step
:
m_deblend_steps
) {
35
step
->deblend(*
group
);
36
}
37
38
// If the SourceGroup still contains sources, we notify the observers
39
if
(
group
->begin() !=
group
->end()) {
40
sendSource
(
std::move
(
group
));
41
}
42
}
43
44
std::set<PropertyId>
Deblending::requiredProperties
()
const
{
45
std::set<PropertyId>
properties
;
46
for
(
auto
&
step
:
m_deblend_steps
) {
47
auto
step_props
=
step
->requiredProperties();
48
std::copy
(
step_props
.begin(),
step_props
.end(),
std::inserter
(
properties
,
properties
.end()));
49
}
50
return
properties
;
51
}
52
53
void
Deblending::receiveProcessSignal
(
const
ProcessSourcesEvent
&
event
) {
54
sendProcessSignal
(
event
);
55
}
56
57
}
// SEFramework namespace
Deblending.h
SourceXtractor::Deblending::Deblending
Deblending(std::vector< std::shared_ptr< DeblendStep > > deblend_steps)
Constructor - takes a vector of DeblendStep to be applied, in order, to every SourceGroup.
Definition
Deblending.cpp:27
SourceXtractor::Deblending::receiveSource
void receiveSource(std::unique_ptr< SourceGroupInterface > group) override
Handles a new SourceGroup, applies the DeblendSteps and then notifies the observers with the result.
Definition
Deblending.cpp:31
SourceXtractor::Deblending::requiredProperties
std::set< PropertyId > requiredProperties() const
Returns the set of required properties to compute the deblending.
Definition
Deblending.cpp:44
SourceXtractor::Deblending::receiveProcessSignal
void receiveProcessSignal(const ProcessSourcesEvent &event) override
Definition
Deblending.cpp:53
SourceXtractor::Deblending::m_deblend_steps
std::vector< std::shared_ptr< DeblendStep > > m_deblend_steps
Definition
Deblending.h:75
SourceXtractor::PipelineEmitter< SourceGroupInterface >::sendProcessSignal
void sendProcessSignal(const ProcessSourcesEvent &event) const
Definition
PipelineStage.h:92
SourceXtractor::PipelineEmitter< SourceGroupInterface >::sendSource
void sendSource(std::unique_ptr< SourceGroupInterface > source) const
Definition
PipelineStage.h:85
std::copy
T copy(T... args)
std::function
std::inserter
T inserter(T... args)
std::move
T move(T... args)
SourceXtractor
Definition
Aperture.h:30
std
STL namespace.
SourceXtractor::ProcessSourcesEvent
Event received by SourceGrouping to request the processing of some of the Sources stored.
Definition
PipelineStage.h:33
std::vector
Generated by
1.10.0