SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
DetectionFramePixelValues
DetectionFramePixelValuesTask.cpp
Go to the documentation of this file.
1
22
#include <memory>
23
24
#include "
SEImplementation/Property/PixelCoordinateList.h
"
25
#include "
SEImplementation/Plugin/DetectionFrameSourceStamp/DetectionFrameSourceStamp.h
"
26
27
#include "
SEImplementation/Plugin/DetectionFramePixelValues/DetectionFramePixelValues.h
"
28
#include "
SEImplementation/Plugin/DetectionFramePixelValues/DetectionFramePixelValuesTask.h
"
29
30
namespace
SourceXtractor
{
31
32
void
DetectionFramePixelValuesTask::computeProperties
(
SourceInterface
&
source
)
const
{
33
const
auto
&
stamp
=
source
.getProperty<
DetectionFrameSourceStamp
>();
34
35
auto
&
detection_image
=
stamp
.getStamp();
36
auto
&
filtered_image
=
stamp
.getFilteredStamp();
37
auto
&
variance_map
=
stamp
.getVarianceStamp();
38
39
auto
offset =
stamp
.getTopLeft();
40
41
std::vector<DetectionImage::PixelType>
values
,
filtered_values
;
42
std::vector<WeightImage::PixelType>
variances
;
43
for
(
auto
pixel_coord
:
source
.getProperty<
PixelCoordinateList
>().getCoordinateList()) {
44
auto
offset_coord
=
pixel_coord
- offset;
45
values
.push_back(
detection_image
.getValue(
offset_coord
.m_x,
offset_coord
.m_y));
46
filtered_values
.push_back(
filtered_image
.getValue(
offset_coord
.m_x,
offset_coord
.m_y));
47
variances
.push_back(
variance_map
.getValue(
offset_coord
.m_x,
offset_coord
.m_y));
48
}
49
50
source
.setProperty<
DetectionFramePixelValues
>(
std::move
(
values
),
std::move
(
filtered_values
),
std::move
(
variances
));
51
}
52
53
}
// SEImplementation namespace
54
DetectionFramePixelValuesTask.h
DetectionFramePixelValues.h
DetectionFrameSourceStamp.h
PixelCoordinateList.h
SourceXtractor::DetectionFramePixelValuesTask::computeProperties
void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
Definition
DetectionFramePixelValuesTask.cpp:32
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::DetectionFrameSourceStamp
A copy of the rectangular region of the detection image just large enough to include the whole Source...
Definition
DetectionFrameSourceStamp.h:36
SourceXtractor::PixelCoordinateList
Definition
PixelCoordinateList.h:33
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition
SourceInterface.h:46
std::function
std::move
T move(T... args)
SourceXtractor
Definition
Aperture.h:30
Generated by
1.10.0