SourceXtractorPlusPlus
0.13
Please provide a description of the project.
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
29
#include "
SEImplementation/Plugin/ShapeParameters/ShapeParametersPlugin.h
"
30
31
namespace
SourceXtractor
{
32
33
static
StaticPlugin<ShapeParametersPlugin>
shape_parameters_plugin
;
34
35
void
ShapeParametersPlugin::registerPlugin
(
PluginAPI
& plugin_api) {
36
plugin_api.
getTaskFactoryRegistry
().
registerTaskFactory
<
ShapeParametersTaskFactory
,
ShapeParameters
>();
37
38
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
39
"ellipse_a"
,
40
[](
const
ShapeParameters
& prop){
41
return
prop.getEllipseA();
42
},
43
"pixel"
,
44
"Profile RMS along major axis"
45
);
46
47
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
48
"ellipse_b"
,
49
[](
const
ShapeParameters
& prop){
50
return
prop.getEllipseB();
51
},
52
"pixel"
,
53
"Profile RMS along minor axis"
54
);
55
56
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
57
"ellipse_theta"
,
58
[](
const
ShapeParameters
& prop){
59
return
prop.getEllipseTheta() * 180.0 / M_PI;
60
},
61
"deg"
,
62
"Position angle (CCW/x)"
63
);
64
65
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
66
"ellipse_cxx"
,
67
[](
const
ShapeParameters
& prop){
68
return
prop.getEllipseCxx();
69
},
70
"pixel^{-2}"
,
71
"Cxx object ellipse parameter"
72
);
73
74
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
75
"ellipse_cyy"
,
76
[](
const
ShapeParameters
& prop){
77
return
prop.getEllipseCyy();
78
},
79
"pixel^{-2}"
,
80
"Cyy object ellipse parameter"
81
);
82
83
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
84
"ellipse_cxy"
,
85
[](
const
ShapeParameters
& prop){
86
return
prop.getEllipseCxy();
87
},
88
"pixel^{-2}"
,
89
"Cxy object ellipse parameter"
90
);
91
92
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
93
"area"
,
94
[](
const
ShapeParameters
& prop){
95
return
prop.getArea();
96
},
97
"pixel"
,
98
"Total number of detected pixels"
99
);
100
101
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
102
"elongation"
,
103
[](
const
ShapeParameters
& prop) {
104
return
prop.getElongation();
105
},
106
""
,
107
"The object elongation (a_image / b_image)"
108
);
109
110
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
ShapeParameters
,
double
>(
111
"ellipticity"
,
112
[](
const
ShapeParameters
& prop) {
113
return
prop.getEllipticity();
114
},
115
""
,
116
"The object ellipticity"
117
);
118
119
plugin_api.
getOutputRegistry
().
enableOutput
<
ShapeParameters
>(
"ShapeParameters"
);
120
}
121
122
std::string
ShapeParametersPlugin::getIdString
()
const
{
123
return
"ShapeParameters"
;
124
}
125
126
}
127
std::string
STL class.
StaticPlugin.h
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::ShapeParametersPlugin::getIdString
virtual std::string getIdString() const override
Definition:
ShapeParametersPlugin.cpp:122
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition:
PluginAPI.h:39
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition:
TaskFactoryRegistry.h:51
ShapeParametersPlugin.h
SourceXtractor::shape_parameters_plugin
static StaticPlugin< ShapeParametersPlugin > shape_parameters_plugin
Definition:
ShapeParametersPlugin.cpp:33
ShapeParametersTaskFactory.h
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
SourceXtractor::ShapeParametersTaskFactory
Definition:
ShapeParametersTaskFactory.h:31
SourceXtractor::StaticPlugin
Used to register compile-time (static) plugins with the PluginManager.
Definition:
StaticPlugin.h:38
ShapeParameters.h
SourceXtractor::ShapeParametersPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api) override
Definition:
ShapeParametersPlugin.cpp:35
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name, bool configurable_output=false)
Definition:
OutputRegistry.h:141
SourceXtractor::OutputRegistry::registerColumnConverter
void registerColumnConverter(std::string column_name, ColumnConverter< PropertyType, OutType > converter, std::string column_unit="", std::string column_description="")
Definition:
OutputRegistry.h:46
SourceXtractor::ShapeParameters
Definition:
ShapeParameters.h:32
Generated by
1.8.20