SourceXtractorPlusPlus
1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
SEImplementation
Grouping
MoffatGrouping.h
Go to the documentation of this file.
1
17
18
#ifndef _SEIMPLEMENTATION_GROUPING_MOFFATGROUPING_H_
19
#define _SEIMPLEMENTATION_GROUPING_MOFFATGROUPING_H_
20
21
#include "
SEFramework/Pipeline/SourceGrouping.h
"
22
#include "
SEUtils/QuadTree.h
"
23
24
#include <map>
25
#include <vector>
26
#include <functional>
27
28
namespace
SourceXtractor
{
29
30
class
MoffatGrouping
:
public
SourceGroupingInterface
{
31
public
:
32
struct
SourceInfo
{
33
std::unique_ptr<SourceInterface>
m_source
;
34
double
m_x
,
m_y
;
35
size_t
m_group_id
;
36
};
37
38
using
Group
=
std::vector<std::shared_ptr<SourceInfo>
>;
39
40
MoffatGrouping
(
std::shared_ptr<GroupingCriteria>
grouping_criteria,
41
std::shared_ptr<SourceGroupFactory>
group_factory,
unsigned
int
hard_limit,
float
max_range);
42
virtual
~MoffatGrouping
() =
default
;
43
44
std::set<PropertyId>
requiredProperties
()
const override
;
45
47
void
receiveSource
(
std::unique_ptr<SourceInterface>
source)
override
;
48
50
void
receiveProcessSignal
(
const
ProcessSourcesEvent
& event)
override
;
51
52
private
:
53
void
processGroup
(
unsigned
int
group_id);
54
55
std::shared_ptr<GroupingCriteria>
m_grouping_criteria
;
56
std::shared_ptr<SourceGroupFactory>
m_group_factory
;
57
unsigned
int
m_hard_limit
;
58
float
m_max_range
;
59
60
size_t
m_group_counter
;
61
std::map<unsigned int, std::shared_ptr<Group>
>
m_groups
;
62
QuadTree<std::shared_ptr<SourceInfo>
>
m_tree
;
63
};
64
65
}
66
67
#endif
/* _SEIMPLEMENTATION_GROUPING_MOFFATGROUPING_H_ */
QuadTree.h
SourceGrouping.h
SourceXtractor::MoffatGrouping::receiveProcessSignal
void receiveProcessSignal(const ProcessSourcesEvent &event) override
Handles a ProcessSourcesEvent to trigger the processing of some of the Sources stored in SourceGroupi...
Definition
MoffatGrouping.cpp:110
SourceXtractor::MoffatGrouping::MoffatGrouping
MoffatGrouping(std::shared_ptr< GroupingCriteria > grouping_criteria, std::shared_ptr< SourceGroupFactory > group_factory, unsigned int hard_limit, float max_range)
Definition
MoffatGrouping.cpp:44
SourceXtractor::MoffatGrouping::requiredProperties
std::set< PropertyId > requiredProperties() const override
Returns the set of required properties to compute the grouping.
Definition
MoffatGrouping.cpp:51
SourceXtractor::MoffatGrouping::m_max_range
float m_max_range
Definition
MoffatGrouping.h:58
SourceXtractor::MoffatGrouping::m_tree
QuadTree< std::shared_ptr< SourceInfo > > m_tree
Definition
MoffatGrouping.h:62
SourceXtractor::MoffatGrouping::Group
std::vector< std::shared_ptr< SourceInfo > > Group
Definition
MoffatGrouping.h:38
SourceXtractor::MoffatGrouping::~MoffatGrouping
virtual ~MoffatGrouping()=default
SourceXtractor::MoffatGrouping::m_group_factory
std::shared_ptr< SourceGroupFactory > m_group_factory
Definition
MoffatGrouping.h:56
SourceXtractor::MoffatGrouping::processGroup
void processGroup(unsigned int group_id)
Definition
MoffatGrouping.cpp:130
SourceXtractor::MoffatGrouping::m_group_counter
size_t m_group_counter
Definition
MoffatGrouping.h:60
SourceXtractor::MoffatGrouping::m_grouping_criteria
std::shared_ptr< GroupingCriteria > m_grouping_criteria
Definition
MoffatGrouping.h:55
SourceXtractor::MoffatGrouping::receiveSource
void receiveSource(std::unique_ptr< SourceInterface > source) override
Handles a new Source.
Definition
MoffatGrouping.cpp:60
SourceXtractor::MoffatGrouping::m_hard_limit
unsigned int m_hard_limit
Definition
MoffatGrouping.h:57
SourceXtractor::MoffatGrouping::m_groups
std::map< unsigned int, std::shared_ptr< Group > > m_groups
Definition
MoffatGrouping.h:61
SourceXtractor::QuadTree
Definition
QuadTree.h:32
SourceXtractor::SourceGroupingInterface
Definition
SourceGrouping.h:85
std::map
SourceXtractor
Definition
Aperture.h:30
std::set
std::shared_ptr
SourceXtractor::MoffatGrouping::SourceInfo
Definition
MoffatGrouping.h:32
SourceXtractor::MoffatGrouping::SourceInfo::m_y
double m_y
Definition
MoffatGrouping.h:34
SourceXtractor::MoffatGrouping::SourceInfo::m_group_id
size_t m_group_id
Definition
MoffatGrouping.h:35
SourceXtractor::MoffatGrouping::SourceInfo::m_source
std::unique_ptr< SourceInterface > m_source
Definition
MoffatGrouping.h:33
SourceXtractor::MoffatGrouping::SourceInfo::m_x
double m_x
Definition
MoffatGrouping.h:34
SourceXtractor::ProcessSourcesEvent
Event received by SourceGrouping to request the processing of some of the Sources stored.
Definition
PipelineStage.h:33
std::unique_ptr
std::vector
Generated by
1.14.0