SourceXtractorPlusPlus  0.19
SourceXtractor++, the next generation SExtractor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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>
30 
31 namespace SourceXtractor {
32 
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 
57  void preInitialize(const UserValues& args) override;
58 
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 
76  return m_filter;
77  }
78 
80  return m_onnx_model_path;
81  }
82 
83  double getMLThreashold() const {
84  return m_ml_threshold;
85  }
86 
87 
88 private:
93 
96 
101 }; /* End of SegmentationConfig class */
102 
103 } /* namespace SourceXtractor */
104 
105 
106 #endif
virtual ~SegmentationConfig()=default
Destructor.
SegmentationConfig(long manager_id)
Constructs a new SegmentationConfig object.
STL class.
std::shared_ptr< DetectionImageFrame::ImageFilter > m_filter
STL class.
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFilter(const std::string &filename) const
string filename
Definition: conf.py:65
Used to select a Segmentation algorithm.
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
std::shared_ptr< DetectionImageFrame::ImageFilter > loadFITSFilter(const std::string &filename) const
std::shared_ptr< DetectionImageFrame::ImageFilter > loadASCIIFilter(const std::string &filename) const
void preInitialize(const UserValues &args) override
std::shared_ptr< DetectionImageFrame::ImageFilter > getFilter() const
std::shared_ptr< DetectionImageFrame::ImageFilter > getDefaultFilter() const