SourceXtractorPlusPlus
0.21
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
ASSOC
47
};
48
52
virtual
~SegmentationConfig
() =
default
;
53
55
explicit
SegmentationConfig
(
long
manager_id
);
56
57
std::map<std::string, Configuration::OptionDescriptionList>
getProgramOptions
()
override
;
58
void
preInitialize
(
const
UserValues
&
args
)
override
;
59
60
Algorithm
getAlgorithmOption
()
const
{
61
return
m_selected_algorithm
;
62
}
63
64
int
getLutzWindowSize
()
const
{
65
return
m_lutz_window_size
;
66
}
67
68
int
getBfsMaxDelta
()
const
{
69
return
m_bfs_max_delta
;
70
}
71
72
bool
isFilteringEnabled
()
const
{
73
return
m_filter
!=
nullptr
;
74
}
75
76
std::shared_ptr<DetectionImageFrame::ImageFilter>
getFilter
()
const
{
77
return
m_filter
;
78
}
79
80
std::string
getOnnxModelPath
()
const
{
81
return
m_onnx_model_path
;
82
}
83
84
double
getMLThreashold
()
const
{
85
return
m_ml_threshold
;
86
}
87
88
89
private
:
90
std::shared_ptr<DetectionImageFrame::ImageFilter>
getDefaultFilter
()
const
;
91
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFilter
(
const
std::string
& filename)
const
;
92
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadFITSFilter
(
const
std::string
& filename)
const
;
93
std::shared_ptr<DetectionImageFrame::ImageFilter>
loadASCIIFilter
(
const
std::string
& filename)
const
;
94
95
Algorithm
m_selected_algorithm
;
96
std::shared_ptr<DetectionImageFrame::ImageFilter>
m_filter
;
97
98
int
m_lutz_window_size
;
99
int
m_bfs_max_delta
;
100
std::string
m_onnx_model_path
;
101
double
m_ml_threshold
;
102
};
/* End of SegmentationConfig class */
103
104
}
/* namespace SourceXtractor */
105
106
107
#endif
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:80
SourceXtractor::SegmentationConfig::Algorithm
Algorithm
Definition
SegmentationConfig.h:41
SourceXtractor::SegmentationConfig::Algorithm::LUTZ
@ LUTZ
SourceXtractor::SegmentationConfig::Algorithm::ASSOC
@ ASSOC
SourceXtractor::SegmentationConfig::Algorithm::UNKNOWN
@ UNKNOWN
SourceXtractor::SegmentationConfig::Algorithm::BFS
@ BFS
SourceXtractor::SegmentationConfig::Algorithm::ML
@ ML
SourceXtractor::SegmentationConfig::isFilteringEnabled
bool isFilteringEnabled() const
Definition
SegmentationConfig.h:72
SourceXtractor::SegmentationConfig::m_filter
std::shared_ptr< DetectionImageFrame::ImageFilter > m_filter
Definition
SegmentationConfig.h:96
SourceXtractor::SegmentationConfig::m_bfs_max_delta
int m_bfs_max_delta
Definition
SegmentationConfig.h:99
SourceXtractor::SegmentationConfig::m_lutz_window_size
int m_lutz_window_size
Definition
SegmentationConfig.h:98
SourceXtractor::SegmentationConfig::getBfsMaxDelta
int getBfsMaxDelta() const
Definition
SegmentationConfig.h:68
SourceXtractor::SegmentationConfig::m_selected_algorithm
Algorithm m_selected_algorithm
Definition
SegmentationConfig.h:95
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:76
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:101
SourceXtractor::SegmentationConfig::getAlgorithmOption
Algorithm getAlgorithmOption() const
Definition
SegmentationConfig.h:60
SourceXtractor::SegmentationConfig::getDefaultFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > getDefaultFilter() const
Definition
SegmentationConfig.cpp:120
SourceXtractor::SegmentationConfig::m_onnx_model_path
std::string m_onnx_model_path
Definition
SegmentationConfig.h:100
SourceXtractor::SegmentationConfig::loadFITSFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFITSFilter(const std::string &filename) const
Definition
SegmentationConfig.cpp:152
SourceXtractor::SegmentationConfig::loadASCIIFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadASCIIFilter(const std::string &filename) const
Definition
SegmentationConfig.cpp:189
SourceXtractor::SegmentationConfig::getLutzWindowSize
int getLutzWindowSize() const
Definition
SegmentationConfig.h:64
SourceXtractor::SegmentationConfig::loadFilter
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFilter(const std::string &filename) const
Definition
SegmentationConfig.cpp:138
SourceXtractor::SegmentationConfig::getMLThreashold
double getMLThreashold() const
Definition
SegmentationConfig.h:84
SourceXtractor::SegmentationConfig::~SegmentationConfig
virtual ~SegmentationConfig()=default
Destructor.
std::function
std::map
SourceXtractor
Definition
Aperture.h:30
Generated by
1.10.0