SourceXtractorPlusPlus
0.19
SourceXtractor++, the next generation SExtractor
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
SourceFlags
SourceFlagsSourceTask.cpp
Go to the documentation of this file.
1
25
#include "
SEImplementation/Plugin/SourceFlags/SourceFlagsSourceTask.h
"
26
#include "
SEImplementation/Plugin/BlendedFlag/BlendedFlag.h
"
27
#include "
SEImplementation/Plugin/MeasurementFrameRectangle/MeasurementFrameRectangle.h
"
28
#include "
SEImplementation/Plugin/SourceFlags/SourceFlags.h
"
29
30
namespace
SourceXtractor {
31
32
void
SourceFlagsSourceTask::computeProperties
(
SourceInterface
&source)
const
{
33
std::vector<Flags>
source_flags
;
34
35
for
(
auto
group :
m_instances_per_group
) {
36
Flags
source_flag =
Flags::NONE
;
37
38
for
(
auto
instance : group.second) {
39
source_flag |=
Flags::SATURATED
* source.
getProperty
<
SaturateFlag
>(instance).getSaturateFlag();
40
source_flag |=
Flags::BOUNDARY
* source.
getProperty
<
BoundaryFlag
>(instance).getBoundaryFlag();
41
source_flag |=
Flags::BLENDED
* source.
getProperty
<
BlendedFlag
>().getBlendedFlag();
42
if
(source.
getProperty
<
MeasurementFrameRectangle
>(instance).
badProjection
()) {
43
source_flag |=
Flags::BAD_PROJECTION
;
44
}
45
}
46
47
source_flags.
emplace_back
(source_flag);
48
}
49
50
// set the combined source flag
51
source.
setProperty
<
SourceFlags
>(
source_flags
);
52
}
53
54
}
// end SourceXtractor
SourceXtractor::source_flags
static StaticPlugin< SourceFlagsPlugin > source_flags
Definition:
SourceFlagsPlugin.cpp:43
SourceXtractor::SaturateFlag
Definition:
SaturateFlag.h:46
SourceXtractor::Flags::BAD_PROJECTION
Failed to project some of the coordinates into one of the measurement frames.
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::Flags::NONE
No flag is set.
SourceXtractor::BlendedFlag
Definition:
BlendedFlag.h:31
SourceXtractor::MeasurementFrameRectangle
Definition:
MeasurementFrameRectangle.h:34
SourceXtractor::MeasurementFrameRectangle::badProjection
bool badProjection() const
Definition:
MeasurementFrameRectangle.h:72
SourceFlags.h
SourceXtractor::SourceFlagsSourceTask::computeProperties
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
Definition:
SourceFlagsSourceTask.cpp:32
SourceXtractor::SourceInterface::setProperty
void setProperty(Args...args)
Definition:
SourceInterface.h:72
SourceXtractor::Flags::BOUNDARY
The object is truncated (too close to an image boundary)
SourceXtractor::SourceFlagsSourceTask::m_instances_per_group
std::map< std::string, std::vector< unsigned int > > m_instances_per_group
Definition:
SourceFlagsSourceTask.h:58
SourceFlagsSourceTask.h
SourceXtractor::SourceFlags
Definition:
SourceFlags.h:48
std::vector< Flags >
SourceXtractor::BoundaryFlag
Definition:
BoundaryFlag.h:46
SourceXtractor::Flags::SATURATED
At least one pixel of the object is saturated.
SourceXtractor::Flags
Flags
Flagging of bad sources.
Definition:
SourceFlags.h:37
SourceXtractor::Flags::BLENDED
The object was originally blended with another one.
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition:
SourceInterface.h:46
BlendedFlag.h
MeasurementFrameRectangle.h
std::vector::emplace_back
T emplace_back(T...args)
Generated by
1.8.5