SourceXtractorPlusPlus
1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
SEImplementation
Configuration
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
27
#include "Configuration/Configuration.h"
28
#include "
SEFramework/Image/Image.h
"
29
30
namespace
SourceXtractor
{
31
32
class
WeightImageConfig
:
public
Euclid::Configuration::Configuration
{
33
34
public
:
35
36
enum class
WeightType
{
37
WEIGHT_TYPE_NONE
,
38
WEIGHT_TYPE_FROM_BACKGROUND
,
39
WEIGHT_TYPE_RMS
,
40
WEIGHT_TYPE_VARIANCE
,
41
WEIGHT_TYPE_WEIGHT
,
42
};
43
44
virtual
~WeightImageConfig
() =
default
;
45
explicit
WeightImageConfig
(
long
manager_id);
46
47
std::map<std::string, Configuration::OptionDescriptionList>
getProgramOptions
()
override
;
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
58
WeightType
getWeightType
()
const
{
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
78
static
std::shared_ptr<WeightImage>
convertWeightMap
(
std::shared_ptr<WeightImage>
weight_image,
WeightType
weight_type,
WeightImage::PixelType
scaling = 1);
79
80
private
:
81
82
std::vector<std::shared_ptr<WeightImage>
>
m_weight_images
;
83
std::vector<WeightImage::PixelType>
m_scaled_weight_thresholds
;
84
85
WeightType
m_weight_type
;
86
bool
m_absolute_weight
;
87
WeightImage::PixelType
m_weight_scaling
;
88
WeightImage::PixelType
m_weight_threshold
;
89
bool
m_symmetry_usage
;
90
};
91
92
93
}
94
95
96
#endif
/* _SEIMPLEMENTATION_CONFIGURATION_WEIGHTIMAGECONFIG_H_ */
Image.h
Euclid::Configuration::Configuration
Euclid::Configuration::Configuration::UserValues
std::map< std::string, boost::program_options::variable_value > UserValues
SourceXtractor::Image< SeFloat >::PixelType
SeFloat PixelType
Definition
Image.h:48
SourceXtractor::WeightImageConfig::m_absolute_weight
bool m_absolute_weight
Definition
WeightImageConfig.h:86
SourceXtractor::WeightImageConfig::WeightType
WeightType
Definition
WeightImageConfig.h:36
SourceXtractor::WeightImageConfig::WeightType::WEIGHT_TYPE_NONE
@ WEIGHT_TYPE_NONE
Definition
WeightImageConfig.h:37
SourceXtractor::WeightImageConfig::WeightType::WEIGHT_TYPE_WEIGHT
@ WEIGHT_TYPE_WEIGHT
Definition
WeightImageConfig.h:41
SourceXtractor::WeightImageConfig::WeightType::WEIGHT_TYPE_FROM_BACKGROUND
@ WEIGHT_TYPE_FROM_BACKGROUND
Definition
WeightImageConfig.h:38
SourceXtractor::WeightImageConfig::WeightType::WEIGHT_TYPE_RMS
@ WEIGHT_TYPE_RMS
Definition
WeightImageConfig.h:39
SourceXtractor::WeightImageConfig::WeightType::WEIGHT_TYPE_VARIANCE
@ WEIGHT_TYPE_VARIANCE
Definition
WeightImageConfig.h:40
SourceXtractor::WeightImageConfig::getWeightThreshold
WeightImage::PixelType getWeightThreshold(size_t index=0) const
Definition
WeightImageConfig.h:66
SourceXtractor::WeightImageConfig::convertWeightMap
static std::shared_ptr< WeightImage > convertWeightMap(std::shared_ptr< WeightImage > weight_image, WeightType weight_type, WeightImage::PixelType scaling=1)
Definition
WeightImageConfig.cpp:264
SourceXtractor::WeightImageConfig::m_weight_threshold
WeightImage::PixelType m_weight_threshold
Definition
WeightImageConfig.h:88
SourceXtractor::WeightImageConfig::m_symmetry_usage
bool m_symmetry_usage
Definition
WeightImageConfig.h:89
SourceXtractor::WeightImageConfig::m_weight_scaling
WeightImage::PixelType m_weight_scaling
Definition
WeightImageConfig.h:87
SourceXtractor::WeightImageConfig::getWeightType
WeightType getWeightType() const
Definition
WeightImageConfig.h:58
SourceXtractor::WeightImageConfig::getWeightImage
std::shared_ptr< WeightImage > getWeightImage(size_t index=0) const
Definition
WeightImageConfig.h:50
SourceXtractor::WeightImageConfig::initialize
void initialize(const UserValues &args) override
Definition
WeightImageConfig.cpp:102
SourceXtractor::WeightImageConfig::WeightImageConfig
WeightImageConfig(long manager_id)
Definition
WeightImageConfig.cpp:55
SourceXtractor::WeightImageConfig::m_weight_images
std::vector< std::shared_ptr< WeightImage > > m_weight_images
Definition
WeightImageConfig.h:82
SourceXtractor::WeightImageConfig::m_weight_type
WeightType m_weight_type
Definition
WeightImageConfig.h:85
SourceXtractor::WeightImageConfig::m_scaled_weight_thresholds
std::vector< WeightImage::PixelType > m_scaled_weight_thresholds
Definition
WeightImageConfig.h:83
SourceXtractor::WeightImageConfig::isWeightAbsolute
bool isWeightAbsolute() const
Definition
WeightImageConfig.h:62
SourceXtractor::WeightImageConfig::symmetryUsage
bool symmetryUsage() const
Definition
WeightImageConfig.h:74
SourceXtractor::WeightImageConfig::getProgramOptions
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
Definition
WeightImageConfig.cpp:66
SourceXtractor::WeightImageConfig::~WeightImageConfig
virtual ~WeightImageConfig()=default
std::map
SourceXtractor
Definition
Aperture.h:30
std::shared_ptr
std::vector
Generated by
1.14.0