SourceXtractorPlusPlus
0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
SEImplementation
src
lib
Plugin
WorldCentroid
WorldCentroidTask.cpp
Go to the documentation of this file.
1
17
/*
18
* WorldCentroidTask.cpp
19
*
20
* Created on: Nov 21, 2016
21
* Author: mschefer
22
*/
23
24
#include "
SEImplementation/Plugin/PixelCentroid/PixelCentroid.h
"
25
#include "
SEImplementation/Plugin/DetectionFrameCoordinates/DetectionFrameCoordinates.h
"
26
27
#include "
SEImplementation/Plugin/WorldCentroid/WorldCentroid.h
"
28
#include "
SEImplementation/Plugin/WorldCentroid/WorldCentroidTask.h
"
29
30
namespace
SourceXtractor
{
31
32
void
WorldCentroidTask::computeProperties
(
SourceInterface
&
source
)
const
{
33
auto
coordinate_system
=
source
.getProperty<
DetectionFrameCoordinates
>().getCoordinateSystem();
34
35
ImageCoordinate
image_coordinate
(
36
source
.getProperty<
PixelCentroid
>().
getCentroidX
(),
source
.getProperty<
PixelCentroid
>().
getCentroidY
());
37
38
auto
world_coordinate
=
coordinate_system
->imageToWorld(
image_coordinate
);
39
40
source
.setProperty<
WorldCentroid
>(
world_coordinate
.m_alpha,
world_coordinate
.m_delta);
41
}
42
43
}
44
DetectionFrameCoordinates.h
PixelCentroid.h
WorldCentroidTask.h
WorldCentroid.h
SourceXtractor::DetectionFrameCoordinates
Definition
DetectionFrameCoordinates.h:26
SourceXtractor::PixelCentroid
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values.
Definition
PixelCentroid.h:37
SourceXtractor::PixelCentroid::getCentroidX
SeFloat getCentroidX() const
X coordinate of centroid.
Definition
PixelCentroid.h:48
SourceXtractor::PixelCentroid::getCentroidY
SeFloat getCentroidY() const
Y coordinate of centroid.
Definition
PixelCentroid.h:53
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition
SourceInterface.h:46
SourceXtractor::WorldCentroidTask::computeProperties
void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
Definition
WorldCentroidTask.cpp:32
SourceXtractor::WorldCentroid
Definition
WorldCentroid.h:33
std::function
SourceXtractor
Definition
Aperture.h:30
SourceXtractor::ImageCoordinate
Definition
CoordinateSystem.h:43
Generated by
1.10.0