SourceXtractorPlusPlus
0.18
SourceXtractor++, the next generation SExtractor
SEImplementation
SEImplementation
Configuration
SegmentationConfig.h
Go to the documentation of this file.
1
23
#ifndef _SEIMPLEMENTATION_SEGMENTATIONCONFIG_H
24
#define _SEIMPLEMENTATION_SEGMENTATIONCONFIG_H
25
26
#include <memory>
27
#include "
Configuration/Configuration.h
"
28
29
namespace
SourceXtractor
{
30
36
class
SegmentationConfig
:
public
Euclid::Configuration::Configuration
{
37
public
:
38
39
enum class
Algorithm
{
40
UNKNOWN
,
41
LUTZ,
42
BFS,
43
ML
44
};
45
49
virtual
~SegmentationConfig
() =
default
;
50
52
explicit
SegmentationConfig
(
long
manager_id);
53
54
std::map<std::string, Configuration::OptionDescriptionList>
getProgramOptions
()
override
;
55
void
preInitialize
(
const
UserValues
& args)
override
;
56
57
Algorithm
getAlgorithmOption
()
const
{
58
return
m_selected_algorithm
;
59
}
60
61
int
getLutzWindowSize
()
const
{
62
return
m_lutz_window_size
;
63
}
64
65
int
getBfsMaxDelta
()
const
{
66
return
m_bfs_max_delta
;
67
}
68
69
bool
isFilteringEnabled
()
const
{
70
return
m_filter
!=
nullptr
;
71
}
72
73
std::shared_ptr<DetectionImageFrame::ImageFilter>
getFilter
()
const
{
74
return
m_filter
;
75
}
76
77
std::string
getOnnxModelPath
()
const
{
78
return
m_onnx_model_path
;
79
}
80
81
double
getMLThreashold
()
const
{
82
return
m_ml_threshold
;
83
}
84
85
86
private
:
87
std::shared_ptr<DetectionImageFrame::ImageFilter>
getDefaultFilter
()
const
;
88
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFilter
(
const
std::string
&
filename
)
const
;
89
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFITSFilter
(
const
std::string
&
filename
)
const
;
90
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadASCIIFilter
(
const
std::string
&
filename
)
const
;
91
92
Algorithm
m_selected_algorithm
;
93
std::shared_ptr<DetectionImageFrame::ImageFilter>
m_filter
;
94
95
int
m_lutz_window_size
;
96
int
m_bfs_max_delta
;
97
std::string
m_onnx_model_path
;
98
double
m_ml_threshold
;
99
};
/* End of SegmentationConfig class */
100
101
}
/* namespace SourceXtractor */
102
103
104
#endif
Configuration.h
std::string
Euclid::Configuration::Configuration
SourceXtractor::SegmentationConfig
Used to select a Segmentation algorithm.
Definition:
SegmentationConfig.h:36
SourceXtractor::SegmentationConfig::getOnnxModelPath
std::string getOnnxModelPath() const
Definition:
SegmentationConfig.h:77
SourceXtractor::SegmentationConfig::Algorithm
Algorithm
Definition:
SegmentationConfig.h:39
SourceXtractor::SegmentationConfig::isFilteringEnabled
bool isFilteringEnabled() const
Definition:
SegmentationConfig.h:69
SourceXtractor::SegmentationConfig::m_filter
std::shared_ptr< DetectionImageFrame::ImageFilter > m_filter
Definition:
SegmentationConfig.h:93
SourceXtractor::SegmentationConfig::m_bfs_max_delta
int m_bfs_max_delta
Definition:
SegmentationConfig.h:96
SourceXtractor::SegmentationConfig::m_lutz_window_size
int m_lutz_window_size
Definition:
SegmentationConfig.h:95
SourceXtractor::SegmentationConfig::getBfsMaxDelta
int getBfsMaxDelta() const
Definition:
SegmentationConfig.h:65
SourceXtractor::SegmentationConfig::m_selected_algorithm
Algorithm m_selected_algorithm
Definition:
SegmentationConfig.h:92
SourceXtractor::SegmentationConfig::SegmentationConfig
SegmentationConfig(long manager_id)
Constructs a new SegmentationConfig object.
Definition:
SegmentationConfig.cpp:55
SourceXtractor::SegmentationConfig::getProgramOptions
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
Definition:
SegmentationConfig.cpp:60
SourceXtractor::SegmentationConfig::getFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > getFilter() const
Definition:
SegmentationConfig.h:73
SourceXtractor::SegmentationConfig::preInitialize
void preInitialize(const UserValues &args) override
Definition:
SegmentationConfig.cpp:79
SourceXtractor::SegmentationConfig::m_ml_threshold
double m_ml_threshold
Definition:
SegmentationConfig.h:98
SourceXtractor::SegmentationConfig::getAlgorithmOption
Algorithm getAlgorithmOption() const
Definition:
SegmentationConfig.h:57
SourceXtractor::SegmentationConfig::getDefaultFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > getDefaultFilter() const
Definition:
SegmentationConfig.cpp:118
SourceXtractor::SegmentationConfig::m_onnx_model_path
std::string m_onnx_model_path
Definition:
SegmentationConfig.h:97
SourceXtractor::SegmentationConfig::loadFITSFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFITSFilter(const std::string &filename) const
Definition:
SegmentationConfig.cpp:150
SourceXtractor::SegmentationConfig::loadASCIIFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadASCIIFilter(const std::string &filename) const
Definition:
SegmentationConfig.cpp:187
SourceXtractor::SegmentationConfig::getLutzWindowSize
int getLutzWindowSize() const
Definition:
SegmentationConfig.h:61
SourceXtractor::SegmentationConfig::loadFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFilter(const std::string &filename) const
Definition:
SegmentationConfig.cpp:136
SourceXtractor::SegmentationConfig::getMLThreashold
double getMLThreashold() const
Definition:
SegmentationConfig.h:81
SourceXtractor::SegmentationConfig::~SegmentationConfig
virtual ~SegmentationConfig()=default
Destructor.
std::map
ModuleType::UNKNOWN
@ UNKNOWN
SourceXtractor
Definition:
Aperture.h:30
conf.filename
string filename
Definition:
conf.py:65
std::shared_ptr
Generated by
1.9.4