SourceXtractorPlusPlus  0.10
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SourceXtractor::AttractorsPartitionStep Class Reference

Splits sources by identifying an attractor pixel by climbing the values gradient from every pixel. More...

#include <AttractorsPartitionStep.h>

Inheritance diagram for SourceXtractor::AttractorsPartitionStep:
[legend]
Collaboration diagram for SourceXtractor::AttractorsPartitionStep:
[legend]

Public Member Functions

virtual ~AttractorsPartitionStep ()=default
 Destructor. More...
 
 AttractorsPartitionStep (std::shared_ptr< SourceFactory > source_factory)
 
virtual std::vector
< std::shared_ptr
< SourceInterface > > 
partition (std::shared_ptr< SourceInterface > source) const override
 
- Public Member Functions inherited from SourceXtractor::PartitionStep
virtual ~PartitionStep ()=default
 Destructor. More...
 

Private Member Functions

void attractPixels (const std::vector< std::pair< PixelCoordinate, PixelCoordinate >> &pixels_with_origin, std::unordered_map< PixelCoordinate, std::vector< PixelCoordinate >> &attractors, std::function< DetectionImage::PixelType(PixelCoordinate)> value_function) const
 
std::vector< std::vector
< PixelCoordinate > > 
mergeAttractors (const std::unordered_map< PixelCoordinate, std::vector< PixelCoordinate >> &attractors) const
 

Private Attributes

std::shared_ptr< SourceFactorym_source_factory
 

Detailed Description

Splits sources by identifying an attractor pixel by climbing the values gradient from every pixel.

Definition at line 42 of file AttractorsPartitionStep.h.

Constructor & Destructor Documentation

virtual SourceXtractor::AttractorsPartitionStep::~AttractorsPartitionStep ( )
virtualdefault

Destructor.

SourceXtractor::AttractorsPartitionStep::AttractorsPartitionStep ( std::shared_ptr< SourceFactory source_factory)
inline

Definition at line 50 of file AttractorsPartitionStep.h.

Member Function Documentation

void SourceXtractor::AttractorsPartitionStep::attractPixels ( const std::vector< std::pair< PixelCoordinate, PixelCoordinate >> &  pixels_with_origin,
std::unordered_map< PixelCoordinate, std::vector< PixelCoordinate >> &  attractors,
std::function< DetectionImage::PixelType(PixelCoordinate)>  value_function 
) const
private

Definition at line 78 of file AttractorsPartitionStep.cpp.

References std::max(), and std::vector< T >::push_back().

Referenced by partition().

Here is the call graph for this function:

std::vector< std::vector< PixelCoordinate > > SourceXtractor::AttractorsPartitionStep::mergeAttractors ( const std::unordered_map< PixelCoordinate, std::vector< PixelCoordinate >> &  attractors) const
private

Definition at line 129 of file AttractorsPartitionStep.cpp.

References std::begin(), std::vector< T >::insert(), std::max(), std::min(), std::vector< T >::push_back(), and std::vector< T >::size().

Referenced by partition().

Here is the call graph for this function:

std::vector< std::shared_ptr< SourceInterface > > SourceXtractor::AttractorsPartitionStep::partition ( std::shared_ptr< SourceInterface source) const
overridevirtual

Implements SourceXtractor::PartitionStep.

Definition at line 34 of file AttractorsPartitionStep.cpp.

References attractPixels(), std::vector< T >::emplace_back(), std::numeric_limits::lowest(), m_source_factory, mergeAttractors(), std::vector< T >::push_back(), and std::vector< T >::reserve().

Here is the call graph for this function:

Member Data Documentation

std::shared_ptr<SourceFactory> SourceXtractor::AttractorsPartitionStep::m_source_factory
private

Definition at line 56 of file AttractorsPartitionStep.h.

Referenced by partition().


The documentation for this class was generated from the following files: