SourceXtractorPlusPlus  0.19
SourceXtractor++, the next generation SExtractor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
WeightImageConfig.h
Go to the documentation of this file.
1 
17 /*
18  * WeightImageConfig.h
19  *
20  * Created on: Oct 7, 2016
21  * Author: mschefer
22  */
23 
24 #ifndef _SEIMPLEMENTATION_CONFIGURATION_WEIGHTIMAGECONFIG_H_
25 #define _SEIMPLEMENTATION_CONFIGURATION_WEIGHTIMAGECONFIG_H_
26 
29 
30 namespace SourceXtractor {
31 
33 
34 public:
35 
36  enum class WeightType {
42  };
43 
44  virtual ~WeightImageConfig() = default;
45  explicit WeightImageConfig(long manager_id);
46 
48  void initialize(const UserValues& args) override;
49 
50  std::shared_ptr<WeightImage> getWeightImage(size_t index = 0) const {
51  try {
52  return m_weight_images.at(index);
53  } catch(...) {
54  return nullptr;
55  }
56  }
57 
59  return m_weight_type;
60  }
61 
62  bool isWeightAbsolute() const {
63  return m_absolute_weight;
64  }
65 
66  WeightImage::PixelType getWeightThreshold(size_t index = 0) const {
67  try {
68  return m_scaled_weight_thresholds.at(index);
69  } catch(...) {
70  return m_weight_threshold;
71  }
72  }
73 
74  bool symmetryUsage() const {
75  return m_symmetry_usage;
76  }
77 
79 
80 private:
81 
84 
90 };
91 
92 
93 }
94 
95 
96 #endif /* _SEIMPLEMENTATION_CONFIGURATION_WEIGHTIMAGECONFIG_H_ */
std::shared_ptr< WeightImage > getWeightImage(size_t index=0) const
WeightImage::PixelType m_weight_threshold
std::vector< WeightImage::PixelType > m_scaled_weight_thresholds
STL class.
static std::shared_ptr< WeightImage > convertWeightMap(std::shared_ptr< WeightImage > weight_image, WeightType weight_type, WeightImage::PixelType scaling=1)
WeightImage::PixelType getWeightThreshold(size_t index=0) const
WeightImage::PixelType m_weight_scaling
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
STL class.
virtual ~WeightImageConfig()=default
void initialize(const UserValues &args) override
std::vector< std::shared_ptr< WeightImage > > m_weight_images