SourceXtractorPlusPlus  0.12
Please provide a description of the project.
SourceFlagsSourceTask.cpp
Go to the documentation of this file.
1 
17 /*
18  * Copyright (C) 2012-2020 Euclid Science Ground Segment
19  *
20  * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
21  * Public License as published by the Free Software Foundation; either version 3.0 of the License, or (at your option)
22  * any later version.
23  *
24  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
25  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
26  * details.
27  *
28  * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to
29  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
30  */
31 
42 
43 namespace SourceXtractor {
44 
47 
48  for (auto group : m_instances_per_group) {
49  Flags source_flag = Flags::NONE;
50 
51  for (auto instance : group.second) {
52  source_flag |= Flags::SATURATED * source.getProperty<SaturateFlag>(instance).getSaturateFlag();
53  source_flag |= Flags::BOUNDARY * source.getProperty<BoundaryFlag>(instance).getBoundaryFlag();
54  source_flag |= Flags::BLENDED * source.getProperty<BlendedFlag>().getBlendedFlag();
55  }
56 
57  source_flags.emplace_back(source_flag);
58  }
59 
60  // set the combined source flag
62 }
63 
64 } // end SourceXtractor
static StaticPlugin< SourceFlagsPlugin > source_flags
virtual void computeProperties(SourceInterface &source) const
Computes one or more properties for the Source.
const PropertyType & getProperty(unsigned int index=0) const
Convenience template method to call getProperty() with a more user-friendly syntax.
The object is truncated (too close to an image boundary)
std::map< std::string, std::vector< unsigned int > > m_instances_per_group
At least one pixel of the object is saturated.
Flags
Flagging of bad sources.
Definition: SourceFlags.h:34
The object was originally blended with another one.
The SourceInterface is an abstract "source" that has properties attached to it.