SourceXtractorPlusPlus
0.13
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
Plugin
GrowthCurve
GrowthCurveTaskFactory.cpp
Go to the documentation of this file.
1
18
#include <
SEImplementation/Configuration/MeasurementImageConfig.h
>
19
#include "
SEImplementation/Configuration/WeightImageConfig.h
"
20
#include "
SEImplementation/Plugin/GrowthCurve/GrowthCurve.h
"
21
#include "
SEImplementation/Plugin/GrowthCurve/GrowthCurveResampled.h
"
22
#include "
SEImplementation/Plugin/GrowthCurve/GrowthCurveTask.h
"
23
#include "
SEImplementation/Plugin/GrowthCurve/GrowthCurveResampledTask.h
"
24
#include "
SEImplementation/Plugin/GrowthCurve/GrowthCurveTaskFactory.h
"
25
#include "
SEImplementation/Plugin/GrowthCurve/GrowthCurveConfig.h
"
26
27
namespace
SourceXtractor {
28
29
std::shared_ptr<Task>
GrowthCurveTaskFactory::createTask
(
const
PropertyId
& property_id)
const
{
30
if
(property_id.
getTypeId
() ==
typeid
(
GrowthCurve
)) {
31
return
std::make_shared<GrowthCurveTask>(property_id.
getIndex
(),
m_use_symmetry
);
32
}
33
else
if
(property_id.
getTypeId
() ==
typeid
(
GrowthCurveResampled
)) {
34
return
std::make_shared<GrowthCurveResampledTask>(
m_images
,
m_nsamples
);
35
}
36
return
nullptr
;
37
}
38
39
void
GrowthCurveTaskFactory::reportConfigDependencies
(
Euclid::Configuration::ConfigManager
& manager)
const
{
40
manager.
registerConfiguration
<
GrowthCurveConfig
>();
41
manager.
registerConfiguration
<
WeightImageConfig
>();
42
manager.
registerConfiguration
<
MeasurementImageConfig
>();
43
}
44
45
void
GrowthCurveTaskFactory::configure
(
Euclid::Configuration::ConfigManager
& manager) {
46
m_nsamples
= manager.
getConfiguration
<
GrowthCurveConfig
>().
m_nsamples
;
47
m_use_symmetry
= manager.
getConfiguration
<
WeightImageConfig
>().symmetryUsage();
48
49
auto
& measurement_config = manager.
getConfiguration
<
MeasurementImageConfig
>();
50
const
auto
& image_infos = measurement_config.
getImageInfos
();
51
52
std::map<std::string, unsigned>
pos_in_group;
53
54
for
(
size_t
i = 0; i < image_infos.size(); ++i) {
55
m_images
.
push_back
(image_infos[i].m_id);
56
}
57
}
58
59
}
// end of namespace SourceXtractor
SourceXtractor::GrowthCurveResampled
Definition:
GrowthCurveResampled.h:31
SourceXtractor::GrowthCurveTaskFactory::m_use_symmetry
bool m_use_symmetry
Definition:
GrowthCurveTaskFactory.h:37
std::shared_ptr
GrowthCurveResampledTask.h
WeightImageConfig.h
GrowthCurveResampled.h
MeasurementImageConfig.h
SourceXtractor::GrowthCurveTaskFactory::m_nsamples
int m_nsamples
Definition:
GrowthCurveTaskFactory.h:36
SourceXtractor::MeasurementImageConfig
Definition:
MeasurementImageConfig.h:37
std::map
STL class.
Euclid::Configuration::ConfigManager::registerConfiguration
void registerConfiguration()
std::vector::push_back
T push_back(T...args)
SourceXtractor::MeasurementImageConfig::getImageInfos
const std::vector< MeasurementImageInfo > & getImageInfos() const
Definition:
MeasurementImageConfig.h:70
SourceXtractor::PropertyId::getIndex
unsigned int getIndex() const
Definition:
PropertyId.h:70
SourceXtractor::GrowthCurveTaskFactory::createTask
std::shared_ptr< Task > createTask(const PropertyId &property_id) const override
Returns a Task producing a Property corresponding to the given PropertyId.
Definition:
GrowthCurveTaskFactory.cpp:29
SourceXtractor::GrowthCurveConfig
Definition:
GrowthCurveConfig.h:28
Euclid::Configuration::ConfigManager
Euclid::Configuration::ConfigManager::getConfiguration
T & getConfiguration()
SourceXtractor::GrowthCurveTaskFactory::configure
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Definition:
GrowthCurveTaskFactory.cpp:45
GrowthCurve.h
SourceXtractor::PropertyId
Identifier used to set and retrieve properties.
Definition:
PropertyId.h:40
SourceXtractor::PropertyId::getTypeId
std::type_index getTypeId() const
Definition:
PropertyId.h:66
GrowthCurveConfig.h
SourceXtractor::GrowthCurveTaskFactory::m_images
std::vector< unsigned > m_images
Definition:
GrowthCurveTaskFactory.h:38
GrowthCurveTask.h
SourceXtractor::GrowthCurve
Definition:
GrowthCurve.h:30
GrowthCurveTaskFactory.h
SourceXtractor::GrowthCurveTaskFactory::reportConfigDependencies
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
Definition:
GrowthCurveTaskFactory.cpp:39
SourceXtractor::WeightImageConfig
Definition:
WeightImageConfig.h:32
Generated by
1.8.5