SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
NDetectedPixelsPlugin.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
39#ifndef _SEIMPLEMENTATION_PLUGIN_NDETECTEDPIXELSPLUGIN_H_
40#define _SEIMPLEMENTATION_PLUGIN_NDETECTEDPIXELSPLUGIN_H_
41
42#include "NDetectedPixels.h"
45
46namespace SourceXtractor {
48public:
49 virtual ~NDetectedPixelsPlugin() = default;
51 plugin_api.getTaskFactoryRegistry().registerTaskFactory<NDetectedPixelsTaskFactory, NDetectedPixels>();
52 plugin_api.getOutputRegistry().registerColumnConverter<NDetectedPixels, int64_t>(
53 "n_detected_pixels",
54 [](const NDetectedPixels& prop){
55 return prop.getNDetectedPixels();
56 },
57 "pixel",
58 "Total number of detected pixels"
59 );
60 plugin_api.getOutputRegistry().enableOutput<NDetectedPixels>("NDetectedPixels");
61 }
62 virtual std::string getIdString() const {
63 return "n_detected_pixels";
64 }
65private:
66}; // end of NDetectedPixelsPlugin class
67} // namespace SourceXtractor
68#endif /* _SEIMPLEMENTATION_PLUGIN_NDETECTEDPIXELS_H_ */
virtual void registerPlugin(PluginAPI &plugin_api)
This interface is given to the plugin to let it access object instances from the framework.
Definition PluginAPI.h:40
Plugins must implement this interface.
Definition Plugin.h:38