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
Grouping
OverlappingBoundariesCriteria.cpp
Go to the documentation of this file.
1
23
#include "
SEImplementation/Plugin/PixelBoundaries/PixelBoundaries.h
"
24
#include "
SEImplementation/Grouping/OverlappingBoundariesCriteria.h
"
25
26
namespace
SourceXtractor {
27
28
bool
OverlappingBoundariesCriteria::shouldGroup
(
const
SourceInterface
& first,
const
SourceInterface
& second)
const
{
29
auto
& first_boundaries = first.
getProperty
<
PixelBoundaries
>();
30
auto
& second_boundaries = second.
getProperty
<
PixelBoundaries
>();
31
return
!(first_boundaries.getMin().m_x > second_boundaries.
getMax
().
m_x
||
32
first_boundaries.getMax().m_x < second_boundaries.
getMin
().
m_x
||
33
first_boundaries.getMin().m_y > second_boundaries.
getMax
().
m_y
||
34
first_boundaries.getMax().m_y < second_boundaries.
getMin
().
m_y
);
35
}
36
37
38
}
// SourceXtractor namespace
39
40
41
SourceXtractor::PixelCoordinate::m_y
int m_y
Definition:
PixelCoordinate.h:38
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::PixelBoundaries
The bounding box of all the pixels in the source. Both min and max coordinate are inclusive...
Definition:
PixelBoundaries.h:37
PixelBoundaries.h
OverlappingBoundariesCriteria.h
SourceXtractor::OverlappingBoundariesCriteria::shouldGroup
virtual bool shouldGroup(const SourceInterface &first, const SourceInterface &second) const override
Determines if the two sources should be grouped together.
Definition:
OverlappingBoundariesCriteria.cpp:28
SourceXtractor::PixelBoundaries::getMax
PixelCoordinate getMax() const
Definition:
PixelBoundaries.h:53
SourceXtractor::PixelBoundaries::getMin
PixelCoordinate getMin() const
Definition:
PixelBoundaries.h:49
SourceXtractor::SourceInterface
The SourceInterface is an abstract "source" that has properties attached to it.
Definition:
SourceInterface.h:46
SourceXtractor::PixelCoordinate::m_x
int m_x
Definition:
PixelCoordinate.h:38
Generated by
1.8.5