SourceXtractorPlusPlus
0.15
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
SEImplementation
Plugin
NDetectedPixels
NDetectedPixelsSourceTask.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_NDETECTEDPIXELSSOURCETASK_H_
40
#define _SEIMPLEMENTATION_PLUGIN_NDETECTEDPIXELSSOURCETASK_H_
41
42
#include "
SEFramework/Task/SourceTask.h
"
43
#include "
SEImplementation/Plugin/NDetectedPixels/NDetectedPixels.h
"
44
#include "
SEImplementation/Plugin/DetectionFramePixelValues/DetectionFramePixelValues.h
"
45
46
namespace
SourceXtractor {
47
class
NDetectedPixelsSourceTask
:
public
SourceTask
{
48
public
:
49
virtual
~NDetectedPixelsSourceTask
() =
default
;
50
virtual
void
computeProperties
(
SourceInterface
& source)
const
{
51
const
auto
& pixel_values = source.
getProperty
<
DetectionFramePixelValues
>().getValues();
52
long
int
n_pixels = (
long
int)pixel_values.size();
53
source.
setProperty
<
NDetectedPixels
>(n_pixels);
54
};
55
private
:
56
};
// End of NDetectedPixelsSourceTask class
57
}
// namespace SourceXtractor
58
59
#endif
/* _SEIMPLEMENTATION_PLUGIN_NDETECTEDPIXELSSOURCETASK_H_ */
60
61
62
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition:
SourceInterface.h:57
SourceXtractor::SourceTask
A Task that acts on a Source to compute one or more properties.
Definition:
SourceTask.h:36
SourceTask.h
SourceXtractor::SourceInterface::setProperty
void setProperty(Args...args)
Definition:
SourceInterface.h:72
SourceXtractor::NDetectedPixelsSourceTask
Definition:
NDetectedPixelsSourceTask.h:47
DetectionFramePixelValues.h
SourceXtractor::NDetectedPixels
Definition:
NDetectedPixels.h:45
SourceXtractor::DetectionFramePixelValues
The values of a Source's pixels in the detection image. They are returned as a vector in the same ord...
Definition:
DetectionFramePixelValues.h:39
SourceXtractor::NDetectedPixelsSourceTask::computeProperties
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
Definition:
NDetectedPixelsSourceTask.h:50
SourceXtractor::NDetectedPixelsSourceTask::~NDetectedPixelsSourceTask
virtual ~NDetectedPixelsSourceTask()=default
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition:
SourceInterface.h:46
NDetectedPixels.h
Generated by
1.8.5