SourceXtractorPlusPlus
0.8
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
"[]"
,
98
"Total number of detected pixels"
99
);
100
101
plugin_api.
getOutputRegistry
().
enableOutput
<
ShapeParameters
>(
"ShapeParameters"
);
102
}
103
104
std::string
ShapeParametersPlugin::getIdString
()
const
{
105
return
"ShapeParameters"
;
106
}
107
108
}
109
SourceXtractor::shape_parameters_plugin
static StaticPlugin< ShapeParametersPlugin > shape_parameters_plugin
Definition:
ShapeParametersPlugin.cpp:33
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::ShapeParametersPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api) override
Definition:
ShapeParametersPlugin.cpp:35
ShapeParameters.h
SourceXtractor::ShapeParametersPlugin::getIdString
virtual std::string getIdString() const override
Definition:
ShapeParametersPlugin.cpp:104
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition:
TaskFactoryRegistry.h:51
std::string
STL class.
ShapeParametersTaskFactory.h
StaticPlugin.h
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition:
PluginAPI.h:39
SourceXtractor::StaticPlugin
Used to register compile-time (static) plugins with the PluginManager.
Definition:
StaticPlugin.h:38
SourceXtractor::ShapeParametersTaskFactory
Definition:
ShapeParametersTaskFactory.h:31
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name)
Definition:
OutputRegistry.h:128
SourceXtractor::ShapeParameters
Definition:
ShapeParameters.h:32
ShapeParametersPlugin.h
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
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
Generated by
1.8.5