SourceXtractorPlusPlus
0.8
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
SEImplementation
src
lib
Plugin
DetectionFramePixelValues
DetectionFramePixelValuesTask.cpp
Go to the documentation of this file.
1
22
#include <memory>
23
#include <mutex>
24
25
#include "
SEImplementation/Property/PixelCoordinateList.h
"
26
#include "
SEFramework/Property/DetectionFrame.h
"
27
28
#include "
SEImplementation/Plugin/DetectionFramePixelValues/DetectionFramePixelValues.h
"
29
#include "
SEImplementation/Plugin/DetectionFramePixelValues/DetectionFramePixelValuesTask.h
"
30
31
#include "
SEImplementation/Measurement/MultithreadedMeasurement.h
"
32
33
namespace
SourceXtractor {
34
35
void
DetectionFramePixelValuesTask::computeProperties
(
SourceInterface
& source)
const
{
36
std::lock_guard<std::recursive_mutex>
lock
(
MultithreadedMeasurement::g_global_mutex
);
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;
43
std::vector<WeightImage::PixelType>
variances;
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
PixelCoordinateList.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::PixelCoordinateList
Definition:
PixelCoordinateList.h:30
SourceXtractor::DetectionFrame
Definition:
DetectionFrame.h:33
std::vector::push_back
T push_back(T...args)
SourceXtractor::SourceInterface::setProperty
void setProperty(Args...args)
Definition:
SourceInterface.h:72
std::lock
T lock(T...args)
DetectionFrame.h
std::move
T move(T...args)
DetectionFramePixelValuesTask.h
DetectionFramePixelValues.h
std::vector
STL class.
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
std::lock_guard
SourceXtractor::PixelCoordinateList::getCoordinateList
const std::vector< PixelCoordinate > & getCoordinateList() const
Definition:
PixelCoordinateList.h:40
SourceXtractor::MultithreadedMeasurement::g_global_mutex
static std::recursive_mutex g_global_mutex
Definition:
MultithreadedMeasurement.h:54
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition:
SourceInterface.h:46
SourceXtractor::DetectionFramePixelValuesTask::computeProperties
virtual void computeProperties(SourceInterface &source) const override
Computes one or more properties for the Source.
Definition:
DetectionFramePixelValuesTask.cpp:35
MultithreadedMeasurement.h
Generated by
1.8.5