SourceXtractorPlusPlus  0.15
Please provide a description of the project.
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 
26 
29 
30 namespace SourceXtractor {
31 
33  auto coordinate_system = source.getProperty<DetectionFrameCoordinates>().getCoordinateSystem();
34 
35  ImageCoordinate image_coordinate(
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 
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values.
Definition: PixelCentroid.h:37
SeFloat getCentroidX() const
X coordinate of centroid.
Definition: PixelCentroid.h:48
SeFloat getCentroidY() const
Y coordinate of centroid.
Definition: PixelCentroid.h:53
The SourceInterface is an abstract "source" that has properties attached to it.
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
virtual void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.