SourceXtractorPlusPlus
0.11
Please provide a description of the project.
SEImplementation
src
lib
Plugin
PixelCentroid
PixelCentroidPlugin.cpp
Go to the documentation of this file.
1
17
/*
18
* PixelCentroidPlugin.cpp
19
*
20
* Created on: Aug 5, 2016
21
* Author: mschefer
22
*/
23
24
#include "
SEFramework/Plugin/StaticPlugin.h
"
25
26
#include "
SEImplementation/Plugin/PixelCentroid/PixelCentroid.h
"
27
#include "
SEImplementation/Plugin/PixelCentroid/PixelCentroidTaskFactory.h
"
28
29
#include "
SEImplementation/Plugin/PixelCentroid/PixelCentroidPlugin.h
"
30
31
namespace
SourceXtractor
{
32
33
static
StaticPlugin<PixelCentroidPlugin>
pixel_centroid_plugin
;
34
35
void
PixelCentroidPlugin::registerPlugin
(
PluginAPI
& plugin_api) {
36
plugin_api.
getTaskFactoryRegistry
().
registerTaskFactory
<
PixelCentroidTaskFactory
,
PixelCentroid
>();
37
38
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
PixelCentroid
,
double
>(
39
"pixel_centroid_x"
,
40
[](
const
PixelCentroid
& prop){
41
return
prop.getCentroidX() + 1.0;
// add one to use FITS standard coordinates
42
},
43
"pixel"
,
44
"X-position of the object in the detection image"
45
);
46
47
plugin_api.
getOutputRegistry
().
registerColumnConverter
<
PixelCentroid
,
double
>(
48
"pixel_centroid_y"
,
49
[](
const
PixelCentroid
& prop){
50
return
prop.getCentroidY() + 1.0;
// add one to use FITS standard coordinates
51
},
52
"pixel"
,
53
"Y-position of the object in the detection image"
54
);
55
56
plugin_api.
getOutputRegistry
().
enableOutput
<
PixelCentroid
>(
"PixelCentroid"
);
57
}
58
59
std::string
PixelCentroidPlugin::getIdString
()
const
{
60
return
"PixelCentroid"
;
61
}
62
63
}
64
65
PixelCentroidTaskFactory.h
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::PixelCentroid
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values...
Definition:
PixelCentroid.h:37
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition:
TaskFactoryRegistry.h:51
std::string
STL class.
PixelCentroid.h
SourceXtractor
Definition:
Aperture.h:30
SourceXtractor::PixelCentroidPlugin::getIdString
virtual std::string getIdString() const override
Definition:
PixelCentroidPlugin.cpp:59
PixelCentroidPlugin.h
SourceXtractor::PixelCentroidPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api) override
Definition:
PixelCentroidPlugin.cpp:35
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::OutputRegistry::enableOutput
void enableOutput(std::string alias_name)
Definition:
OutputRegistry.h:128
SourceXtractor::pixel_centroid_plugin
static StaticPlugin< PixelCentroidPlugin > pixel_centroid_plugin
Definition:
PixelCentroidPlugin.cpp:33
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
SourceXtractor::PixelCentroidTaskFactory
Produces PixelCentroidTask.
Definition:
PixelCentroidTaskFactory.h:35
Generated by
1.8.14