SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DetectionFramePixelValuesTask.cpp
Go to the documentation of this file.
1 
22 #include <memory>
23 #include <mutex>
24 
27 
30 
32 
33 namespace SourceXtractor {
34 
37 
38  auto detection_image = source.getProperty<DetectionFrame>().getFrame()->getSubtractedImage();
39  auto filtered_image = source.getProperty<DetectionFrame>().getFrame()->getFilteredImage();
40  auto variance_map = source.getProperty<DetectionFrame>().getFrame()->getVarianceMap();
41 
42  std::vector<DetectionImage::PixelType> values, filtered_values;
44  for (auto pixel_coord : source.getProperty<PixelCoordinateList>().getCoordinateList()) {
45  values.push_back(detection_image->getValue(pixel_coord.m_x, pixel_coord.m_y));
46  filtered_values.push_back(filtered_image->getValue(pixel_coord.m_x, pixel_coord.m_y));
47  variances.push_back(variance_map->getValue(pixel_coord.m_x, pixel_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 
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
T push_back(T...args)
T lock(T...args)
T move(T...args)
STL class.
The values of a Source&#39;s pixels in the detection image. They are returned as a vector in the same ord...
const std::vector< PixelCoordinate > & getCoordinateList() const
The SourceInterface is an abstract &quot;source&quot; that has properties attached to it.
virtual void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.