SourceXtractorPlusPlus
0.16
Please provide a description of the project.
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
void
initialize
(
const
UserValues
& args)
override
;
57
58
Algorithm
getAlgorithmOption
()
const
{
59
return
m_selected_algorithm
;
60
}
61
62
int
getLutzWindowSize
()
const
{
63
return
m_lutz_window_size
;
64
}
65
66
int
getBfsMaxDelta
()
const
{
67
return
m_bfs_max_delta
;
68
}
69
70
bool
isFilteringEnabled
()
const
{
71
return
m_filter
!=
nullptr
;
72
}
73
74
std::shared_ptr<DetectionImageFrame::ImageFilter>
getFilter
()
const
{
75
return
m_filter
;
76
}
77
78
std::string
getOnnxModelPath
()
const
{
79
return
m_onnx_model_path
;
80
}
81
82
double
getMLThreashold
()
const
{
83
return
m_ml_threshold
;
84
}
85
86
87
private
:
88
std::shared_ptr<DetectionImageFrame::ImageFilter>
getDefaultFilter
()
const
;
89
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFilter
(
const
std::string
&
filename
)
const
;
90
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFITSFilter
(
const
std::string
&
filename
)
const
;
91
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadASCIIFilter
(
const
std::string
&
filename
)
const
;
92
93
Algorithm
m_selected_algorithm
;
94
std::shared_ptr<DetectionImageFrame::ImageFilter>
m_filter
;
95
96
int
m_lutz_window_size
;
97
int
m_bfs_max_delta
;
98
std::string
m_onnx_model_path
;
99
double
m_ml_threshold
;
100
};
/* End of SegmentationConfig class */
101
102
}
/* namespace SourceXtractor */
103
104
105
#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:78
SourceXtractor::SegmentationConfig::Algorithm
Algorithm
Definition:
SegmentationConfig.h:39
SourceXtractor::SegmentationConfig::Algorithm::LUTZ
@ LUTZ
SourceXtractor::SegmentationConfig::Algorithm::UNKNOWN
@ UNKNOWN
SourceXtractor::SegmentationConfig::Algorithm::BFS
@ BFS
SourceXtractor::SegmentationConfig::Algorithm::ML
@ ML
SourceXtractor::SegmentationConfig::isFilteringEnabled
bool isFilteringEnabled() const
Definition:
SegmentationConfig.h:70
SourceXtractor::SegmentationConfig::m_filter
std::shared_ptr< DetectionImageFrame::ImageFilter > m_filter
Definition:
SegmentationConfig.h:94
SourceXtractor::SegmentationConfig::m_bfs_max_delta
int m_bfs_max_delta
Definition:
SegmentationConfig.h:97
SourceXtractor::SegmentationConfig::m_lutz_window_size
int m_lutz_window_size
Definition:
SegmentationConfig.h:96
SourceXtractor::SegmentationConfig::getBfsMaxDelta
int getBfsMaxDelta() const
Definition:
SegmentationConfig.h:66
SourceXtractor::SegmentationConfig::m_selected_algorithm
Algorithm m_selected_algorithm
Definition:
SegmentationConfig.h:93
SourceXtractor::SegmentationConfig::SegmentationConfig
SegmentationConfig(long manager_id)
Constructs a new SegmentationConfig object.
Definition:
SegmentationConfig.cpp:58
SourceXtractor::SegmentationConfig::getFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > getFilter() const
Definition:
SegmentationConfig.h:74
SourceXtractor::SegmentationConfig::getProgramOptions
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
Definition:
SegmentationConfig.cpp:63
SourceXtractor::SegmentationConfig::preInitialize
void preInitialize(const UserValues &args) override
Definition:
SegmentationConfig.cpp:82
SourceXtractor::SegmentationConfig::m_ml_threshold
double m_ml_threshold
Definition:
SegmentationConfig.h:99
SourceXtractor::SegmentationConfig::getAlgorithmOption
Algorithm getAlgorithmOption() const
Definition:
SegmentationConfig.h:58
SourceXtractor::SegmentationConfig::getDefaultFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > getDefaultFilter() const
Definition:
SegmentationConfig.cpp:124
SourceXtractor::SegmentationConfig::initialize
void initialize(const UserValues &args) override
Definition:
SegmentationConfig.cpp:121
SourceXtractor::SegmentationConfig::m_onnx_model_path
std::string m_onnx_model_path
Definition:
SegmentationConfig.h:98
SourceXtractor::SegmentationConfig::loadFITSFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFITSFilter(const std::string &filename) const
Definition:
SegmentationConfig.cpp:156
SourceXtractor::SegmentationConfig::loadASCIIFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadASCIIFilter(const std::string &filename) const
Definition:
SegmentationConfig.cpp:193
SourceXtractor::SegmentationConfig::getLutzWindowSize
int getLutzWindowSize() const
Definition:
SegmentationConfig.h:62
SourceXtractor::SegmentationConfig::loadFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFilter(const std::string &filename) const
Definition:
SegmentationConfig.cpp:142
SourceXtractor::SegmentationConfig::getMLThreashold
double getMLThreashold() const
Definition:
SegmentationConfig.h:82
SourceXtractor::SegmentationConfig::~SegmentationConfig
virtual ~SegmentationConfig()=default
Destructor.
std::map
SourceXtractor
Definition:
Aperture.h:30
conf.filename
string filename
Definition:
conf.py:63
std::shared_ptr
Generated by
1.9.1