SourceXtractorPlusPlus 0.21
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
PixelBoundariesTask.cpp
Go to the documentation of this file.
1
23#include <climits>
24
30
31namespace SourceXtractor {
32
34 int min_x = INT_MAX;
35 int min_y = INT_MAX;
36 int max_x = INT_MIN;
37 int max_y = INT_MIN;
38
39 for (auto pixel_coord : source.getProperty<PixelCoordinateList>().getCoordinateList()) {
44 }
45
47}
48
50 const auto& pixel_values = source.getProperty<DetectionFramePixelValues>().getFilteredValues();
51 SeFloat half_maximum = source.getProperty<PeakValue>().getMaxValue() / 2.0;
52
53 int min_x_half = INT_MAX;
54 int min_y_half = INT_MAX;
55 int max_x_half = INT_MIN;
56 int max_y_half = INT_MIN;
57
58 auto i = pixel_values.begin();
59 for (auto pixel_coord : source.getProperty<PixelCoordinateList>().getCoordinateList()) {
60 SeFloat value = *i++;
61
62 if (value >= half_maximum) {
67 }
68 }
69
71}
72
73} // SEImplementation namespace
74
The values of a Source's pixels in the detection image. They are returned as a vector in the same ord...
void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
The bounding box of all the pixels in the source. Both min and max coordinate are inclusive.
The SourceInterface is an abstract "source" that has properties attached to it.
T max(T... args)
T min(T... args)