SourceXtractorPlusPlus
0.19.2
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
SEImplementation
Configuration
SegmentationConfig.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2019-2022 Université de Genève, LMU Munich - Faculty of Physics, IAP-CNRS/Sorbonne Université
3
*
4
* This library is free software; you can redistribute it and/or modify it under
5
* the terms of the GNU Lesser General Public License as published by the Free
6
* Software Foundation; either version 3.0 of the License, or (at your option)
7
* any later version.
8
*
9
* This library is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12
* details.
13
*
14
* You should have received a copy of the GNU Lesser General Public License
15
* along with this library; if not, write to the Free Software Foundation, Inc.,
16
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
24
#ifndef _SEIMPLEMENTATION_SEGMENTATIONCONFIG_H
25
#define _SEIMPLEMENTATION_SEGMENTATIONCONFIG_H
26
27
#include <memory>
28
#include "
Configuration/Configuration.h
"
29
#include "
SEFramework/Frame/Frame.h
"
30
31
namespace
SourceXtractor
{
32
38
class
SegmentationConfig
:
public
Euclid::Configuration::Configuration
{
39
public
:
40
41
enum class
Algorithm
{
42
UNKNOWN
,
43
LUTZ
,
44
BFS
,
45
ML
46
};
47
51
virtual
~SegmentationConfig
() =
default
;
52
54
explicit
SegmentationConfig
(
long
manager_id);
55
56
std::map<std::string, Configuration::OptionDescriptionList>
getProgramOptions
()
override
;
57
void
preInitialize
(
const
UserValues
& args)
override
;
58
59
Algorithm
getAlgorithmOption
()
const
{
60
return
m_selected_algorithm
;
61
}
62
63
int
getLutzWindowSize
()
const
{
64
return
m_lutz_window_size
;
65
}
66
67
int
getBfsMaxDelta
()
const
{
68
return
m_bfs_max_delta
;
69
}
70
71
bool
isFilteringEnabled
()
const
{
72
return
m_filter
!=
nullptr
;
73
}
74
75
std::shared_ptr<DetectionImageFrame::ImageFilter>
getFilter
()
const
{
76
return
m_filter
;
77
}
78
79
std::string
getOnnxModelPath
()
const
{
80
return
m_onnx_model_path
;
81
}
82
83
double
getMLThreashold
()
const
{
84
return
m_ml_threshold
;
85
}
86
87
88
private
:
89
std::shared_ptr<DetectionImageFrame::ImageFilter>
getDefaultFilter
()
const
;
90
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFilter
(
const
std::string
& filename)
const
;
91
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFITSFilter
(
const
std::string
& filename)
const
;
92
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadASCIIFilter
(
const
std::string
& filename)
const
;
93
94
Algorithm
m_selected_algorithm
;
95
std::shared_ptr<DetectionImageFrame::ImageFilter>
m_filter
;
96
97
int
m_lutz_window_size
;
98
int
m_bfs_max_delta
;
99
std::string
m_onnx_model_path
;
100
double
m_ml_threshold
;
101
};
/* End of SegmentationConfig class */
102
103
}
/* namespace SourceXtractor */
104
105
106
#endif
Configuration.h
Frame.h
std::string
Euclid::Configuration::Configuration
SourceXtractor::SegmentationConfig
Used to select a Segmentation algorithm.
Definition
SegmentationConfig.h:38
SourceXtractor::SegmentationConfig::getOnnxModelPath
std::string getOnnxModelPath() const
Definition
SegmentationConfig.h:79
SourceXtractor::SegmentationConfig::Algorithm
Algorithm
Definition
SegmentationConfig.h:41
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:71
SourceXtractor::SegmentationConfig::m_filter
std::shared_ptr< DetectionImageFrame::ImageFilter > m_filter
Definition
SegmentationConfig.h:95
SourceXtractor::SegmentationConfig::m_bfs_max_delta
int m_bfs_max_delta
Definition
SegmentationConfig.h:98
SourceXtractor::SegmentationConfig::m_lutz_window_size
int m_lutz_window_size
Definition
SegmentationConfig.h:97
SourceXtractor::SegmentationConfig::getBfsMaxDelta
int getBfsMaxDelta() const
Definition
SegmentationConfig.h:67
SourceXtractor::SegmentationConfig::m_selected_algorithm
Algorithm m_selected_algorithm
Definition
SegmentationConfig.h:94
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:75
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:100
SourceXtractor::SegmentationConfig::getAlgorithmOption
Algorithm getAlgorithmOption() const
Definition
SegmentationConfig.h:59
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:99
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:63
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:83
SourceXtractor::SegmentationConfig::~SegmentationConfig
virtual ~SegmentationConfig()=default
Destructor.
std::map
SourceXtractor
Definition
Aperture.h:30
std::shared_ptr
Generated by
1.9.7