SourceXtractorPlusPlus
0.8
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
Background
BackgroundAnalyzerFactory.cpp
Go to the documentation of this file.
1
17
/*
18
* BackgroundAnalyzerFactory.cpp
19
*
20
* Created on: Mar 29, 2017
21
* Author: mschefer
22
*/
23
24
25
#include "
SEImplementation/Background/BackgroundAnalyzerFactory.h
"
26
27
#include "
SEImplementation/Background/SimpleBackgroundAnalyzer.h
"
28
#include "
SEImplementation/Background/SE2BackgroundLevelAnalyzer.h
"
29
30
namespace
SourceXtractor {
31
32
std::shared_ptr<BackgroundAnalyzer>
BackgroundAnalyzerFactory::createBackgroundAnalyzer
()
const
{
33
return
createBackgroundAnalyzer
(
m_weight_type
);
34
}
35
36
std::shared_ptr<BackgroundAnalyzer>
BackgroundAnalyzerFactory::createBackgroundAnalyzer
(
37
WeightImageConfig::WeightType
weight_type)
const
{
38
// make a SE2 background if cell size and smoothing box are given
39
if
(
m_cell_size
.
size
() > 0 &&
m_smoothing_box
.
size
() > 0) {
40
auto
background_level = std::make_shared<SE2BackgroundLevelAnalyzer>(
m_cell_size
,
m_smoothing_box
, weight_type);
41
return
background_level;
42
}
else
{
43
// make a simple background
44
auto
background_level = std::make_shared<SimpleBackgroundAnalyzer>();
45
return
background_level;
46
}
47
}
48
49
void
BackgroundAnalyzerFactory::reportConfigDependencies
(
Euclid::Configuration::ConfigManager
& manager)
const
{
50
manager.
registerConfiguration
<
SE2BackgroundConfig
>();
51
manager.
registerConfiguration
<
WeightImageConfig
>();
52
}
53
54
void
BackgroundAnalyzerFactory::configure
(
Euclid::Configuration::ConfigManager
& manager) {
55
auto
se2background_config = manager.
getConfiguration
<
SE2BackgroundConfig
>();
56
auto
weight_image_config = manager.
getConfiguration
<
WeightImageConfig
>();
57
m_cell_size
= se2background_config.getCellSize();
58
m_smoothing_box
= se2background_config.getSmoothingBox();
59
m_weight_type
= weight_image_config.getWeightType();
60
}
61
62
}
SE2BackgroundLevelAnalyzer.h
std::shared_ptr
SourceXtractor::SE2BackgroundConfig
Definition:
SE2BackgroundConfig.h:30
SourceXtractor::BackgroundAnalyzerFactory::m_weight_type
WeightImageConfig::WeightType m_weight_type
Definition:
BackgroundAnalyzerFactory.h:50
SourceXtractor::BackgroundAnalyzerFactory::m_cell_size
std::string m_cell_size
Definition:
BackgroundAnalyzerFactory.h:48
SourceXtractor::WeightImageConfig::WeightType
WeightType
Definition:
WeightImageConfig.h:36
Euclid::Configuration::ConfigManager::registerConfiguration
void registerConfiguration()
BackgroundAnalyzerFactory.h
SourceXtractor::BackgroundAnalyzerFactory::configure
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Definition:
BackgroundAnalyzerFactory.cpp:54
SourceXtractor::BackgroundAnalyzerFactory::m_smoothing_box
std::string m_smoothing_box
Definition:
BackgroundAnalyzerFactory.h:49
Euclid::Configuration::ConfigManager
SimpleBackgroundAnalyzer.h
Euclid::Configuration::ConfigManager::getConfiguration
T & getConfiguration()
std::string::size
T size(T...args)
SourceXtractor::BackgroundAnalyzerFactory::createBackgroundAnalyzer
std::shared_ptr< BackgroundAnalyzer > createBackgroundAnalyzer() const
Definition:
BackgroundAnalyzerFactory.cpp:32
SourceXtractor::BackgroundAnalyzerFactory::reportConfigDependencies
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
Definition:
BackgroundAnalyzerFactory.cpp:49
SourceXtractor::WeightImageConfig
Definition:
WeightImageConfig.h:32
Generated by
1.8.5