SourceXtractorPlusPlus  0.11
Please provide a description of the project.
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 
T push_back(T... args)
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
T lock(T... args)
T move(T... args)
The values of a Source&#39;s pixels in the detection image. They are returned as a vector in the same ord...
The SourceInterface is an abstract "source" that has properties attached to it.
const std::vector< PixelCoordinate > & getCoordinateList() const
virtual void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.