SourceXtractorPlusPlus
0.12
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
SEImplementation
Plugin
CoreThresholdPartition
CoreThresholdPartitionTask.h
Go to the documentation of this file.
1
24
#ifndef _SEIMPLEMENTATION_PLUGIN_CORETHRESHOLDTASK_H_
25
#define _SEIMPLEMENTATION_PLUGIN_CORETHRESHOLDTASK_H_
26
27
#include "
NCorePixel.h
"
28
#include "
SEImplementation/Property/PixelCoordinateList.h
"
29
30
#include "
SEFramework/Task/SourceTask.h
"
31
#include "
SEImplementation/Plugin/DetectionFramePixelValues/DetectionFramePixelValues.h
"
32
#include "
SEImplementation/Plugin/DetectionFrameImages/DetectionFrameImages.h
"
33
34
#include "
SEImplementation/Measurement/MultithreadedMeasurement.h
"
35
36
namespace
SourceXtractor {
37
38
class
CoreThresholdPartitionTask
:
public
SourceTask
{
39
40
public
:
41
CoreThresholdPartitionTask
(
double
snr_level):
m_snr_level
(snr_level) {};
42
43
virtual
~CoreThresholdPartitionTask
() =
default
;
44
45
virtual
void
computeProperties
(
SourceInterface
& source)
const
{
46
long
int
n_snr_level=0;
47
48
// get the detection frame and the SNR image
49
const
auto
& detection_frame_images = source.
getProperty
<
DetectionFrameImages
>();
50
const
auto
& snr_image = detection_frame_images.
getLockedImage
(
LayerSignalToNoiseMap
);
51
52
// go over all pixels
53
for
(
auto
pixel_coord : source.
getProperty
<
PixelCoordinateList
>().
getCoordinateList
()) {
54
// enhance the counter if the SNR is above the level
55
if
(snr_image->getValue(pixel_coord.m_x, pixel_coord.m_y) >=
m_snr_level
)
56
n_snr_level += 1;
57
}
58
59
// set the property
60
source.
setProperty
<
NCorePixel
>(n_snr_level);
61
};
62
63
private
:
64
double
m_snr_level
;
65
66
};
// End of CoreThresholdTask class
67
}
// namespace SExtractor
68
69
#endif
/* _SEIMPLEMENTATION_PLUGIN_SNRLEVELSOURCETASK_H_ */
70
71
72
PixelCoordinateList.h
NCorePixel.h
SourceXtractor::DetectionFrameImages::getLockedImage
std::shared_ptr< Image< SeFloat > > getLockedImage(FrameImageLayer layer) const
Definition:
DetectionFrameImages.h:40
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::DetectionFrameImages
Definition:
DetectionFrameImages.h:32
SourceXtractor::CoreThresholdPartitionTask
Definition:
CoreThresholdPartitionTask.h:38
SourceXtractor::PixelCoordinateList
Definition:
PixelCoordinateList.h:31
SourceXtractor::CoreThresholdPartitionTask::computeProperties
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
Definition:
CoreThresholdPartitionTask.h:45
SourceXtractor::SourceTask
A Task that acts on a Source to compute one or more properties.
Definition:
SourceTask.h:36
SourceTask.h
SourceXtractor::CoreThresholdPartitionTask::CoreThresholdPartitionTask
CoreThresholdPartitionTask(double snr_level)
Definition:
CoreThresholdPartitionTask.h:41
SourceXtractor::SourceInterface::setProperty
void setProperty(Args...args)
Definition:
SourceInterface.h:72
SourceXtractor::CoreThresholdPartitionTask::m_snr_level
double m_snr_level
Definition:
CoreThresholdPartitionTask.h:61
SourceXtractor::CoreThresholdPartitionTask::~CoreThresholdPartitionTask
virtual ~CoreThresholdPartitionTask()=default
SourceXtractor::LayerSignalToNoiseMap
Definition:
Frame.h:41
DetectionFramePixelValues.h
SourceXtractor::PixelCoordinateList::getCoordinateList
const std::vector< PixelCoordinate > & getCoordinateList() const
Definition:
PixelCoordinateList.h:41
DetectionFrameImages.h
SourceXtractor::NCorePixel
Definition:
NCorePixel.h:44
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition:
SourceInterface.h:46
MultithreadedMeasurement.h
Generated by
1.8.5