SourceXtractorPlusPlus  0.15
Please provide a description of the project.
DetectionFramePixelValuesTask.cpp
Go to the documentation of this file.
1 
22 #include <memory>
23 
26 
29 
30 namespace SourceXtractor {
31 
33  const auto& stamp = source.getProperty<DetectionFrameSourceStamp>();
34 
35  auto& detection_image = stamp.getStamp();
36  auto& filtered_image = stamp.getFilteredStamp();
37  auto& variance_map = stamp.getVarianceStamp();
38 
39  auto offset = stamp.getTopLeft();
40 
41  std::vector<DetectionImage::PixelType> values, filtered_values;
43  for (auto pixel_coord : source.getProperty<PixelCoordinateList>().getCoordinateList()) {
44  auto offset_coord = pixel_coord - offset;
45  values.push_back(detection_image.getValue(offset_coord.m_x, offset_coord.m_y));
46  filtered_values.push_back(filtered_image.getValue(offset_coord.m_x, offset_coord.m_y));
47  variances.push_back(variance_map.getValue(offset_coord.m_x, offset_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 
PixelCoordinateList.h
SourceXtractor::PixelCoordinateList
Definition: PixelCoordinateList.h:31
SourceXtractor::DetectionFramePixelValuesTask::computeProperties
virtual void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
Definition: DetectionFramePixelValuesTask.cpp:32
std::move
T move(T... args)
std::vector< DetectionImage::PixelType >
SourceXtractor::DetectionFrameSourceStamp::getStamp
const DetectionVectorImage & getStamp() const
Definition: DetectionFrameSourceStamp.h:59
DetectionFramePixelValues.h
SourceXtractor::PixelCoordinateList::getCoordinateList
const std::vector< PixelCoordinate > & getCoordinateList() const
Definition: PixelCoordinateList.h:41
std::vector::push_back
T push_back(T... args)
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::DetectionFrameSourceStamp
A copy of the rectangular region of the detection image just large enough to include the whole Source...
Definition: DetectionFrameSourceStamp.h:36
DetectionFrameSourceStamp.h
DetectionFramePixelValuesTask.h
SourceXtractor::SourceInterface::getProperty
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
Definition: SourceInterface.h:57
SourceXtractor::DetectionFramePixelValues
The values of a Source's pixels in the detection image. They are returned as a vector in the same ord...
Definition: DetectionFramePixelValues.h:39
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition: SourceInterface.h:46
SourceXtractor::SourceInterface::setProperty
void setProperty(Args... args)
Definition: SourceInterface.h:72