SourceXtractorPlusPlus
1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
ShapeParameters
ShapeParametersPlugin.cpp
Go to the documentation of this file.
1
17
/*
18
* ShapeParametersPlugin.cpp
19
*
20
* Created on: Jan 27, 2017
21
* Author: mschefer
22
*/
23
24
#include "
SEFramework/Plugin/StaticPlugin.h
"
25
26
#include "
SEImplementation/Plugin/ShapeParameters/ShapeParameters.h
"
27
#include "
SEImplementation/Plugin/ShapeParameters/ShapeParametersTaskFactory.h
"
28
#include "
SEImplementation/Plugin/ShapeParameters/ShapeParametersPlugin.h
"
29
30
namespace
SourceXtractor
{
31
32
static
StaticPlugin<ShapeParametersPlugin>
shape_parameters_plugin
;
33
34
void
ShapeParametersPlugin::registerPlugin
(
PluginAPI
& plugin_api) {
35
plugin_api.
getTaskFactoryRegistry
().
registerTaskFactory
<
ShapeParametersTaskFactory
,
ShapeParameters
>();
36
37
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
38
"ellipse_a"
,
39
[](
const
ShapeParameters
& prop){
40
return
prop.getEllipseA();
41
},
42
"pixel"
,
43
"Profile RMS along major axis"
44
);
45
46
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
47
"ellipse_b"
,
48
[](
const
ShapeParameters
& prop){
49
return
prop.getEllipseB();
50
},
51
"pixel"
,
52
"Profile RMS along minor axis"
53
);
54
55
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
56
"ellipse_theta"
,
57
[](
const
ShapeParameters
& prop){
58
return
prop.getEllipseTheta() * 180.0 / M_PI;
59
},
60
"deg"
,
61
"Isophotal image position angle (CCW/x)"
62
);
63
64
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
65
"ellipse_cxx"
,
66
[](
const
ShapeParameters
& prop){
67
return
prop.getEllipseCxx();
68
},
69
"pixel^{-2}"
,
70
"Isophotal image Cxx ellipse parameter"
71
);
72
73
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
74
"ellipse_cyy"
,
75
[](
const
ShapeParameters
& prop){
76
return
prop.getEllipseCyy();
77
},
78
"pixel^{-2}"
,
79
"Isophotal image Cyy ellipse parameter"
80
);
81
82
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
83
"ellipse_cxy"
,
84
[](
const
ShapeParameters
& prop){
85
return
prop.getEllipseCxy();
86
},
87
"pixel^{-2}"
,
88
"Isophotal image Cxy ellipse parameter"
89
);
90
91
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
92
"area"
,
93
[](
const
ShapeParameters
& prop){
94
return
prop.getArea();
95
},
96
"pixel"
,
97
"Isophotal area (filtered) above detection threshold"
98
);
99
100
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
101
"elongation"
,
102
[](
const
ShapeParameters
& prop) {
103
return
prop.getElongation();
104
},
105
""
,
106
"The object elongation (a_image / b_image)"
107
);
108
109
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
110
"ellipticity"
,
111
[](
const
ShapeParameters
& prop) {
112
return
prop.getEllipticity();
113
},
114
""
,
115
"The object ellipticity (1 - b_image / a_image)"
116
);
117
118
plugin_api.
getOutputRegistry
().
enableOutput
<
ShapeParameters
>(
"ShapeParameters"
);
119
}
120
121
std::string
ShapeParametersPlugin::getIdString
()
const
{
122
return
"ShapeParameters"
;
123
}
124
125
}
126
ShapeParametersPlugin.h
ShapeParametersTaskFactory.h
ShapeParameters.h
StaticPlugin.h
std::string
SourceXtractor::OutputRegistry::registerColumnConverter
void registerColumnConverter(std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")
Definition
OutputRegistry.h:47
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name, bool configurable_output=false)
Definition
OutputRegistry.h:142
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition
PluginAPI.h:40
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
SourceXtractor::ShapeParametersPlugin::getIdString
std::string getIdString() const override
Definition
ShapeParametersPlugin.cpp:121
SourceXtractor::ShapeParametersPlugin::registerPlugin
void registerPlugin(PluginAPI &plugin_api) override
Definition
ShapeParametersPlugin.cpp:34
SourceXtractor::ShapeParametersTaskFactory
Definition
ShapeParametersTaskFactory.h:31
SourceXtractor::ShapeParameters
Definition
ShapeParameters.h:32
SourceXtractor::StaticPlugin
Used to register compile-time (static) plugins with the PluginManager.
Definition
StaticPlugin.h:38
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition
TaskFactoryRegistry.h:51
SourceXtractor
Definition
Aperture.h:30
SourceXtractor::shape_parameters_plugin
static StaticPlugin< ShapeParametersPlugin > shape_parameters_plugin
Definition
ShapeParametersPlugin.cpp:32
Generated by
1.15.0