SourceXtractorPlusPlus  0.10
Please provide a description of the project.
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 
46 namespace SourceXtractor {
47 class NDetectedPixelsPlugin : public Plugin {
48 public:
49  virtual ~NDetectedPixelsPlugin() = default;
50  virtual void registerPlugin(PluginAPI& plugin_api) {
52  //plugin_api.getOutputRegistry().registerColumnConverter<NDetectedPixels, int>(
54  "n_detected_pixels",
55  [](const NDetectedPixels& prop){
56  return prop.getNDetectedPixels();
57  },
58  "[]",
59  "Total number of detected pixels"
60  );
61  plugin_api.getOutputRegistry().enableOutput<NDetectedPixels>("NDetectedPixels");
62  }
63  virtual std::string getIdString() const {
64  return "n_detected_pixels";
65  }
66 private:
67 }; // end of NDetectedPixelsPlugin class
68 } // namespace SourceXtractor
69 #endif /* _SEIMPLEMENTATION_PLUGIN_NDETECTEDPIXELS_H_ */
NDetectedPixelsTaskFactory.h
SourceXtractor::NDetectedPixelsPlugin::getIdString
virtual std::string getIdString() const
Definition: NDetectedPixelsPlugin.h:63
SourceXtractor::Plugin
Plugins must implement this interface.
Definition: Plugin.h:38
std::string
STL class.
NDetectedPixels.h
SourceXtractor::NDetectedPixels
Definition: NDetectedPixels.h:45
SourceXtractor::NDetectedPixelsPlugin
Definition: NDetectedPixelsPlugin.h:47
Plugin.h
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::NDetectedPixelsPlugin::registerPlugin
virtual void registerPlugin(PluginAPI &plugin_api)
Definition: NDetectedPixelsPlugin.h:50
SourceXtractor::PluginAPI
This interface is given to the plugin to let it access object instances from the framework.
Definition: PluginAPI.h:39
SourceXtractor::TaskFactoryRegistry::registerTaskFactory
void registerTaskFactory()
Definition: TaskFactoryRegistry.h:51
SourceXtractor::OutputRegistry::enableOutput
void enableOutput(std::string alias_name)
Definition: OutputRegistry.h:128
std::int64_t
SourceXtractor::NDetectedPixelsPlugin::~NDetectedPixelsPlugin
virtual ~NDetectedPixelsPlugin()=default
SourceXtractor::PluginAPI::getOutputRegistry
virtual OutputRegistry & getOutputRegistry() const =0
SourceXtractor::PluginAPI::getTaskFactoryRegistry
virtual TaskFactoryRegistry & getTaskFactoryRegistry() const =0
SourceXtractor::NDetectedPixelsTaskFactory
Definition: NDetectedPixelsTaskFactory.h:45
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