SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
MeasurementFrameRectangle
MeasurementFrameRectangleTaskFactory.cpp
Go to the documentation of this file.
1
17
/*
18
* MeasurementFrameRectangleTaskFactory.cpp
19
*
20
* Created on: Sep 24, 2018
21
* Author: Alejandro Alvarez Ayllon
22
*/
23
24
#include <iostream>
25
26
#include "
SEImplementation/Configuration/DetectionFrameConfig.h
"
27
28
#include "
SEImplementation/Plugin/MeasurementFrameRectangle/MeasurementFrameRectangle.h
"
29
#include "
SEImplementation/Plugin/MeasurementFrameRectangle/MeasurementFrameRectangleTask.h
"
30
#include "
SEImplementation/Plugin/MeasurementFrameRectangle/MeasurementFrameRectangleTaskNoDetect.h
"
31
#include "
SEImplementation/Plugin/MeasurementFrameRectangle/MeasurementFrameRectangleTaskFactory.h
"
32
33
34
namespace
SourceXtractor
{
35
36
std::shared_ptr<Task>
MeasurementFrameRectangleTaskFactory::createTask
(
const
PropertyId
&
property_id
)
const
{
37
auto
instance
=
property_id
.getIndex();
38
if
(
m_no_detection_image
) {
39
return
std::make_shared<MeasurementFrameRectangleTaskNoDetect>
(
instance
);
40
}
else
{
41
return
std::make_shared<MeasurementFrameRectangleTask>
(
instance
);
42
}
43
44
}
45
46
void
MeasurementFrameRectangleTaskFactory::reportConfigDependencies
(
Euclid::Configuration::ConfigManager
&
manager
)
const
{
47
manager
.registerConfiguration<
DetectionFrameConfig
>();
48
}
49
50
void
MeasurementFrameRectangleTaskFactory::configure
(
Euclid::Configuration::ConfigManager
&
manager
) {
51
m_no_detection_image
=
manager
.getConfiguration<
DetectionFrameConfig
>().getDetectionFrames().size() == 0;
52
}
53
54
55
}
// SEImplementation namespace
DetectionFrameConfig.h
MeasurementFrameRectangleTaskFactory.h
MeasurementFrameRectangleTaskNoDetect.h
MeasurementFrameRectangleTask.h
MeasurementFrameRectangle.h
Euclid::Configuration::ConfigManager
SourceXtractor::DetectionFrameConfig
Provides combined detection frame.
Definition
DetectionFrameConfig.h:31
SourceXtractor::MeasurementFrameRectangleTaskFactory::configure
void configure(Euclid::Configuration::ConfigManager &manager) override
Method which should initialize the object.
Definition
MeasurementFrameRectangleTaskFactory.cpp:50
SourceXtractor::MeasurementFrameRectangleTaskFactory::m_no_detection_image
bool m_no_detection_image
Definition
MeasurementFrameRectangleTaskFactory.h:44
SourceXtractor::MeasurementFrameRectangleTaskFactory::createTask
std::shared_ptr< Task > createTask(const PropertyId &property_id) const override
Returns a Task producing a Property corresponding to the given PropertyId.
Definition
MeasurementFrameRectangleTaskFactory.cpp:36
SourceXtractor::MeasurementFrameRectangleTaskFactory::reportConfigDependencies
void reportConfigDependencies(Euclid::Configuration::ConfigManager &manager) const override
Registers all the Configuration dependencies.
Definition
MeasurementFrameRectangleTaskFactory.cpp:46
SourceXtractor::PropertyId
Identifier used to set and retrieve properties.
Definition
PropertyId.h:40
std::function
SourceXtractor
Definition
Aperture.h:30
Generated by
1.10.0