SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
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
PixelCentroidPlugin.h
PixelCentroidTaskFactory.h
PixelCentroid.h
StaticPlugin.h
std::string
SourceXtractor::PixelCentroidPlugin::registerPlugin
void registerPlugin(PluginAPI &plugin_api) override
Definition
PixelCentroidPlugin.cpp:35
SourceXtractor::PixelCentroidPlugin::getIdString
std::string getIdString() const override
Definition
PixelCentroidPlugin.cpp:59
SourceXtractor::PixelCentroidTaskFactory
Produces PixelCentroidTask.
Definition
PixelCentroidTaskFactory.h:35
SourceXtractor::PixelCentroid
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values.
Definition
PixelCentroid.h:37
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition
PluginAPI.h:40
std::function
SourceXtractor
Definition
Aperture.h:30
SourceXtractor::pixel_centroid_plugin
static StaticPlugin< PixelCentroidPlugin > pixel_centroid_plugin
Definition
PixelCentroidPlugin.cpp:33
Generated by
1.10.0