SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
SEImplementation
Plugin
SourceIDs
SourceIDsPlugin.h
Go to the documentation of this file.
1
17
/*
18
* Copyright (C) 2012-2020 Euclid Science Ground Segment
19
*
20
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
21
* Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option)
22
* any later version.
23
*
24
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
26
* details.
27
*
28
* You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
29
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30
*/
31
32
/*
33
* SourceIDsPlugin.h
34
*
35
* Created on: Apr 27, 2018
36
* Author: mkuemmel@usm.lmu.de
37
*/
38
39
#ifndef __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_
40
#define __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_
41
42
#include "
SEImplementation/Property/SourceId.h
"
43
#include "
SEFramework/Plugin/Plugin.h
"
44
45
namespace
SourceXtractor
{
46
class
SourceIDsPlugin
:
public
Plugin
{
47
public
:
48
52
virtual
~SourceIDsPlugin
() =
default
;
53
54
virtual
void
registerPlugin
(
PluginAPI
&
plugin_api
) {
55
plugin_api
.getTaskFactoryRegistry().registerTaskFactory<
SourceIDTaskFactory
,
SourceID
>();
56
57
//TODO: "unsigned int" seems not to work as column
58
plugin_api
.getOutputRegistry().registerColumnConverter<
SourceID
,
int
>(
59
"source_id"
,
60
[](
const
SourceID
&
prop
){
61
return
prop
.getId();
62
},
63
""
,
64
"Running object number"
65
);
66
plugin_api
.getOutputRegistry().registerColumnConverter<
SourceID
,
int
>(
67
"detection_id"
,
68
[](
const
SourceID
&
prop
){
69
return
prop
.getDetectionId();
70
},
71
""
,
72
"Running detection number"
73
);
74
plugin_api
.getOutputRegistry().enableOutput<
SourceID
>(
"SourceIDs"
);
75
}
76
77
virtual
std::string
getIdString
()
const
{
78
return
"source_IDs_plugin"
;
79
}
80
private
:
81
};
82
}
/* namespace SourceXtractor */
83
#endif
/* __SEIMPLEMENTATION_PLUGIN_SOURCEIDS_SOURCEIDSPLUGIN_H_ */
Plugin.h
SourceId.h
std::string
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition
PluginAPI.h:40
SourceXtractor::Plugin
Plugins must implement this interface.
Definition
Plugin.h:38
SourceXtractor::SourceIDTaskFactory
Definition
SourceIDTaskFactory.h:33
SourceXtractor::SourceID
Definition
SourceID.h:33
SourceXtractor::SourceIDsPlugin
Definition
SourceIDsPlugin.h:46
SourceXtractor::SourceIDsPlugin::~SourceIDsPlugin
virtual ~SourceIDsPlugin()=default
Destructor.
SourceXtractor::SourceIDsPlugin::getIdString
virtual std::string getIdString() const
Definition
SourceIDsPlugin.h:77
SourceXtractor::SourceIDsPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api)
Definition
SourceIDsPlugin.h:54
std::function
SourceXtractor
Definition
Aperture.h:30
Generated by
1.10.0