SourceXtractorPlusPlus  0.11
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MeasurementFramePixelCentroidTask.cpp
Go to the documentation of this file.
1 
17 /*
18  * MeasurementFramePixelCentroidTask.cpp
19  *
20  * Created on: Oct 31, 2016
21  * Author: mschefer
22  */
23 
26 
30 
31 namespace SourceXtractor {
32 
34  auto detection_coordinate_system = source.getProperty<DetectionFrame>().getFrame()->getCoordinateSystem();
35  auto measurement_coordinate_system = source.getProperty<MeasurementFrame>(m_instance).getFrame()->getCoordinateSystem();
36  auto pixel_centroid = source.getProperty<PixelCentroid>();
37 
38  ImageCoordinate detection_image_coordinate(pixel_centroid.getCentroidX(), pixel_centroid.getCentroidY());
39  auto world_coordinate = detection_coordinate_system->imageToWorld(detection_image_coordinate);
40  auto measurement_image_coordinate = measurement_coordinate_system->worldToImage(world_coordinate);
41 
43  m_instance, measurement_image_coordinate.m_x, measurement_image_coordinate.m_y);
44 }
45 
46 }
47 
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
void setIndexedProperty(std::size_t index, Args...args)
Convenience template method to call setProperty() with a more user-friendly syntax.
The centroid of all the pixels in the source, weighted by their DetectionImage pixel values...
Definition: PixelCentroid.h:37
virtual void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
The SourceInterface is an abstract &quot;source&quot; that has properties attached to it.